Socket
Socket
Sign inDemoInstall

nuke-var-loader

Package Overview
Dependencies
Maintainers
2
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.2 to 0.1.3

4

HISTORY.md
# Changelog
## 0.1.3 / 2017-02-21
* [[d48b8dc](http://gitlab.alibaba-inc.com/nuke/var-loader/commit/d48b8dc4e092909bb65d4ee4b63fc45a359b2cfb)] - `feat` add window object compat ,add getVar function
## 0.1.2 / 2017-01-16

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

17

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

@@ -17,7 +17,10 @@ return value;

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

@@ -24,0 +27,0 @@ var style = {};

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

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

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

@@ -18,7 +18,10 @@ return value;

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

@@ -25,0 +28,0 @@ let style = {};

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