localforage-sessionstoragewrapper
Advanced tools
Comparing version 1.1.0 to 1.2.0
{ | ||
"name": "localforage-sessionstoragewrapper", | ||
"version": "1.1.0", | ||
"main": [ | ||
@@ -22,11 +21,3 @@ "src/localforage-sessionstoragewrapper.js" | ||
"localforage": ">=1.2.1" | ||
}, | ||
"devDependencies": { | ||
"es6-promise": "~1.0.0", | ||
"requirejs": "~2.1.10", | ||
"mocha": "~1.18.2", | ||
"expect": "~0.3.1", | ||
"assert": "~0.1.0", | ||
"modernizr": "~2.8.1" | ||
} | ||
} |
@@ -9,3 +9,3 @@ { | ||
], | ||
"version": "1.1.0", | ||
"version": "1.2.0", | ||
"homepage": "https://github.com/thgreasi/localForage-sessionStorageWrapper", | ||
@@ -31,2 +31,3 @@ "repository": { | ||
"load-grunt-tasks": "^0.4.0", | ||
"localforage": ">=1.2.1", | ||
"mocha": "^1.18.2", | ||
@@ -42,5 +43,5 @@ "phantomjs": "^1.9.7-12", | ||
}, | ||
"dependencies": { | ||
"promise": "^5.0.0" | ||
"peerDependencies": { | ||
"localforage": ">=1.2.1" | ||
} | ||
} |
localForage-sessionStorageWrapper | ||
================================= | ||
[![npm](https://img.shields.io/npm/dm/localForage-sessionStorageWrapper.svg)](https://www.npmjs.com/package/localforage-sessionstoragewrapper) | ||
A sessionStorage driver for [localForage](https://github.com/mozilla/localForage). | ||
# Requirements | ||
* [localForage](https://github.com/mozilla/localForage) v1.2.1+ | ||
# Installation | ||
`npm i localforage-sessionstoragewrapper` | ||
## Example | ||
[jsfiddle](https://jsfiddle.net/m8o7t2pd/) |
@@ -25,3 +25,3 @@ (function() { | ||
} catch (e) { | ||
} | ||
@@ -58,2 +58,11 @@ | ||
function _getKeyPrefix(options, defaultConfig) { | ||
var keyPrefix = options.name + '/'; | ||
if (options.storeName !== defaultConfig.storeName) { | ||
keyPrefix += options.storeName + '/'; | ||
} | ||
return keyPrefix; | ||
} | ||
// Config the sessionStorage backend, using options set in the config. | ||
@@ -69,3 +78,3 @@ function _initStorage(options) { | ||
dbInfo.keyPrefix = dbInfo.name + '/'; | ||
dbInfo.keyPrefix = _getKeyPrefix(options, self._defaultConfig); | ||
@@ -72,0 +81,0 @@ self._dbInfo = dbInfo; |
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
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
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
Uses eval
Supply chain riskPackage uses dynamic code execution (e.g., eval()), which is a dangerous practice. This can prevent the code from running in certain environments and increases the risk that the code may contain exploits or malicious behavior.
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
16
1
17332
18
10
318
+ Addedimmediate@3.0.6(transitive)
+ Addedlie@3.1.1(transitive)
+ Addedlocalforage@1.10.0(transitive)
- Removedpromise@^5.0.0
- Removedasap@1.0.0(transitive)
- Removedpromise@5.0.0(transitive)