nuke-var-loader
Advanced tools
Comparing version 0.1.3 to 0.1.4
@@ -12,5 +12,4 @@ # 按钮类型 | ||
/** @jsx createElement */ | ||
import {createElement, Component} from 'weex-rx'; | ||
import {createElement, Component,render} from 'rax'; | ||
import { View, Text} from 'nuke-components'; | ||
import {mount} from 'nuke-mounter'; | ||
@@ -33,4 +32,4 @@ | ||
mount(<App/>, mountNode); | ||
render(<App/>); | ||
```` |
# Changelog | ||
## 0.1.4 / 2017-02-22 | ||
* [[07acd6e](http://gitlab.alibaba-inc.com/nuke/var-loader/commit/07acd6ec6f5cdd21717b5a5e1fb1ff130afd963e)] - `feat` change global variable to closure variable | ||
## 0.1.3 / 2017-02-21 | ||
@@ -5,0 +9,0 @@ |
'use strict'; | ||
var X = window || global || null; | ||
X._nuke_custom_vars = X._nuke_custom_vars || {}; | ||
var _nukeVars = require('nuke-vars'); | ||
var _nukeVars2 = _interopRequireDefault(_nukeVars); | ||
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } | ||
_nukeVars2.default._nuke_custom_vars = _nukeVars2.default._nuke_custom_vars || {}; | ||
module.exports = { | ||
varsLoader: function varsLoader(config) { | ||
return Object.assign(config, X._nuke_custom_vars); | ||
return Object.assign(config, _nukeVars2.default._nuke_custom_vars); | ||
}, | ||
varLoader: function varLoader(key, value) { | ||
if (key in X._nuke_custom_vars) { | ||
return X._nuke_custom_vars[key]; | ||
if (key in _nukeVars2.default._nuke_custom_vars) { | ||
return _nukeVars2.default._nuke_custom_vars[key]; | ||
}; | ||
@@ -17,9 +22,9 @@ return value; | ||
setVars: function setVars(config) { | ||
Object.assign(X._nuke_custom_vars, config); | ||
Object.assign(_nukeVars2.default._nuke_custom_vars, config); | ||
}, | ||
setVar: function setVar(key, value) { | ||
X._nuke_custom_vars[key] = value; | ||
_nukeVars2.default._nuke_custom_vars[key] = value; | ||
}, | ||
getVar: function getVar(key) { | ||
return X._nuke_custom_vars[key]; | ||
return _nukeVars2.default._nuke_custom_vars[key]; | ||
}, | ||
@@ -26,0 +31,0 @@ androidVar: function androidVar(config) { |
{ | ||
"name": "nuke-var-loader", | ||
"version": "0.1.3", | ||
"version": "0.1.4", | ||
"description": "nuke var loader", | ||
@@ -8,3 +8,2 @@ "main": "lib/index", | ||
"lib", | ||
"src", | ||
"docs", | ||
@@ -34,3 +33,8 @@ "theme", | ||
}, | ||
"devDependencies": {}, | ||
"dependencies": { | ||
"nuke-vars": "0.x.x" | ||
}, | ||
"devDependencies": { | ||
"nuke-components": "0.x.x" | ||
}, | ||
"publishConfig": { | ||
@@ -37,0 +41,0 @@ "registry": "http://registry.npmjs.org" |
# VarLoader | ||
- category: Components | ||
- chinese: var loader | ||
- type: 基本 | ||
- category: API | ||
- chinese: 变量管理器 | ||
- type: API | ||
@@ -16,3 +16,4 @@ --- | ||
* setVars() | ||
* setVars(object) | ||
* getVar(key) | ||
@@ -19,0 +20,0 @@ * androidVar() |
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
23
0
4173
1
1
5
38
+ Addednuke-vars@0.x.x
+ Addednuke-vars@0.0.4(transitive)