Socket
Socket
Sign inDemoInstall

nuke-var-loader

Package Overview
Dependencies
Maintainers
1
Versions
8
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

nuke-var-loader - npm Package Compare versions

Comparing version 0.1.1 to 0.1.2

4

HISTORY.md
# Changelog
## 0.1.2 / 2017-01-16
* [[9e198bf](http://gitlab.alibaba-inc.com/nuke/var-loader/commit/9e198bf79e25bdc4ee30d140c9af218b79667706)] - `feat` update from window to global
## 0.1.1 / 2017-01-12

@@ -5,0 +9,0 @@

14

lib/index.js
'use strict';
typeof window === 'undefined' && (window = {});
window._nuke_custom_vars = window._nuke_custom_vars || {};
typeof global === 'undefined' && (global = {});
global._nuke_custom_vars = global._nuke_custom_vars || {};
module.exports = {
varsLoader: function varsLoader(config) {
return Object.assign(config, window._nuke_custom_vars);
return Object.assign(config, global._nuke_custom_vars);
},
varLoader: function varLoader(key, value) {
if (key in window._nuke_custom_vars) {
return window._nuke_custom_vars[key];
if (key in global._nuke_custom_vars) {
return global._nuke_custom_vars[key];
};

@@ -17,6 +17,6 @@ return value;

setVars: function setVars(config) {
Object.assign(window._nuke_custom_vars, config);
Object.assign(global._nuke_custom_vars, config);
},
setVar: function setVar(key, value) {
window._nuke_custom_vars[key] = value;
global._nuke_custom_vars[key] = value;
},

@@ -23,0 +23,0 @@ androidVar: function androidVar(config) {

{
"name": "nuke-var-loader",
"version": "0.1.1",
"version": "0.1.2",
"description": "nuke var loader",

@@ -5,0 +5,0 @@ "main": "lib/index",

'use strict';
typeof window === 'undefined' && (window = {});
window._nuke_custom_vars = window._nuke_custom_vars || {};
typeof global === 'undefined' && (global = {});
global._nuke_custom_vars = global._nuke_custom_vars || {};
module.exports = {
varsLoader: function (config) {
return Object.assign(config, window._nuke_custom_vars);
return Object.assign(config, global._nuke_custom_vars);
},
varLoader: function (key, value) {
if (key in window._nuke_custom_vars) {
return window._nuke_custom_vars[key];
if (key in global._nuke_custom_vars) {
return global._nuke_custom_vars[key];
};

@@ -18,6 +18,6 @@ return value;

setVars: function(config) {
Object.assign(window._nuke_custom_vars, config);
Object.assign(global._nuke_custom_vars, config);
},
setVar: function(key, value) {
window._nuke_custom_vars[key] = value;
global._nuke_custom_vars[key] = value;
},

@@ -24,0 +24,0 @@ androidVar:function(config) {

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