Socket
Socket
Sign inDemoInstall

frecency

Package Overview
Dependencies
0
Maintainers
1
Versions
8
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 1.0.4 to 1.1.0

dist/browser.js

2

CHANGELOG.md
## 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 @@

16

package.json
{
"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
});
```
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc