
Product
Announcing Socket Fix 2.0
Socket Fix 2.0 brings targeted CVE remediation, smarter upgrade planning, and broader ecosystem support to help developers get to zero alerts.
Functions to create namespaces inside objects.
npm install basespace
component install gamtiq/basespace
jam install basespace
bower install basespace
spm install numgen
Use dist/basespace.js
or dist/basespace.min.js
(minified version).
var ns = require("basespace");
...
require(["basespace"], function(ns) {
...
});
define(["path/to/dist/basespace.js"], function(ns) {
...
});
<!-- Use bower_components/basespace/dist/basespace.js if the library was installed via Bower -->
<script type="text/javascript" src="path/to/dist/basespace.js"></script>
<script type="text/javascript">
// basespace is available via basespace field of window object
var ns = basespace;
...
</script>
var app = {
space: ns.space
};
ns(["model", "ui.dialog", "ui.list", "ui.list.cyclic", "util"], app);
app.space("ui.menu", "template");
app.space("data").util = {...};
Create specified namespaces
inside context
if they do not exist.
context
is global object (i.e. window
in browser) by default.
value
specifies a value that will be assigned to a final field. {}
by default.
Return the value for the last of created names/fields.
Create the specified namespace
inside this
object.
Return the value for the last of created names/fields.
MIT
0.1.0 / 2015-01-10
FAQs
Functions to create namespaces inside objects
The npm package basespace receives a total of 2 weekly downloads. As such, basespace popularity was classified as not popular.
We found that basespace demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Product
Socket Fix 2.0 brings targeted CVE remediation, smarter upgrade planning, and broader ecosystem support to help developers get to zero alerts.
Security News
Socket CEO Feross Aboukhadijeh joins Risky Business Weekly to unpack recent npm phishing attacks, their limited impact, and the risks if attackers get smarter.
Product
Socket’s new Tier 1 Reachability filters out up to 80% of irrelevant CVEs, so security teams can focus on the vulnerabilities that matter.