Comparing version 1.0.2 to 1.0.3
{ | ||
"name": "statecore", | ||
"version": "1.0.2", | ||
"version": "1.0.3", | ||
"description": "A state-observable library.", | ||
@@ -5,0 +5,0 @@ "main": "statecore.js", |
@@ -1,19 +0,15 @@ | ||
(function modelify(rootProvider, name, deps, factory) { | ||
(function moduleify(moduleFactory) { | ||
'use strict'; | ||
if (typeof define === 'function' && define.amd) { | ||
if (name) { | ||
define(name, deps, factory); | ||
} else { | ||
define(deps, factory); | ||
} | ||
return; | ||
define('statecore', [], moduleFactory); | ||
define('StateCore', [], moduleFactory); | ||
} else if (typeof module === 'object' && typeof exports === 'object') { | ||
module.exports = moduleFactory(); | ||
} | ||
if (typeof exports === 'object') return module.exports = factory.apply(this, deps.map(dep => require(dep))); | ||
const root = (typeof rootProvider === 'function' ? rootProvider() : rootProvider); | ||
if (!root || typeof root !== 'object') throw new Error('Invalid root object!'); | ||
const model = factory.apply(this, deps.map(dep => root[dep])); | ||
if (name) return root[name] = model; | ||
})(function rootProvider() { | ||
return (typeof window !== 'undefined' ? window : typeof self !== 'undefined' ? self : typeof global !== 'undefined' ? global : this); | ||
}, 'statecore', [], function def () { | ||
var root = (typeof window !== 'undefined' ? window : typeof self !== 'undefined' ? self : typeof global !== 'undefined' ? global : this); | ||
if (root && typeof root === 'object') { | ||
root['statecore'] = moduleFactory(); | ||
root['StateCore'] = root['statecore']; | ||
} | ||
})(function moduleFactory () { | ||
'use strict'; | ||
@@ -20,0 +16,0 @@ return { createStatecore: function createStatecore(state) { |
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
Dynamic require
Supply chain riskDynamic require can indicate the package is performing dangerous or unsafe dynamic code execution.
Found 1 instance in 1 package
0
4484
41