@jared-m/counter 0.0.1 → 0.0.3
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.
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"counter.hooks.cjs","names":["useState","useCounter","t0","$","_c","initialCount","undefined","count","setCount","t1","t2","Symbol","for","_temp","_temp2","t3","increment","decrement","prev_0","prev"],"sources":["../../../src/hooks/counter.hooks.ts"],"sourcesContent":["import { useState } from \"react\";\
|
|
1
|
+
{"version":3,"file":"counter.hooks.cjs","names":["useState","useCounter","t0","$","_c","initialCount","undefined","count","setCount","t1","t2","Symbol","for","_temp","_temp2","t3","increment","decrement","prev_0","prev"],"sources":["../../../src/hooks/counter.hooks.ts"],"sourcesContent":["import { useState } from \"react\";\n\nexport function useCounter(initialCount: number = 0) {\n const [count, setCount] = useState(initialCount);\n\n return {\n count,\n increment: () => setCount((prev) => prev + 1),\n decrement: () => setCount((prev) => prev - 1),\n };\n}\n"],"mappings":";;AAEA,SAAOC,WAAAC,IAAA;CAAA,MAAAC,KAAAA,GAAAA,uBAAAA,GAAA,EAAA;CACL,MAAA,CAAAI,OAAAC,aAAAA,GAAAA,MAAAA,UADyBN,OAAAI,KAAAA,IAAA,IAAAJ,GACuB;CAAC,IAAAO;CAAA,IAAAC;AAAA,KAAAP,EAAA,OAAAQ,OAAAC,IAAA,4BAAA,EAAA;AAIpCH,aAAMD,SAASK,MAAmB;AAClCH,aAAMF,SAASM,OAAmB;AAAAX,IAAA,KAAAM;AAAAN,IAAA,KAAAO;QAAA;AAAAD,OAAAN,EAAA;AAAAO,OAAAP,EAAA;;CAAA,IAAAY;AAAA,KAAAZ,EAAA,OAAAI,OAAA;AAHxCQ,OAAA;GAAAR;GAAAS,WAEMP;GAAkCQ,WAClCP;GACZ;AAAAP,IAAA,KAAAI;AAAAJ,IAAA,KAAAY;OAAAA,MAAAZ,EAAA;AAAA,QAJMY;;AAHF,SAAAD,OAAAI,QAAA;AAAA,QAMiCC,SAAO;;AANxC,SAAAN,MAAAM,MAAA;AAAA,QAKiCA,OAAO"}
|
package/dist/cjs/index.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"counter.hooks.js","names":["useState","useCounter","t0","$","_c","initialCount","undefined","count","setCount","t1","t2","Symbol","for","_temp","_temp2","t3","increment","decrement","prev_0","prev"],"sources":["../../../src/hooks/counter.hooks.ts"],"sourcesContent":["import { useState } from \"react\";\
|
|
1
|
+
{"version":3,"file":"counter.hooks.js","names":["useState","useCounter","t0","$","_c","initialCount","undefined","count","setCount","t1","t2","Symbol","for","_temp","_temp2","t3","increment","decrement","prev_0","prev"],"sources":["../../../src/hooks/counter.hooks.ts"],"sourcesContent":["import { useState } from \"react\";\n\nexport function useCounter(initialCount: number = 0) {\n const [count, setCount] = useState(initialCount);\n\n return {\n count,\n increment: () => setCount((prev) => prev + 1),\n decrement: () => setCount((prev) => prev - 1),\n };\n}\n"],"mappings":";;AAEA,SAAOC,WAAAC,IAAA;CAAA,MAAAC,IAAAC,EAAA,EAAA;CACL,MAAA,CAAAG,OAAAC,YAA0BR,SADDE,OAAAI,KAAAA,IAAA,IAAAJ,GACuB;CAAC,IAAAO;CAAA,IAAAC;AAAA,KAAAP,EAAA,OAAAQ,OAAAC,IAAA,4BAAA,EAAA;AAIpCH,aAAMD,SAASK,MAAmB;AAClCH,aAAMF,SAASM,OAAmB;AAAAX,IAAA,KAAAM;AAAAN,IAAA,KAAAO;QAAA;AAAAD,OAAAN,EAAA;AAAAO,OAAAP,EAAA;;CAAA,IAAAY;AAAA,KAAAZ,EAAA,OAAAI,OAAA;AAHxCQ,OAAA;GAAAR;GAAAS,WAEMP;GAAkCQ,WAClCP;GACZ;AAAAP,IAAA,KAAAI;AAAAJ,IAAA,KAAAY;OAAAA,MAAAZ,EAAA;AAAA,QAJMY;;AAHF,SAAAD,OAAAI,QAAA;AAAA,QAMiCC,SAAO;;AANxC,SAAAN,MAAAM,MAAA;AAAA,QAKiCA,OAAO"}
|
package/package.json
CHANGED
|
@@ -1,37 +1,42 @@
|
|
|
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
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"name": "@jared-m/counter",
|
|
3
|
+
"version": "0.0.3",
|
|
4
|
+
"author": "EJaredMejia",
|
|
5
|
+
"license": "MIT",
|
|
6
|
+
"repository": {
|
|
7
|
+
"type": "git",
|
|
8
|
+
"url": "git+https://github.com/EJaredMejia/test-tanstack-config.git",
|
|
9
|
+
"directory": "packages/counter"
|
|
10
|
+
},
|
|
11
|
+
"scripts": {
|
|
12
|
+
"build": "vite build"
|
|
13
|
+
},
|
|
14
|
+
"type": "module",
|
|
15
|
+
"types": "dist/esm/index.d.ts",
|
|
16
|
+
"main": "dist/cjs/index.cjs",
|
|
17
|
+
"module": "dist/esm/index.js",
|
|
18
|
+
"exports": {
|
|
19
|
+
".": {
|
|
20
|
+
"import": {
|
|
21
|
+
"types": "./dist/esm/index.d.ts",
|
|
22
|
+
"default": "./dist/esm/index.js"
|
|
23
|
+
},
|
|
24
|
+
"require": {
|
|
25
|
+
"types": "./dist/cjs/index.d.cts",
|
|
26
|
+
"default": "./dist/cjs/index.cjs"
|
|
27
|
+
}
|
|
28
|
+
},
|
|
29
|
+
"./package.json": "./package.json"
|
|
30
|
+
},
|
|
31
|
+
"files": [
|
|
32
|
+
"dist",
|
|
33
|
+
"src"
|
|
34
|
+
],
|
|
35
|
+
"engines": {
|
|
36
|
+
"node": ">=18"
|
|
37
|
+
},
|
|
38
|
+
"peerDependencies": {
|
|
39
|
+
"react": ">=18.0.0 || >=19.0.0",
|
|
40
|
+
"react-dom": ">=18.0.0 || >=19.0.0"
|
|
41
|
+
}
|
|
42
|
+
}
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { useState } from "react";
|
|
2
|
-
|
|
3
|
-
export function useCounter(initialCount: number = 0) {
|
|
4
|
-
const [count, setCount] = useState(initialCount);
|
|
5
|
-
|
|
6
|
-
return {
|
|
7
|
-
count,
|
|
8
|
-
increment: () => setCount((prev) => prev + 1),
|
|
9
|
-
decrement: () => setCount((prev) => prev - 1),
|
|
10
|
-
};
|
|
11
|
-
}
|
|
1
|
+
import { useState } from "react";
|
|
2
|
+
|
|
3
|
+
export function useCounter(initialCount: number = 0) {
|
|
4
|
+
const [count, setCount] = useState(initialCount);
|
|
5
|
+
|
|
6
|
+
return {
|
|
7
|
+
count,
|
|
8
|
+
increment: () => setCount((prev) => prev + 1),
|
|
9
|
+
decrement: () => setCount((prev) => prev - 1),
|
|
10
|
+
};
|
|
11
|
+
}
|
package/src/index.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export { useCounter } from "./hooks/counter.hooks";
|
|
1
|
+
export { useCounter } from "./hooks/counter.hooks";
|