@apitree.cz/ts-utils 0.1.0-next.014fac2d573df35ee6375132222a48eb0e7f535f

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,21 @@
1
+ <div align="center">
2
+
3
+ <a href="https://github.com/ApiTreeCZ">
4
+ <img alt="ApiTree s.r.o." src="https://www.apitree.cz/static/images/logo-header.svg" width="120" />
5
+ </a>
6
+
7
+ # TS Utils
8
+
9
+ ### [TypeScript](https://www.typescriptlang.org/) utility functions for ApiTree projects
10
+
11
+ </div>
12
+
13
+ ## Installation
14
+
15
+ ```bash
16
+ pnpm add @apitree.cz/ts-utils
17
+ ```
18
+
19
+ ## Documentation
20
+
21
+ - [API Reference](./docs/README.md)
@@ -0,0 +1 @@
1
+ export declare const equals: (a: unknown, b: unknown) => boolean;
package/dist/equals.js ADDED
@@ -0,0 +1,2 @@
1
+ export const equals = (a, b) => a === b;
2
+ //# sourceMappingURL=equals.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"equals.js","sourceRoot":"","sources":["../src/equals.ts"],"names":[],"mappings":"AAGA,MAAM,CAAC,MAAM,MAAM,GAAG,CAAC,CAAU,EAAE,CAAU,EAAE,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC"}
@@ -0,0 +1,3 @@
1
+ export * from './equals.js';
2
+ export * from './is-nil.js';
3
+ export * from './not-nil.js';
package/dist/index.js ADDED
@@ -0,0 +1,4 @@
1
+ export * from './equals.js';
2
+ export * from './is-nil.js';
3
+ export * from './not-nil.js';
4
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,aAAa,CAAC;AAC5B,cAAc,aAAa,CAAC;AAC5B,cAAc,cAAc,CAAC"}
@@ -0,0 +1 @@
1
+ export declare const isNil: <T>(value: T | null | undefined) => value is null | undefined;
package/dist/is-nil.js ADDED
@@ -0,0 +1,2 @@
1
+ export const isNil = (value) => value == null;
2
+ //# sourceMappingURL=is-nil.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"is-nil.js","sourceRoot":"","sources":["../src/is-nil.ts"],"names":[],"mappings":"AAGA,MAAM,CAAC,MAAM,KAAK,GAAG,CACnB,KAA2B,EACA,EAAE,CAAC,KAAK,IAAI,IAAI,CAAC"}
@@ -0,0 +1 @@
1
+ export declare const notNil: <T>(type: T) => type is NonNullable<T>;
@@ -0,0 +1,3 @@
1
+ import { isNil } from './is-nil.js';
2
+ export const notNil = (type) => !isNil(type);
3
+ //# sourceMappingURL=not-nil.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"not-nil.js","sourceRoot":"","sources":["../src/not-nil.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,aAAa,CAAC;AAKpC,MAAM,CAAC,MAAM,MAAM,GAAG,CAAI,IAAO,EAA0B,EAAE,CAAC,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC"}
package/package.json ADDED
@@ -0,0 +1,42 @@
1
+ {
2
+ "name": "@apitree.cz/ts-utils",
3
+ "version": "0.1.0-next.014fac2d573df35ee6375132222a48eb0e7f535f",
4
+ "description": "TypeScript utility functions for ApiTree projects.",
5
+ "repository": {
6
+ "type": "git",
7
+ "url": "https://github.com/ApiTreeCZ/toolbox",
8
+ "directory": "packages/ts-utils"
9
+ },
10
+ "sideEffects": false,
11
+ "type": "module",
12
+ "exports": {
13
+ ".": {
14
+ "import": "./dist/index.js",
15
+ "types": "./dist/index.d.ts"
16
+ }
17
+ },
18
+ "types": "./dist/index.d.ts",
19
+ "files": [
20
+ "dist"
21
+ ],
22
+ "devDependencies": {
23
+ "typedoc": "^0.25.4",
24
+ "typescript": "^5.3.3",
25
+ "@apitree.cz/typedoc-config": "0.1.1"
26
+ },
27
+ "scripts": {
28
+ "prebuild": "rimraf dist tsconfig.build.tsbuildinfo",
29
+ "build": "tsc --build tsconfig.build.json",
30
+ "cleanup": "rimraf .eslintcache .turbo tsconfig.tsbuildinfo tsconfig.build.tsbuildinfo dist node_modules",
31
+ "docs": "run-s docs:generate docs:format",
32
+ "docs:format": "prettier --write \"./docs/**/*\"",
33
+ "docs:generate": "typedoc",
34
+ "fix": "run-p ts format:fix lint:fix",
35
+ "format": "prettier --check \"./**/*.{json,md}\"",
36
+ "format:fix": "pnpm run format --write",
37
+ "lint": "eslint --cache --ext cjs,js,ts .",
38
+ "lint:fix": "pnpm run lint --fix",
39
+ "qa": "run-p ts format lint",
40
+ "ts": "tsc --build tsconfig.json"
41
+ }
42
+ }