Elgg  Version 2.3
elgg.provide

Generate the skeleton for a package.

elgg.provide('elgg.package.subpackage');

is equivalent to

elgg = elgg || {};
elgg.package = elgg.package || {};
elgg.package.subpackage = elgg.package.subpackage || {};

An array package name can be given if any subpackage names need to contain a period.

elgg.provide(['one', 'two.three']);

is equivalent to

one = one || {}; one['two.three'] = one['two.three'] || {};

('elgg.config.translations')

Parameters
{String|Array}pkg The package name. Only use an array if a subpackage name needs to contain a period.
{Object}opt_context The object to extend (defaults to this)