can-globals
Advanced tools
Comparing version 0.0.3 to 0.0.4
@@ -148,2 +148,3 @@ 'use strict'; | ||
this.setKeyValue(key, value); | ||
return value; | ||
} | ||
@@ -150,0 +151,0 @@ }.bind(this); |
'use strict'; | ||
var namespace = require('can-namespace'); | ||
var Globals = require('./can-globals-proto'); | ||
var globals = new Globals(); | ||
if (namespace.globals) { | ||
throw new Error("You can't have two versions of can-globals, check your dependencies"); | ||
} else { | ||
module.exports = namespace.globals = globals; | ||
} | ||
var globals = require('can-globals/can-globals-instance'); | ||
require('./global/global'); | ||
require('./document/document'); | ||
require('./location/location'); | ||
require('./mutation-observer/mutation-observer'); | ||
module.exports = globals; |
'use strict'; | ||
require('can-globals/global/global'); | ||
var globals = require('can-globals'); | ||
var globals = require('can-globals/can-globals-instance'); | ||
@@ -6,0 +6,0 @@ /** |
@@ -6,3 +6,3 @@ 'use strict'; | ||
var globals = require('can-globals'); | ||
var globals = require('can-globals/can-globals-instance'); | ||
@@ -9,0 +9,0 @@ /** |
'use strict'; | ||
require('can-globals/global/global'); | ||
var globals = require('can-globals'); | ||
var globals = require('can-globals/can-globals-instance'); | ||
@@ -6,0 +6,0 @@ /** |
'use strict'; | ||
require('can-globals/global/global'); | ||
var globals = require('can-globals'); | ||
var globals = require('can-globals/can-globals-instance'); | ||
@@ -6,0 +6,0 @@ /** |
{ | ||
"name": "can-globals", | ||
"version": "0.0.3", | ||
"version": "0.0.4", | ||
"description": "This module provides a dependency injection container. Modules may define a key and specify a default value (which can be static, cached lazy, or dynamic lazy), but other code can set and reset the value as needed. There is also an event system, for alerting on value changes, both specific to a key and for any key.", | ||
@@ -5,0 +5,0 @@ "main": "can-globals.js", |
@@ -7,3 +7,3 @@ # can-globals | ||
This module provides a dependency injection container. Modules may `define` a key and specify a default value (which can be static, cached lazy, or dynamic lazy), but other code can `set` and `reset` the value as needed. There is also an event system, for alerting on value changes, both specific to a key and for any key. | ||
An environment agnostic container for global variables. Useful for testing and server-side rendering (SSR), typically used internally by CanJS. | ||
@@ -10,0 +10,0 @@ ## Documentation |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
25947
26
694