// Licensed Materials - Property of IBM
//
// IBM Watson Analytics
//
// (C) Copyright IBM Corp. 2015
//
// US Government Users Restricted Rights - Use, duplication or
// disclosure restricted by GSA ADP Schedule Contract with IBM Corp.
/**
* The BareJS module is the entry point for accessing BareJS's classes and polyfills.
* @module barejs
*/
// Start by loading "Built-in object" polyfills, and apply them to barejs
Object.assign( exports, require( "./polyfill" ),
/** @lends module:barejs */
{
// Load BareJS code
decl : require( "./decl" ),
Destroyable : require( "./Destroyable" ),
EventArgs : require( "./EventArgs" ),
Evented : require( "./Evented" ),
Exception : require( "./Exception" ),
/**
* The BareJS module contains an AMD loader plugin to reference specific parts of BareJS directly.
* For example, this allows to require "{@link module:barejs.decl barejs!decl}", "{@link module:barejs.Promise barejs!Promise}",
* "{@link module:barejs.NMap barejs!NMap}" or "{@link module:barejs.Map barejs!Map}"
*/
load: function( _name, _req, _load )
{
"use strict";
if ( !( _name in exports ) )
throw new Error( "invalid path: " + _name );
_load( exports[_name] );
},
/**
* While we want to provide the plugin shortcut to objects, we don't want to build this into a layer.
*/
write: function()
{
"use strict";
// Don't write anything
}
} );