mb-js-bridge
Advanced tools
Comparing version 0.1.2 to 0.2.0
26
index.js
@@ -10,2 +10,26 @@ /** | ||
var JS_BRIDGE_GET_USER = 'JS_BRIDGE_GET_USER'; | ||
if (process.env.NODE_ENV !== "production") { | ||
p = function (message, defaultData) { | ||
if (message === JS_BRIDGE_GET_USER) { | ||
var se = window.localStorage.getItem('JS_BRIDGE_CACHE'); | ||
if (se) { | ||
console.info("Get bridge information from cache"); | ||
return se; | ||
} else { | ||
var da = window.prompt(JS_BRIDGE_GET_USER); | ||
console.info("Set bridge information to cache"); | ||
window.localStorage.setItem('JS_BRIDGE_CACHE', da); | ||
return da; | ||
} | ||
} | ||
return window.prompt(message, defaultData); | ||
} | ||
} | ||
var Bridge = { | ||
@@ -16,3 +40,3 @@ /** | ||
getUser: function () { | ||
return p('JS_BRIDGE_GET_USER'); | ||
return p(JS_BRIDGE_GET_USER); | ||
}, | ||
@@ -19,0 +43,0 @@ |
{ | ||
"name": "mb-js-bridge", | ||
"version": "0.1.2", | ||
"version": "0.2.0", | ||
"description": "", | ||
@@ -11,7 +11,3 @@ "main": "index.js", | ||
"author": "Jerry Bendy <jerry@icewingcc.com>", | ||
"license": "ISC", | ||
"dependencies": { | ||
"events": "^1.1.1", | ||
"object-assign": "^4.1.0" | ||
} | ||
"license": "ISC" | ||
} |
Sorry, the diff of this file is not supported yet
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
No README
QualityPackage does not have a README. This may indicate a failed publish or a low quality package.
Found 1 instance in 1 package
4011
0
5
131
1
6
- Removedevents@^1.1.1
- Removedobject-assign@^4.1.0
- Removedevents@1.1.1(transitive)
- Removedobject-assign@4.1.1(transitive)