Comparing version 1.4.0 to 2.0.0
{ | ||
"name": "ylru", | ||
"description": "Extends LRU base on hashlru", | ||
"version": "1.4.0", | ||
"version": "2.0.0", | ||
"engines": { | ||
"node": ">= 18.19.0" | ||
}, | ||
"homepage": "https://github.com/node-modules/ylru", | ||
@@ -10,44 +13,60 @@ "repository": { | ||
}, | ||
"dependencies": {}, | ||
"devDependencies": { | ||
"@types/node": "^12.0.8", | ||
"@arethetypeswrong/cli": "^0.15.3", | ||
"@eggjs/tsconfig": "1", | ||
"@types/node": "20", | ||
"@types/mocha": "10", | ||
"beautify-benchmark": "^0.2.4", | ||
"benchmark": "^2.1.3", | ||
"egg-bin": "^1.10.0", | ||
"egg-ci": "^1.19.0", | ||
"eslint": "^4.19.1", | ||
"eslint-config-egg": "^6.0.0", | ||
"git-contributor": "^1.0.10", | ||
"egg-bin": "6", | ||
"eslint": "8", | ||
"eslint-config-egg": "13", | ||
"git-contributor": "2", | ||
"hashlru": "^1.0.3", | ||
"ko-sleep": "^1.0.2", | ||
"lru-cache": "^4.0.2", | ||
"runscript": "^1.5.2", | ||
"typescript": "^4.6.2" | ||
"typescript": "5", | ||
"tshy": "1", | ||
"tshy-after": "1" | ||
}, | ||
"main": "index.js", | ||
"files": [ | ||
"index.js", | ||
"index.d.ts" | ||
], | ||
"scripts": { | ||
"contributor": "git-contributor", | ||
"lint": "eslint test *.js", | ||
"bench": "npm run prepublishOnly && node test/bench.cjs", | ||
"lint": "eslint src test --ext .ts", | ||
"test": "npm run lint -- --fix && npm run test-local", | ||
"test-local": "egg-bin test", | ||
"cov": "egg-bin cov", | ||
"ci": "npm run lint && npm run cov" | ||
"ci": "npm run lint && npm run cov && npm run prepublishOnly && attw --pack && npm run bench", | ||
"prepublishOnly": "tshy && tshy-after" | ||
}, | ||
"author": "fengmk2", | ||
"engines": { | ||
"node": ">= 4.0.0" | ||
"license": "MIT", | ||
"type": "module", | ||
"tshy": { | ||
"exports": { | ||
".": "./src/index.ts", | ||
"./package.json": "./package.json" | ||
} | ||
}, | ||
"ci": { | ||
"version": "8, 10, 12, 14, 16", | ||
"type": "github", | ||
"os": { | ||
"github": "linux" | ||
"exports": { | ||
".": { | ||
"import": { | ||
"source": "./src/index.ts", | ||
"types": "./dist/esm/index.d.ts", | ||
"default": "./dist/esm/index.js" | ||
}, | ||
"require": { | ||
"source": "./src/index.ts", | ||
"types": "./dist/commonjs/index.d.ts", | ||
"default": "./dist/commonjs/index.js" | ||
} | ||
}, | ||
"npminstall": false | ||
"./package.json": "./package.json" | ||
}, | ||
"license": "MIT" | ||
"files": [ | ||
"dist", | ||
"src" | ||
], | ||
"types": "./dist/commonjs/index.d.ts", | ||
"main": "./dist/commonjs/index.js" | ||
} |
@@ -30,4 +30,4 @@ # ylru | ||
```js | ||
const LRU = require('ylru'); | ||
```ts | ||
import { LRU } from 'ylru'; | ||
@@ -46,3 +46,3 @@ const lru = new LRU(100); | ||
## LRU(max) => lru | ||
## new LRU(max) => lru | ||
@@ -68,4 +68,5 @@ initialize a lru object. | ||
```js | ||
```ts | ||
const lru = new LRU(3); | ||
lru.set('key 1', 'value 1'); | ||
@@ -91,4 +92,5 @@ lru.set('key 2', 'value 2'); | ||
```js | ||
```ts | ||
const lru = new LRU(3); | ||
lru.set('key 1', 'value 1'); | ||
@@ -111,2 +113,3 @@ lru.set('key 2', 'value 2'); | ||
[MIT](LICENSE) | ||
<!-- GITCONTRIBUTOR_START --> | ||
@@ -116,8 +119,8 @@ | ||
|[<img src="https://avatars.githubusercontent.com/u/259374?v=4" width="100px;"/><br/><sub><b>dominictarr</b></sub>](https://github.com/dominictarr)<br/>|[<img src="https://avatars.githubusercontent.com/u/156269?v=4" width="100px;"/><br/><sub><b>fengmk2</b></sub>](https://github.com/fengmk2)<br/>|[<img src="https://avatars.githubusercontent.com/u/985607?v=4" width="100px;"/><br/><sub><b>dead-horse</b></sub>](https://github.com/dead-horse)<br/>|[<img src="https://avatars.githubusercontent.com/u/25395?v=4" width="100px;"/><br/><sub><b>mourner</b></sub>](https://github.com/mourner)<br/>|[<img src="https://avatars.githubusercontent.com/u/6828924?v=4" width="100px;"/><br/><sub><b>vagusX</b></sub>](https://github.com/vagusX)<br/>|[<img src="https://avatars.githubusercontent.com/u/566097?v=4" width="100px;"/><br/><sub><b>RaoHai</b></sub>](https://github.com/RaoHai)<br/>| | ||
|[<img src="https://avatars.githubusercontent.com/u/156269?v=4" width="100px;"/><br/><sub><b>fengmk2</b></sub>](https://github.com/fengmk2)<br/>|[<img src="https://avatars.githubusercontent.com/u/259374?v=4" width="100px;"/><br/><sub><b>dominictarr</b></sub>](https://github.com/dominictarr)<br/>|[<img src="https://avatars.githubusercontent.com/u/985607?v=4" width="100px;"/><br/><sub><b>dead-horse</b></sub>](https://github.com/dead-horse)<br/>|[<img src="https://avatars.githubusercontent.com/u/958063?v=4" width="100px;"/><br/><sub><b>thonatos</b></sub>](https://github.com/thonatos)<br/>|[<img src="https://avatars.githubusercontent.com/u/25395?v=4" width="100px;"/><br/><sub><b>mourner</b></sub>](https://github.com/mourner)<br/>|[<img src="https://avatars.githubusercontent.com/u/32174276?v=4" width="100px;"/><br/><sub><b>semantic-release-bot</b></sub>](https://github.com/semantic-release-bot)<br/>| | ||
| :---: | :---: | :---: | :---: | :---: | :---: | | ||
[<img src="https://avatars.githubusercontent.com/u/6828924?v=4" width="100px;"/><br/><sub><b>vagusX</b></sub>](https://github.com/vagusX)<br/>|[<img src="https://avatars.githubusercontent.com/u/566097?v=4" width="100px;"/><br/><sub><b>RaoHai</b></sub>](https://github.com/RaoHai)<br/> | ||
This project follows the git-contributor [spec](https://github.com/xudafeng/git-contributor), auto updated at `Thu Mar 28 2024 11:52:18 GMT+0800`. | ||
This project follows the git-contributor [spec](https://github.com/xudafeng/git-contributor), auto updated at `Wed Mar 16 2022 23:57:13 GMT+0800`. | ||
<!-- GITCONTRIBUTOR_END --> |
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
26264
10
371
121
Yes
16
1