Socket
Socket
Sign inDemoInstall

betajs-scoped

Package Overview
Dependencies
Maintainers
2
Versions
19
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

betajs-scoped

BetaJS-Scoped is a small module for scoped loading of modules and dependencies.


Version published
Weekly downloads
527
increased by19.77%
Maintainers
2
Weekly downloads
 
Created
Source

betajs-scoped 0.0.22

Build Status Code Climate NPM Gitter Chat

BetaJS-Scoped is a small module for scoped loading of modules and dependencies.

Getting Started

You can use the library in the browser, in your NodeJS project and compile it as well.

Browser
	<script src="betajs-scoped/dist/scoped.min.js"></script>
NodeJS
	var Scoped = require('betajs-scoped/dist/scoped.js');
Compile
	git clone https://github.com/betajs/betajs-scoped.git
	npm install
	grunt

Basic Usage

(function () {

var Scoped = this.subScope();

Scoped.binding("module", "global:MyLibrary");
Scoped.binding("dependency1", "global:ExternalDependency1");
Scoped.binding("dependency2", "global:ExternalDependency2");

// Library code

}).call(Scoped);
Scoped.require(['ns1:dependency1', 'ns2:dependency2', 'ns3:dependency3'], function (D1, D2, D3) {
    // Execute once D1, D2, D3 are resolved.
});

Scoped.define('ns:module', ['ns1:dependency1', 'ns2:dependency2', 'ns3:dependency3'], function (D1, D2, D3) {
    // Execute once D1, D2, D3 are resolved.
    return {
        // Return ns:module definition.
    };
});

Scoped.extend('ns:module', ['ns1:dependency1', 'ns2:dependency2', 'ns3:dependency3'], function (D1, D2, D3) {
    // Execute once D1, D2, D3 are resolved.
    return {
        // Return ns:module extension.
    };
});
ResourceURL
Homepagehttps://betajs.com
Gitgit://github.com/betajs/betajs-scoped.git
Repositoryhttps://github.com/betajs/betajs-scoped
Bloghttps://blog.betajs.com
Twitterhttps://twitter.com/thebetajs
Gitterhttps://gitter.im/betajs/betajs-scoped

Compatability

TargetVersions
Firefox3 - Latest
Chrome18 - Latest
Safari4 - Latest
Opera12 - Latest
Internet Explorer6 - Latest
Edge12 - Latest
YandexLatest
iOS3.0 - Latest
Android4.4 - Latest
NodeJS4.0 - Latest

CDN

ResourceURL
scoped.jshttp://cdn.rawgit.com/betajs/betajs-scoped/master/dist/scoped.js
scoped.min.jshttp://cdn.rawgit.com/betajs/betajs-scoped/master/dist/scoped.min.js

Unit Tests

ResourceURL
Test SuiteRun

Weak Dependencies

NameURL
betajs-shimsOpen

Main Contributors

  • Oliver Friedmann

License

Apache-2.0

Sponsors

  • Ziggeo
  • Browserstack

FAQs

Package last updated on 24 Oct 2019

Did you know?

Socket

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.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc