Comparing version 1.0.4 to 1.1.0
## Release History | ||
* 1.1.0 Add support for custom storage providers i.e. Node (#8 - @hugomano) | ||
* 1.0.4 Improve readme and install instructions. | ||
@@ -4,0 +6,0 @@ |
{ | ||
"name": "frecency", | ||
"version": "1.0.4", | ||
"version": "1.1.0", | ||
"description": "Frecency sorting for search results.", | ||
"main": "dist/main.js", | ||
"browser": { | ||
"./index.js": "dist/browser/index.js" | ||
"./index.js": "dist/browser.js" | ||
}, | ||
@@ -13,9 +14,9 @@ "files": [ | ||
"scripts": { | ||
"ci": "yarn lint && yarn build", | ||
"ci": "npm run lint && npm run build", | ||
"lint": "eslint . && flow", | ||
"prebuild": "rm -rf dist/", | ||
"build": "[ \"$WATCH\" == 'true' ] && rollup -cw || rollup -c", | ||
"test": "yarn build && jest", | ||
"test": "npm run build && jest", | ||
"watch": "WATCH=true yarn build", | ||
"prepublish": "yarn lint && yarn build && yarn test" | ||
"prepublish": "npm run lint && npm run build && npm test" | ||
}, | ||
@@ -41,7 +42,8 @@ "repository": { | ||
"eslint-plugin-flowtype": "^2.46.1", | ||
"flow-bin": "^0.69.0", | ||
"flow-bin": "^0.75.0", | ||
"jest": "^22.4.3", | ||
"rollup": "^0.57.1", | ||
"rollup-plugin-babel": "^2.6.1" | ||
"rollup-plugin-babel": "^2.6.1", | ||
"rollup-plugin-replace": "^2.0.0" | ||
} | ||
} |
@@ -122,1 +122,13 @@ # Frecency | ||
``` | ||
By default, frecency uses browser localStorage as storage provider in the browser environment. | ||
You can pass your own storage provider that implements the API Web Storage interface. | ||
For Node.js environment you can use a storage provider like [node-localstorage](https://github.com/lmaccherone/node-localstorage) | ||
```js | ||
const storageProviderFrecencyFilePath = path.join(app.getPath('userData'), 'frecency'); | ||
const storageProvider = new LocalStorage(storageProviderFrecencyFilePath); | ||
new Frecency({ | ||
key: 'people', | ||
storageProvider | ||
}); | ||
``` |
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
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
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
58937
9
1292
134
13
2