@ts-utilities/core 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 +46 -0
- package/dist/index.d.mts +1288 -0
- package/dist/index.mjs +765 -0
- package/package.json +66 -0
package/README.md
ADDED
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
# @ts-utilities/core
|
|
2
|
+
|
|
3
|
+
Core utilities for JavaScript/TypeScript projects, including React Native.
|
|
4
|
+
|
|
5
|
+
## Installation
|
|
6
|
+
|
|
7
|
+
```bash
|
|
8
|
+
npm install @ts-utilities/core
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
## Usage
|
|
12
|
+
|
|
13
|
+
```ts
|
|
14
|
+
import { deepmerge, debounce, sleep } from '@ts-utilities/core';
|
|
15
|
+
|
|
16
|
+
// Example usage
|
|
17
|
+
const merged = deepmerge({ a: 1 }, { b: 2 });
|
|
18
|
+
const debouncedFn = debounce(() => console.log('called'), 300);
|
|
19
|
+
await sleep(1000);
|
|
20
|
+
```
|
|
21
|
+
|
|
22
|
+
## What's Included
|
|
23
|
+
|
|
24
|
+
### Functions
|
|
25
|
+
|
|
26
|
+
- **deepmerge**: Advanced object merging with circular reference detection
|
|
27
|
+
- **hydrate**: Convert null values to undefined in data structures
|
|
28
|
+
- **object**: Utilities for working with nested objects (getObjectValue, extendProps)
|
|
29
|
+
- **poll**: Async polling with timeout and abort signal support
|
|
30
|
+
- **schedule**: Background task execution with retry logic
|
|
31
|
+
- **shield**: Safe error handling for sync/async operations
|
|
32
|
+
- **utils**: General utilities (debounce, throttle, sleep, printf, etc.)
|
|
33
|
+
|
|
34
|
+
### Types
|
|
35
|
+
|
|
36
|
+
- **gates**: Type-level logic gates (AND, OR, XOR, etc.)
|
|
37
|
+
- **guards**: Type guards and primitive checks
|
|
38
|
+
- **utilities**: Advanced TypeScript utilities (DeepPartial, KeysOfType, etc.)
|
|
39
|
+
|
|
40
|
+
## React Native Compatibility
|
|
41
|
+
|
|
42
|
+
This package is designed to work in React Native environments. All included utilities are platform-agnostic and don't depend on DOM APIs.
|
|
43
|
+
|
|
44
|
+
## License
|
|
45
|
+
|
|
46
|
+
ISC
|