-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathpackage.json
53 lines (53 loc) · 1.47 KB
/
package.json
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
{
"name": "cached-fn",
"description": "Lightweight, lazy, cached function that runs only once when needed",
"version": "1.0.0",
"author": "@kawanet",
"bugs": {
"url": "https://github.com/kawanet/cached-fn/issues"
},
"contributors": [
"kawanet <u-suke@kawa.net>"
],
"devDependencies": {
"@types/node": "^22.10.2",
"typescript": "^5.7.2"
},
"exports": {
"types": "./types/cached-fn.d.ts",
"require": "./src/cached-fn.cjs",
"import": "./src/cached-fn.js"
},
"files": [
"LICENSE",
"README.md",
"src/cached-fn.cjs",
"src/cached-fn.js",
"types/cached-fn.d.ts"
],
"homepage": "https://github.com/kawanet/cached-fn",
"keywords": [
"cache",
"caching",
"lazy",
"memoize"
],
"license": "MIT",
"main": "./src/cached-fn.js",
"repository": {
"type": "git",
"url": "git+https://github.com/kawanet/cached-fn.git"
},
"scripts": {
"build": "npm run build-mjs && npm run build-cjs",
"build-cjs": "perl -pe 's/^export const ([^=]+)/const $1 = exports.$1/' < src/cached-fn.js > src/cached-fn.cjs",
"build-mjs": "./node_modules/.bin/tsc -p tsconfig.json",
"fixpack": "fixpack",
"prepack": "npm run build && npm run test",
"test": "npm run test-mjs && npm run test-cjs",
"test-cjs": "node -e 'if (require(\"./src/cached-fn.cjs\").cachedFn(()=>1)() !== 1) throw new Error()'",
"test-mjs": "node --test test/*.test.js"
},
"type": "module",
"types": "./types/cached-fn.d.ts"
}