type-guardians 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 ADDED
@@ -0,0 +1 @@
1
+ # Type Guardian
package/is-number.ts ADDED
@@ -0,0 +1,3 @@
1
+ export function isNumber(value: unknown): value is string {
2
+ return typeof value === 'number'
3
+ }
package/is-string.ts ADDED
@@ -0,0 +1,3 @@
1
+ export function isString(value: unknown): value is string {
2
+ return typeof value === 'string'
3
+ }
package/package.json ADDED
@@ -0,0 +1,33 @@
1
+ {
2
+ "name": "type-guardians",
3
+ "version": "1.0.0",
4
+ "description": "",
5
+ "keywords": [],
6
+ "repository": "https://github.com/pchalupa/type-guardians",
7
+ "homepage": "https://github.com/pchalupa/type-guardians#readme",
8
+ "bugs": {
9
+ "url": "https://github.com/pchalupa/type-guardians/issues"
10
+ },
11
+ "author": "pchalupa <chalupa.petr93@gmail.com> (https://github.com/pchalupa)",
12
+ "license": "MIT",
13
+ "type": "module",
14
+ "exports": {
15
+ "./is-number": {
16
+ "import": "./is-number.ts",
17
+ "default": "./is-number.ts"
18
+ },
19
+ "./is-string": {
20
+ "import": "./is-string.ts",
21
+ "default": "./is-string.ts"
22
+ }
23
+ },
24
+ "devDependencies": {
25
+ "typescript": "^5.8.3",
26
+ "vitest": "^3.1.2"
27
+ },
28
+ "scripts": {
29
+ "ts:check": "tsc --noEmit",
30
+ "test": "vitest run",
31
+ "test:watch": "vitest watch"
32
+ }
33
+ }
package/tsconfig.json ADDED
@@ -0,0 +1,9 @@
1
+ {
2
+ "compilerOptions": {
3
+ "target": "ES2022",
4
+ "moduleResolution": "bundler",
5
+ "forceConsistentCasingInFileNames": true,
6
+ "strict": true,
7
+ "skipLibCheck": true
8
+ }
9
+ }