@simplysm/core-common 13.0.77 → 13.0.80

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.
Files changed (2) hide show
  1. package/package.json +5 -4
  2. package/README.md +0 -170
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@simplysm/core-common",
3
- "version": "13.0.77",
3
+ "version": "13.0.80",
4
4
  "description": "Simplysm package - Core module (common)",
5
5
  "author": "simplysm",
6
6
  "license": "Apache-2.0",
@@ -15,7 +15,8 @@
15
15
  "files": [
16
16
  "dist",
17
17
  "src",
18
- "tests"
18
+ "tests",
19
+ "docs"
19
20
  ],
20
21
  "sideEffects": [
21
22
  "./src/extensions/arr-ext.ts",
@@ -28,9 +29,9 @@
28
29
  "./dist/index.js"
29
30
  ],
30
31
  "dependencies": {
31
- "@zip.js/zip.js": "^2.8.22",
32
+ "@zip.js/zip.js": "^2.8.23",
32
33
  "consola": "^3.4.2",
33
- "fast-xml-parser": "^5.4.2",
34
+ "fast-xml-parser": "^5.5.1",
34
35
  "yaml": "^2.8.2"
35
36
  }
36
37
  }
package/README.md DELETED
@@ -1,170 +0,0 @@
1
- # @simplysm/core-common
2
-
3
- Common utility package providing environment variables, array/map/set extensions, error classes, date/time types, async features, and a wide range of utility namespaces. Works in both browser and Node.js environments.
4
-
5
- ## Installation
6
-
7
- ```bash
8
- pnpm add @simplysm/core-common
9
- ```
10
-
11
- ## Table of Contents
12
-
13
- - [Array Extensions](#array-extensions)
14
- - [Map Extensions](#map-extensions)
15
- - [Set Extensions](#set-extensions)
16
- - [Types](#types)
17
- - [Utils](#utils)
18
- - [Features](#features)
19
- - [Errors](#errors)
20
- - [Zip](#zip)
21
-
22
- ---
23
-
24
- ## Array Extensions
25
-
26
- Prototype extensions added to `Array` and `ReadonlyArray` as a side effect of importing from this package. Covers querying, grouping, diffing, sorting, and async iteration.
27
-
28
- [Full documentation](docs/array-extensions.md)
29
-
30
- | Symbol | Description |
31
- |--------|-------------|
32
- | [`single`](docs/array-extensions.md#readonly-array-methods) | Returns the sole matching element (throws on multiple matches) |
33
- | [`first`](docs/array-extensions.md#readonly-array-methods) | First matching element |
34
- | [`last`](docs/array-extensions.md#readonly-array-methods) | Last matching element |
35
- | [`filterExists`](docs/array-extensions.md#readonly-array-methods) | Removes `null`/`undefined` entries |
36
- | [`filterAsync`](docs/array-extensions.md#readonly-array-methods) | Async filter (sequential) |
37
- | [`ofType`](docs/array-extensions.md#readonly-array-methods) | Filter by primitive type string or constructor |
38
- | [`mapAsync`](docs/array-extensions.md#readonly-array-methods) | Async map (sequential) |
39
- | [`mapMany`](docs/array-extensions.md#readonly-array-methods) / [`mapManyAsync`](docs/array-extensions.md#readonly-array-methods) | Flatten with optional transform |
40
- | [`parallelAsync`](docs/array-extensions.md#readonly-array-methods) | Parallel async map (`Promise.all`) |
41
- | [`groupBy`](docs/array-extensions.md#readonly-array-methods) | Groups elements by key |
42
- | [`toMap`](docs/array-extensions.md#readonly-array-methods) / [`toMapAsync`](docs/array-extensions.md#readonly-array-methods) | Converts to `Map` |
43
- | [`toArrayMap`](docs/array-extensions.md#readonly-array-methods) | Converts to `Map` where values are arrays |
44
- | [`toSetMap`](docs/array-extensions.md#readonly-array-methods) | Converts to `Map` where values are sets |
45
- | [`toMapValues`](docs/array-extensions.md#readonly-array-methods) | Groups by key then reduces each group |
46
- | [`toObject`](docs/array-extensions.md#readonly-array-methods) | Converts to plain `Record<string, V>` |
47
- | [`toTree`](docs/array-extensions.md#readonly-array-methods) | Builds a tree from a flat list |
48
- | [`distinct`](docs/array-extensions.md#readonly-array-methods) | Returns unique elements |
49
- | [`orderBy`](docs/array-extensions.md#readonly-array-methods) / [`orderByDesc`](docs/array-extensions.md#readonly-array-methods) | Sorted copy (ascending/descending) |
50
- | [`diffs`](docs/array-extensions.md#readonly-array-methods) / [`oneWayDiffs`](docs/array-extensions.md#readonly-array-methods) | Array diff comparison |
51
- | [`merge`](docs/array-extensions.md#readonly-array-methods) | Merge two arrays using diffs |
52
- | [`sum`](docs/array-extensions.md#readonly-array-methods) / [`min`](docs/array-extensions.md#readonly-array-methods) / [`max`](docs/array-extensions.md#readonly-array-methods) | Aggregation helpers |
53
- | [`shuffle`](docs/array-extensions.md#readonly-array-methods) | Returns a new randomly shuffled array |
54
- | [`distinctThis`](docs/array-extensions.md#mutable-array-methods) / [`orderByThis`](docs/array-extensions.md#mutable-array-methods) / [`orderByDescThis`](docs/array-extensions.md#mutable-array-methods) | In-place sort/dedup |
55
- | [`insert`](docs/array-extensions.md#mutable-array-methods) / [`remove`](docs/array-extensions.md#mutable-array-methods) / [`toggle`](docs/array-extensions.md#mutable-array-methods) / [`clear`](docs/array-extensions.md#mutable-array-methods) | In-place mutation helpers |
56
- | [`ArrayDiffsResult`](docs/array-extensions.md#related-types) / [`ArrayOneWayDiffResult`](docs/array-extensions.md#related-types) / [`TreeArray`](docs/array-extensions.md#related-types) / [`ComparableType`](docs/array-extensions.md#related-types) | Related TypeScript types |
57
-
58
- ---
59
-
60
- ## Map Extensions
61
-
62
- Prototype extensions added to `Map` as a side effect of importing from this package.
63
-
64
- [Full documentation](docs/utils.md#map-extensions-side-effect)
65
-
66
- | Symbol | Description |
67
- |--------|-------------|
68
- | `getOrCreate` | Return existing value or set and return a new value via factory |
69
- | `update` | Update value in place using a transform function |
70
-
71
- ---
72
-
73
- ## Set Extensions
74
-
75
- Prototype extensions added to `Set` as a side effect of importing from this package.
76
-
77
- [Full documentation](docs/utils.md#set-extensions-side-effect)
78
-
79
- | Symbol | Description |
80
- |--------|-------------|
81
- | `adds` | Add multiple values at once |
82
- | `toggle` | Remove if present, add if absent; optional forced direction |
83
-
84
- ---
85
-
86
- ## Types
87
-
88
- Immutable value types and utility type aliases. All support parsing, formatting, and arithmetic.
89
-
90
- [Full documentation](docs/types.md)
91
-
92
- | Symbol | Description |
93
- |--------|-------------|
94
- | [`Uuid`](docs/types.md#uuid) | UUID v4 using `crypto.getRandomValues` |
95
- | [`LazyGcMap`](docs/types.md#lazygcmaptkey-tvalue) | `Map` with automatic expiry-based garbage collection |
96
- | [`DateTime`](docs/types.md#datetime) | Immutable date-time (millisecond precision, local timezone) |
97
- | [`DateOnly`](docs/types.md#dateonly) | Immutable date without time; includes week-sequence helpers |
98
- | [`Time`](docs/types.md#time) | Immutable time without date; 24-hour wrap normalization |
99
- | [`Bytes`](docs/types.md#primitive-types) / [`PrimitiveType`](docs/types.md#primitive-types) / [`PrimitiveTypeStr`](docs/types.md#primitive-types) / [`PrimitiveTypeMap`](docs/types.md#primitive-types) | Primitive type aliases |
100
- | [`DeepPartial`](docs/types.md#utility-types) / [`Type`](docs/types.md#utility-types) | TypeScript utility types |
101
- | [`UndefToOptional`](docs/types.md#utility-types) / [`OptionalToUndef`](docs/types.md#utility-types) | Optional/undefined conversion types |
102
- | [`EqualOptions`](docs/types.md#utility-types) / [`MergeOptions`](docs/types.md#utility-types) / [`Merge3KeyOptions`](docs/types.md#utility-types) | Option types for `obj.*` utilities |
103
- | [`DtNormalizedMonth`](docs/types.md#utility-types) | Return type of `dt.normalizeMonth` |
104
-
105
- ---
106
-
107
- ## Utils
108
-
109
- Pure utility namespaces for common tasks: formatting, parsing, transformation, and I/O encoding.
110
-
111
- [Full documentation](docs/utils.md)
112
-
113
- | Symbol | Description |
114
- |--------|-------------|
115
- | [`env`](docs/utils.md#env) | Global environment object from `process.env` |
116
- | [`dt`](docs/utils.md#dt--date-utilities) | Date/time formatting and normalization (`dt.format`, `dt.normalizeMonth`, `dt.convert12To24`) |
117
- | [`bytes`](docs/utils.md#bytes--binary-utilities) | Binary encoding helpers (`concat`, `toHex`, `fromHex`, `toBase64`, `fromBase64`) |
118
- | [`json`](docs/utils.md#json--json-utilities) | JSON with support for `DateTime`, `Uuid`, `Set`, `Map`, etc. (`stringify`, `parse`) |
119
- | [`num`](docs/utils.md#num--number-utilities) | Number formatting and parsing (`parseInt`, `parseFloat`, `parseRoundedInt`, `format`, `isNullOrEmpty`) |
120
- | [`obj`](docs/utils.md#obj--object-utilities) | Deep clone, equality, merge, chain path access, key utilities |
121
- | [`primitive`](docs/utils.md#primitive--primitive-type-utility) | Infer `PrimitiveTypeStr` from a value at runtime |
122
- | [`str`](docs/utils.md#str--string-utilities) | String case conversion, Korean particle, full-width conversion, null check, insert |
123
- | [`path`](docs/utils.md#path--path-utilities) | POSIX path helpers (`join`, `basename`, `extname`) |
124
- | [`xml`](docs/utils.md#xml--xml-utilities) | XML serialization (`parse`, `stringify`) |
125
- | [`wait`](docs/utils.md#wait--wait-utilities) | Async wait primitives (`until`, `time`) |
126
- | [`transfer`](docs/utils.md#transfer--transferable-utilities) | Web Worker transfer helpers (`encode`, `decode`) |
127
- | [`err`](docs/utils.md#err--error-utility) | Safe error-to-string conversion (`message`) |
128
- | [`js`](docs/utils.md#template-string-tags) / [`ts`](docs/utils.md#template-string-tags) / [`html`](docs/utils.md#template-string-tags) / [`tsql`](docs/utils.md#template-string-tags) / [`mysql`](docs/utils.md#template-string-tags) / [`pgsql`](docs/utils.md#template-string-tags) | Template literal syntax-highlighting tags |
129
-
130
- ---
131
-
132
- ## Features
133
-
134
- Async coordination primitives for debouncing, sequential execution, and typed event handling.
135
-
136
- [Full documentation](docs/features.md)
137
-
138
- | Symbol | Description |
139
- |--------|-------------|
140
- | [`DebounceQueue`](docs/features.md#debouncequeue) | Executes only the last of rapid-fire calls after a delay |
141
- | [`SerialQueue`](docs/features.md#serialqueue) | Runs async tasks one at a time in submission order |
142
- | [`EventEmitter`](docs/features.md#eventemittertevents) | Type-safe event emitter backed by `EventTarget` |
143
-
144
- ---
145
-
146
- ## Errors
147
-
148
- Error classes with structured cause chaining and descriptive formatting.
149
-
150
- [Full documentation](docs/errors.md)
151
-
152
- | Symbol | Description |
153
- |--------|-------------|
154
- | [`SdError`](docs/errors.md#sderror) | Base error with tree-structured cause chaining |
155
- | [`ArgumentError`](docs/errors.md#argumenterror) | Invalid argument with YAML-formatted values |
156
- | [`NotImplementedError`](docs/errors.md#notimplementederror) | Placeholder for unimplemented code paths |
157
- | [`TimeoutError`](docs/errors.md#timeouterror) | Thrown when a wait loop exceeds its attempt limit |
158
-
159
- ---
160
-
161
- ## Zip
162
-
163
- ZIP archive reading, writing, and compression via `@zip.js/zip.js`.
164
-
165
- [Full documentation](docs/zip.md)
166
-
167
- | Symbol | Description |
168
- |--------|-------------|
169
- | [`ZipArchive`](docs/zip.md#ziparchive) | Read, write, and compress ZIP archives with `await using` support |
170
- | [`ZipArchiveProgress`](docs/zip.md#ziparchive) | Progress callback interface for `extractAll` |