@hoologic/use-when 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +3 -0
- package/index.d.ts +3 -0
- package/index.d.ts.map +1 -0
- package/index.js +8 -0
- package/index.js.map +1 -0
- package/package.json +36 -0
package/README.md
ADDED
package/index.d.ts
ADDED
package/index.d.ts.map
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAW,MAAM,OAAO,CAAA;AAI/C,eAAO,MAAM,OAAO,aAAc,MAAM,IAAI,iBAAgB,cAAc,SAAyC,CAAA"}
|
package/index.js
ADDED
@@ -0,0 +1,8 @@
|
|
1
|
+
"use strict";
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
+
exports.useWhen = void 0;
|
4
|
+
const react_1 = require("react");
|
5
|
+
// hooks
|
6
|
+
const useWhen = (callback, dependencies = []) => (0, react_1.useMemo)(callback, dependencies);
|
7
|
+
exports.useWhen = useWhen;
|
8
|
+
//# sourceMappingURL=index.js.map
|
package/index.js.map
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["index.ts"],"names":[],"mappings":";;;AAAA,iCAA+C;AAE/C,QAAQ;AAED,MAAM,OAAO,GAAG,CAAC,QAAoB,EAAE,eAA+B,EAAE,EAAE,EAAE,CAAC,IAAA,eAAO,EAAC,QAAQ,EAAE,YAAY,CAAC,CAAA;AAAtG,QAAA,OAAO,WAA+F"}
|
package/package.json
ADDED
@@ -0,0 +1,36 @@
|
|
1
|
+
{
|
2
|
+
"author": "Bryn Dyment <bryndyment@gmail.com>",
|
3
|
+
"description": "React hook for tying a callback to a React dependency array.",
|
4
|
+
"license": "MIT",
|
5
|
+
"name": "@hoologic/use-when",
|
6
|
+
"version": "1.0.0",
|
7
|
+
"bugs": {
|
8
|
+
"url": "https://github.com/hoologic/use-when/issues"
|
9
|
+
},
|
10
|
+
"devDependencies": {
|
11
|
+
"@types/react": "^16 || ^17 || ^18 || ^19.0.0",
|
12
|
+
"typescript": "5.7.3"
|
13
|
+
},
|
14
|
+
"files": [
|
15
|
+
"index.d.ts",
|
16
|
+
"index.d.ts.map",
|
17
|
+
"index.js",
|
18
|
+
"index.js.map"
|
19
|
+
],
|
20
|
+
"homepage": "https://github.com/hoologic/use-when",
|
21
|
+
"keywords": [
|
22
|
+
"hook",
|
23
|
+
"React",
|
24
|
+
"useWhen"
|
25
|
+
],
|
26
|
+
"peerDependencies": {
|
27
|
+
"react": "^16 || ^17 || ^18 || ^19.0.0"
|
28
|
+
},
|
29
|
+
"repository": {
|
30
|
+
"type": "git",
|
31
|
+
"url": "git+https://github.com/hoologic/use-when.git"
|
32
|
+
},
|
33
|
+
"scripts": {
|
34
|
+
"build": "tsc"
|
35
|
+
}
|
36
|
+
}
|