Comparing version 0.9.0-beta.0 to 0.9.0-beta.1
{ | ||
"version": "0.9.0-beta.0", | ||
"name": "lockr", | ||
"license": "MIT", | ||
"version": "0.9.0-beta.1", | ||
"main": "dist/index.js", | ||
"typings": "dist/index.d.ts", | ||
"files": [ | ||
"dist", | ||
"src" | ||
], | ||
"engines": { | ||
"node": "^12.0.0 || ^14.0.0 || >=16.0.0" | ||
}, | ||
"scripts": { | ||
"start": "tsdx watch", | ||
"build": "tsdx build", | ||
"test": "tsdx test", | ||
"lint": "tsdx lint", | ||
"prepare": "tsdx build", | ||
"size": "size-limit", | ||
"analyze": "size-limit --why" | ||
}, | ||
"peerDependencies": {}, | ||
"husky": { | ||
"hooks": { | ||
"pre-commit": "tsdx lint" | ||
} | ||
}, | ||
"prettier": { | ||
"printWidth": 80, | ||
"semi": true, | ||
"singleQuote": true, | ||
"trailingComma": "es5" | ||
}, | ||
"name": "lockr", | ||
"module": "dist/index.mjs", | ||
"types": "dist/index.d.ts", | ||
"author": "Dimitris Tsironis", | ||
"module": "dist/lockr.esm.js", | ||
"size-limit": [ | ||
{ | ||
"path": "dist/lockr.cjs.production.min.js", | ||
"limit": "10 KB" | ||
}, | ||
{ | ||
"path": "dist/lockr.esm.js", | ||
"limit": "10 KB" | ||
} | ||
], | ||
"devDependencies": { | ||
"@size-limit/preset-small-lib": "^5.0.3", | ||
"husky": "^7.0.1", | ||
"size-limit": "^5.0.3", | ||
"tsdx": "^0.14.1", | ||
"tslib": "^2.3.1", | ||
"typescript": "^4.3.5" | ||
"@changesets/cli": "^2.26.0", | ||
"tsup": "^6.5.0", | ||
"typescript": "^4.9.4" | ||
}, | ||
"volta": { | ||
"node": "14.17.5" | ||
"scripts": { | ||
"build": "tsup src/index.ts --format cjs,esm --dts", | ||
"lint": "tsc ./src/index.ts" | ||
} | ||
} |
import keys from './keys'; | ||
import PREFIX, { getPrefixedKey } from './prefix'; | ||
import { hasPrefix, getPrefixedKey } from './prefix'; | ||
export default function flush() { | ||
if (PREFIX.length > 0) { | ||
if (hasPrefix()) { | ||
keys().forEach(key => { | ||
@@ -7,0 +7,0 @@ localStorage.removeItem(getPrefixedKey(key)); |
@@ -1,11 +0,28 @@ | ||
export { default as set } from './set'; | ||
export { default as sadd } from './sadd'; | ||
export { default as smembers } from './smembers'; | ||
export { default as rm } from './rm'; | ||
export { default as get } from './get'; | ||
export { default as getAll } from './getAll'; | ||
export { default as flush } from './flush'; | ||
export { default as keys } from './keys'; | ||
export { default as sismember } from './sismember'; | ||
export { default as srem } from './srem'; | ||
export * from './prefix'; | ||
import set from './set'; | ||
import sadd from './sadd'; | ||
import smembers from './smembers'; | ||
import rm from './rm'; | ||
import get from './get'; | ||
import getAll from './getAll'; | ||
import flush from './flush'; | ||
import keys from './keys'; | ||
import sismember from './sismember'; | ||
import srem from './srem'; | ||
import { getPrefix, hasPrefix, setPrefix, getPrefixedKey } from './prefix'; | ||
export { | ||
set, | ||
sadd, | ||
smembers, | ||
rm, | ||
get, | ||
getAll, | ||
flush, | ||
keys, | ||
sismember, | ||
srem, | ||
getPrefixedKey, | ||
getPrefix, | ||
setPrefix, | ||
hasPrefix, | ||
}; |
import { getPrefixedKey } from './prefix'; | ||
type Options = any; | ||
export default function set(key: string, value: any, options?: Options): void { | ||
@@ -5,0 +4,0 @@ var query_key = getPrefixedKey(key, options); |
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
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
Environment variable access
Supply chain riskPackage accesses environment variables, which may be a sign of credential stuffing or data theft.
Found 1 instance in 1 package
3
1
21055
28
444