Class: Namespace

bp.core. Namespace

Constructor

new Namespace()

A simple namespace object. Returned by bp.provide.

Methods

get() → {object}

Returns the namespace object.
Returns:
The underlying namespace object.
Type
object
Example
var stuff = bp.provide('some.cool.stuff').get();
stuff.things = 'awesome';
// some.cool.stuff.things => 'awesome'

use(fn) → {bp.core.Namespace}

Uses the namespace. Basically what this does, is calls the function provided with the namespace as the "this" context. It also passes the namespace as the first argument to the provided function.
Parameters:
Name Type Description
fn function The function to call from within the use context.
Returns:
The namespace.
Type
bp.core.Namespace