extra-utils 5.1.1 → 5.3.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/CHANGELOG.md +538 -0
- package/LICENSE +0 -0
- package/README.md +8 -0
- package/lib/array/index.d.ts +2 -2
- package/lib/array/index.js +2 -2
- package/lib/array/is-array.d.ts +2 -2
- package/lib/array/is-array.js +6 -6
- package/lib/array/is-empty-array.d.ts +3 -3
- package/lib/array/is-empty-array.js +6 -6
- package/lib/array-like/first.d.ts +1 -0
- package/lib/array-like/first.js +6 -0
- package/lib/array-like/first.js.map +1 -0
- package/lib/array-like/index.d.ts +2 -0
- package/lib/array-like/index.js +3 -0
- package/lib/array-like/index.js.map +1 -0
- package/lib/array-like/last.d.ts +1 -0
- package/lib/array-like/last.js +6 -0
- package/lib/array-like/last.js.map +1 -0
- package/lib/boolean/index.d.ts +2 -2
- package/lib/boolean/index.js +2 -2
- package/lib/boolean/is-boolean.d.ts +2 -2
- package/lib/boolean/is-boolean.js +6 -6
- package/lib/boolean/is-falsy.d.ts +3 -3
- package/lib/boolean/is-falsy.js +6 -6
- package/lib/in-enum.d.ts +2 -2
- package/lib/in-enum.js +6 -6
- package/lib/index.d.ts +15 -14
- package/lib/index.js +15 -14
- package/lib/index.js.map +1 -1
- package/lib/is-date.d.ts +2 -2
- package/lib/is-date.js +6 -6
- package/lib/is-function.d.ts +2 -2
- package/lib/is-function.js +6 -6
- package/lib/is-regexp.d.ts +2 -2
- package/lib/is-regexp.js +6 -6
- package/lib/is-symbol.d.ts +2 -2
- package/lib/is-symbol.js +6 -6
- package/lib/json/index.d.ts +2 -2
- package/lib/json/index.js +2 -2
- package/lib/json/is-json-serializable.d.ts +3 -3
- package/lib/json/is-json-serializable.js +10 -10
- package/lib/json/is-json-value.d.ts +3 -3
- package/lib/json/is-json-value.js +17 -17
- package/lib/nullish/index.d.ts +3 -3
- package/lib/nullish/index.js +3 -3
- package/lib/nullish/is-null.d.ts +2 -2
- package/lib/nullish/is-null.js +6 -6
- package/lib/nullish/is-nullish.d.ts +3 -3
- package/lib/nullish/is-nullish.js +9 -9
- package/lib/nullish/is-undefined.d.ts +2 -2
- package/lib/nullish/is-undefined.js +6 -6
- package/lib/number/index.d.ts +5 -5
- package/lib/number/index.js +5 -5
- package/lib/number/is-bigint.d.ts +2 -2
- package/lib/number/is-bigint.js +6 -6
- package/lib/number/is-finite.d.ts +1 -1
- package/lib/number/is-finite.js +3 -3
- package/lib/number/is-infinity.d.ts +2 -2
- package/lib/number/is-infinity.js +6 -6
- package/lib/number/is-nan.d.ts +2 -2
- package/lib/number/is-nan.js +6 -6
- package/lib/number/is-number.d.ts +2 -2
- package/lib/number/is-number.js +6 -6
- package/lib/object/index.d.ts +3 -3
- package/lib/object/index.js +3 -3
- package/lib/object/is-empty-object.d.ts +2 -2
- package/lib/object/is-empty-object.js +6 -6
- package/lib/object/is-object.d.ts +2 -2
- package/lib/object/is-object.js +7 -7
- package/lib/object/is-plain-object.d.ts +2 -2
- package/lib/object/is-plain-object.js +7 -7
- package/lib/pipe-async.d.ts +44 -44
- package/lib/pipe-async.js +7 -7
- package/lib/pipe.d.ts +43 -43
- package/lib/pipe.js +7 -7
- package/lib/string/index.d.ts +8 -7
- package/lib/string/index.js +8 -7
- package/lib/string/index.js.map +1 -1
- package/lib/string/is-char.d.ts +2 -2
- package/lib/string/is-char.js +8 -8
- package/lib/string/is-string.d.ts +2 -2
- package/lib/string/is-string.js +6 -6
- package/lib/string/is-url-string.d.ts +2 -2
- package/lib/string/is-url-string.js +12 -12
- package/lib/string/remove-blank-lines.d.ts +1 -1
- package/lib/string/remove-blank-lines.js +7 -7
- package/lib/string/remove-extra-indents.d.ts +3 -3
- package/lib/string/remove-extra-indents.js +20 -20
- package/lib/string/remove-leading-blank-lines.d.ts +1 -1
- package/lib/string/remove-leading-blank-lines.js +12 -12
- package/lib/string/remove-trailing-blank-lines.d.ts +1 -1
- package/lib/string/remove-trailing-blank-lines.js +12 -12
- package/lib/string/to-string.d.ts +1 -0
- package/lib/string/to-string.js +4 -0
- package/lib/string/to-string.js.map +1 -0
- package/lib/string/utils.d.ts +2 -2
- package/lib/string/utils.js +6 -6
- package/package.json +14 -14
- package/src/array-like/first.ts +5 -0
- package/src/array-like/index.ts +2 -0
- package/src/array-like/last.ts +5 -0
- package/src/index.ts +1 -0
- package/src/string/index.ts +1 -0
- package/src/string/to-string.ts +3 -0
package/CHANGELOG.md
ADDED
|
@@ -0,0 +1,538 @@
|
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.
|
|
4
|
+
|
|
5
|
+
## [5.3.0](https://github.com/BlackGlory/extra-utils/compare/v5.2.0...v5.3.0) (2023-06-14)
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
### Features
|
|
9
|
+
|
|
10
|
+
* add `first`, `last` ([ff73b28](https://github.com/BlackGlory/extra-utils/commit/ff73b28b4b81c2b374691f0150089e29894f999a))
|
|
11
|
+
|
|
12
|
+
## [5.2.0](https://github.com/BlackGlory/extra-utils/compare/v5.1.1...v5.2.0) (2023-04-17)
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
### Features
|
|
16
|
+
|
|
17
|
+
* add `toString` ([8bb6a6e](https://github.com/BlackGlory/extra-utils/commit/8bb6a6e1a14b9b1b6a0c90d42455497a1c60e56a))
|
|
18
|
+
|
|
19
|
+
### [5.1.1](https://github.com/BlackGlory/extra-utils/compare/v5.1.0...v5.1.1) (2023-03-25)
|
|
20
|
+
|
|
21
|
+
## [5.1.0](https://github.com/BlackGlory/extra-utils/compare/v5.0.1...v5.1.0) (2023-02-18)
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
### Features
|
|
25
|
+
|
|
26
|
+
* add `pipeAsync` ([e10f0a5](https://github.com/BlackGlory/extra-utils/commit/e10f0a5bec22243de7c78101fa3853f3718e6323))
|
|
27
|
+
|
|
28
|
+
### [5.0.1](https://github.com/BlackGlory/extra-utils/compare/v5.0.0...v5.0.1) (2023-01-22)
|
|
29
|
+
|
|
30
|
+
## [5.0.0](https://github.com/BlackGlory/extra-utils/compare/v4.0.1...v5.0.0) (2023-01-21)
|
|
31
|
+
|
|
32
|
+
|
|
33
|
+
### ⚠ BREAKING CHANGES
|
|
34
|
+
|
|
35
|
+
* CommonJS => ESM
|
|
36
|
+
|
|
37
|
+
* commonjs => esm ([874df2f](https://github.com/BlackGlory/extra-utils/commit/874df2fc240ff8ef7337dd7380b6200e598bdabe))
|
|
38
|
+
|
|
39
|
+
### [4.0.1](https://github.com/BlackGlory/extra-utils/compare/v4.0.0...v4.0.1) (2023-01-21)
|
|
40
|
+
|
|
41
|
+
## [4.0.0](https://github.com/BlackGlory/extra-utils/compare/v3.7.0...v4.0.0) (2022-12-19)
|
|
42
|
+
|
|
43
|
+
|
|
44
|
+
### ⚠ BREAKING CHANGES
|
|
45
|
+
|
|
46
|
+
* - Renamed `isJson` to `isJSONValue`
|
|
47
|
+
- Renamed `isntJson` to `isntJSONValue`
|
|
48
|
+
- Renamed `isJsonable` to `isJSONSerializable`
|
|
49
|
+
- Renamed `isntJsonable` to `isntJSONSerializable`
|
|
50
|
+
|
|
51
|
+
* upgrade dependencies ([3cd7ea5](https://github.com/BlackGlory/extra-utils/commit/3cd7ea530b8fcc3830c52b824e8a8eebcd0df713))
|
|
52
|
+
|
|
53
|
+
## [3.7.0](https://github.com/BlackGlory/extra-utils/compare/v3.6.0...v3.7.0) (2022-12-14)
|
|
54
|
+
|
|
55
|
+
|
|
56
|
+
### Features
|
|
57
|
+
|
|
58
|
+
* add `maxRemovals` parameters ([9f7b5a4](https://github.com/BlackGlory/extra-utils/commit/9f7b5a48363691849ebc8b4eb62f7ba79dfd4909))
|
|
59
|
+
|
|
60
|
+
## [3.6.0](https://github.com/BlackGlory/extra-utils/compare/v3.5.1...v3.6.0) (2022-12-14)
|
|
61
|
+
|
|
62
|
+
|
|
63
|
+
### Features
|
|
64
|
+
|
|
65
|
+
* add removeExtraIndents, removeBlankLines, removeLeadingBlankLines, removeTrailingBlankLines ([6ab15c7](https://github.com/BlackGlory/extra-utils/commit/6ab15c79d9a5e2002a87f06a550ea1dfa9416ee5))
|
|
66
|
+
|
|
67
|
+
### [3.5.1](https://github.com/BlackGlory/extra-utils/compare/v3.5.0...v3.5.1) (2022-11-25)
|
|
68
|
+
|
|
69
|
+
|
|
70
|
+
### Bug Fixes
|
|
71
|
+
|
|
72
|
+
* signature overloads ([f08e450](https://github.com/BlackGlory/extra-utils/commit/f08e450542b0f724706f78aa13202cd54147259d))
|
|
73
|
+
|
|
74
|
+
## [3.5.0](https://github.com/BlackGlory/extra-utils/compare/v3.4.0...v3.5.0) (2022-11-24)
|
|
75
|
+
|
|
76
|
+
|
|
77
|
+
### Features
|
|
78
|
+
|
|
79
|
+
* improve `pipe` ([9a6cd3f](https://github.com/BlackGlory/extra-utils/commit/9a6cd3fd077442729ad9139fb7163ba68bb622ec))
|
|
80
|
+
|
|
81
|
+
## [3.4.0](https://github.com/BlackGlory/extra-utils/compare/v3.3.1...v3.4.0) (2022-11-24)
|
|
82
|
+
|
|
83
|
+
|
|
84
|
+
### Features
|
|
85
|
+
|
|
86
|
+
* add `isJsonable`, `isntJsonable` ([0d3a616](https://github.com/BlackGlory/extra-utils/commit/0d3a616e8e5017a2ef231c420f34efbdf056b2d1))
|
|
87
|
+
|
|
88
|
+
### [3.3.1](https://github.com/BlackGlory/extra-utils/compare/v3.3.0...v3.3.1) (2022-11-17)
|
|
89
|
+
|
|
90
|
+
## [3.3.0](https://github.com/BlackGlory/extra-utils/compare/v3.2.0...v3.3.0) (2022-11-07)
|
|
91
|
+
|
|
92
|
+
|
|
93
|
+
### Features
|
|
94
|
+
|
|
95
|
+
* improve `pipe` ([6be2b91](https://github.com/BlackGlory/extra-utils/commit/6be2b91b016d655b88c41101cb3c263e086182cc))
|
|
96
|
+
|
|
97
|
+
## [3.2.0](https://github.com/BlackGlory/extra-utils/compare/v3.1.0...v3.2.0) (2022-11-07)
|
|
98
|
+
|
|
99
|
+
|
|
100
|
+
### Features
|
|
101
|
+
|
|
102
|
+
* improve `pipe` ([9ea0a2e](https://github.com/BlackGlory/extra-utils/commit/9ea0a2ec7870419ad6cb0f648e2f3686c59f43a2))
|
|
103
|
+
|
|
104
|
+
## [3.1.0](https://github.com/BlackGlory/extra-utils/compare/v3.0.0...v3.1.0) (2022-11-07)
|
|
105
|
+
|
|
106
|
+
|
|
107
|
+
### Features
|
|
108
|
+
|
|
109
|
+
* improve `pipe` ([ad1823c](https://github.com/BlackGlory/extra-utils/commit/ad1823c8c047571c7f064f56c8305dd435540dab))
|
|
110
|
+
|
|
111
|
+
## [3.0.0](https://github.com/BlackGlory/extra-utils/compare/v2.0.0...v3.0.0) (2022-11-07)
|
|
112
|
+
|
|
113
|
+
|
|
114
|
+
### ⚠ BREAKING CHANGES
|
|
115
|
+
|
|
116
|
+
* - Renamed `isURL` to `isURLString`
|
|
117
|
+
|
|
118
|
+
### Features
|
|
119
|
+
|
|
120
|
+
* add `isntURLString`, `notInEnum` ([71e3bc5](https://github.com/BlackGlory/extra-utils/commit/71e3bc5ae672f3a01b75c0063dc33217f1a97105))
|
|
121
|
+
|
|
122
|
+
## [2.0.0](https://github.com/BlackGlory/extra-utils/compare/v1.4.0...v2.0.0) (2022-11-07)
|
|
123
|
+
|
|
124
|
+
|
|
125
|
+
### ⚠ BREAKING CHANGES
|
|
126
|
+
|
|
127
|
+
* Removed `isIterable`, `isAsyncIterable`, `isntIterable`, `isntAsyncIterable`
|
|
128
|
+
* Removed `isJsonable`, `isntJsonable`
|
|
129
|
+
* Renamed `isAbsoluteURL` to `isURL`
|
|
130
|
+
* Removed `isPromise`, `isPromiseLike`, `isntPromise`, `isntPromiseLike`
|
|
131
|
+
* Removed ES2015 support
|
|
132
|
+
|
|
133
|
+
### Features
|
|
134
|
+
|
|
135
|
+
* add `pipe` ([837ec79](https://github.com/BlackGlory/extra-utils/commit/837ec791520bea612b2945f10cc0a0cc92d09f48))
|
|
136
|
+
|
|
137
|
+
|
|
138
|
+
* remove `isIterable`, `isAsyncIterable`, `isntIterable`, `isntAsyncIterable` ([47a2923](https://github.com/BlackGlory/extra-utils/commit/47a29231b042e20e7279fab9c0e2a66926708e8d))
|
|
139
|
+
* remove `isJsonable`, `isntJsonable` ([35e2d5e](https://github.com/BlackGlory/extra-utils/commit/35e2d5e235748609d8dea6b8e684770e00f2c8cc))
|
|
140
|
+
* remove `isPromise`, `isPromiseLike`, `isntPromise`, `isntPromiseLike` ([a3362f7](https://github.com/BlackGlory/extra-utils/commit/a3362f74d30a5a7c6adf97719132b167319ef152))
|
|
141
|
+
* remove ES2015 support ([c13bca6](https://github.com/BlackGlory/extra-utils/commit/c13bca637ae94ec8e69ac78b187b0c3eee015fb5))
|
|
142
|
+
* rename `isAbsoluteURL` to `isURL` ([757839e](https://github.com/BlackGlory/extra-utils/commit/757839e500ca732461b77e745692f16da4855d81))
|
|
143
|
+
|
|
144
|
+
## [1.4.0](https://github.com/BlackGlory/types/compare/v1.3.0...v1.4.0) (2022-10-30)
|
|
145
|
+
|
|
146
|
+
|
|
147
|
+
### Features
|
|
148
|
+
|
|
149
|
+
* add `isNullish`, `isntNullish` ([d55d412](https://github.com/BlackGlory/types/commit/d55d412824c9e4f191751d0914194a83667b0afd))
|
|
150
|
+
|
|
151
|
+
## [1.3.0](https://github.com/BlackGlory/types/compare/v1.2.1...v1.3.0) (2022-08-23)
|
|
152
|
+
|
|
153
|
+
|
|
154
|
+
### Features
|
|
155
|
+
|
|
156
|
+
* add isSymbol, isntSymbol ([e1e8bbb](https://github.com/BlackGlory/types/commit/e1e8bbb4cb4760a46a6d603229593d799277e841))
|
|
157
|
+
|
|
158
|
+
### [1.2.1](https://github.com/BlackGlory/types/compare/v1.2.0...v1.2.1) (2022-07-22)
|
|
159
|
+
|
|
160
|
+
## [1.2.0](https://github.com/BlackGlory/types/compare/v1.1.0...v1.2.0) (2022-06-21)
|
|
161
|
+
|
|
162
|
+
|
|
163
|
+
### Features
|
|
164
|
+
|
|
165
|
+
* add isRegExp, isntRegExp ([d1cfc5b](https://github.com/BlackGlory/types/commit/d1cfc5b962eb4564b5157c1e5c50810540705aa3))
|
|
166
|
+
|
|
167
|
+
## [1.1.0](https://github.com/BlackGlory/types/compare/v1.0.1...v1.1.0) (2022-04-07)
|
|
168
|
+
|
|
169
|
+
|
|
170
|
+
### Features
|
|
171
|
+
|
|
172
|
+
* add isFinity, isPositiveInfinity, isNegativeInfinity, isNaN, isntNaN ([d0f2fc5](https://github.com/BlackGlory/types/commit/d0f2fc5baf4de93bf698b80211323dd8d2013637))
|
|
173
|
+
|
|
174
|
+
### [1.0.1](https://github.com/BlackGlory/types/compare/v1.0.0...v1.0.1) (2022-03-23)
|
|
175
|
+
|
|
176
|
+
## [1.0.0](https://github.com/BlackGlory/types/compare/v0.6.5...v1.0.0) (2022-03-05)
|
|
177
|
+
|
|
178
|
+
|
|
179
|
+
### ⚠ BREAKING CHANGES
|
|
180
|
+
|
|
181
|
+
* remove isJsonRpcNotification, isntJsonRpcNotification,
|
|
182
|
+
isJsonRpcRequest, isntJsonRpcRequest, isJsonRpcSuccess,
|
|
183
|
+
isntJsonRpcSuccess, isJsonRpcError, isntJsonRpcError
|
|
184
|
+
|
|
185
|
+
### Features
|
|
186
|
+
|
|
187
|
+
* add isPromise, isntPromise, isPromiseLike, isntPromiseLike ([810f5ae](https://github.com/BlackGlory/types/commit/810f5ae160da6e9a232df58fd4cc9e6909085c16))
|
|
188
|
+
* rewrite isJson, isntJson, add isJsonable, isntJsonable ([35a2242](https://github.com/BlackGlory/types/commit/35a224292c7c361e2239519397529a4d74104d13))
|
|
189
|
+
|
|
190
|
+
### [0.6.5](https://github.com/BlackGlory/types/compare/v0.6.4...v0.6.5) (2022-01-05)
|
|
191
|
+
|
|
192
|
+
### [0.6.4](https://github.com/BlackGlory/types/compare/v0.6.3...v0.6.4) (2021-12-17)
|
|
193
|
+
|
|
194
|
+
|
|
195
|
+
### Features
|
|
196
|
+
|
|
197
|
+
* improve parameters ([3e445d0](https://github.com/BlackGlory/types/commit/3e445d0d1520897bda0b1ef0d5b5d00091f025b7))
|
|
198
|
+
|
|
199
|
+
### [0.6.3](https://github.com/BlackGlory/types/compare/v0.6.2...v0.6.3) (2021-12-16)
|
|
200
|
+
|
|
201
|
+
|
|
202
|
+
### Features
|
|
203
|
+
|
|
204
|
+
* improve type assertions ([6043e3d](https://github.com/BlackGlory/types/commit/6043e3dd565130e3a0086204f61e2e985bc3332c))
|
|
205
|
+
|
|
206
|
+
### [0.6.2](https://github.com/BlackGlory/types/compare/v0.6.1...v0.6.2) (2021-12-16)
|
|
207
|
+
|
|
208
|
+
### [0.6.1](https://github.com/BlackGlory/types/compare/v0.6.0...v0.6.1) (2021-12-16)
|
|
209
|
+
|
|
210
|
+
|
|
211
|
+
### Features
|
|
212
|
+
|
|
213
|
+
* replace object with Record ([ee749a9](https://github.com/BlackGlory/types/commit/ee749a9117760e3b76516e4bdd5c8262461e2189))
|
|
214
|
+
|
|
215
|
+
## [0.6.0](https://github.com/BlackGlory/types/compare/v0.5.2...v0.6.0) (2021-12-15)
|
|
216
|
+
|
|
217
|
+
|
|
218
|
+
### ⚠ BREAKING CHANGES
|
|
219
|
+
|
|
220
|
+
* - `isRecord` removed.
|
|
221
|
+
- The signatures of `isEmptyObject`, `isntEmptyObject` changed.
|
|
222
|
+
|
|
223
|
+
### Features
|
|
224
|
+
|
|
225
|
+
* add isPlainObject, isntPlainObject ([13ce952](https://github.com/BlackGlory/types/commit/13ce952a69fa59e079389f5099d3faa60cde1d96))
|
|
226
|
+
|
|
227
|
+
### [0.5.2](https://github.com/BlackGlory/types/compare/v0.5.1...v0.5.2) (2021-10-19)
|
|
228
|
+
|
|
229
|
+
|
|
230
|
+
### Features
|
|
231
|
+
|
|
232
|
+
* improve isJsonRpcSuccess ([2fe1247](https://github.com/BlackGlory/types/commit/2fe1247c22a7e3f0406a8938f640fc49c2b2e603))
|
|
233
|
+
|
|
234
|
+
### [0.5.1](https://github.com/BlackGlory/types/compare/v0.5.0...v0.5.1) (2021-09-22)
|
|
235
|
+
|
|
236
|
+
|
|
237
|
+
### Features
|
|
238
|
+
|
|
239
|
+
* add isError, isntError ([2d9e40f](https://github.com/BlackGlory/types/commit/2d9e40fa43af128311723454381d59726c68db49))
|
|
240
|
+
|
|
241
|
+
## [0.5.0](https://github.com/BlackGlory/types/compare/v0.4.7...v0.5.0) (2021-08-28)
|
|
242
|
+
|
|
243
|
+
|
|
244
|
+
### ⚠ BREAKING CHANGES
|
|
245
|
+
|
|
246
|
+
* - `isCharPrimitive` is removed
|
|
247
|
+
- `isntCharPrimitive` is removed
|
|
248
|
+
- `isCharObject` is removed
|
|
249
|
+
- `isntCharObject`
|
|
250
|
+
- `isStringPrimitive` is removed
|
|
251
|
+
- `isntStringPrimitive` is removed
|
|
252
|
+
- `isStringObject` is removed
|
|
253
|
+
- `isntStringObject` is removed
|
|
254
|
+
|
|
255
|
+
### Features
|
|
256
|
+
|
|
257
|
+
* remove unused functions ([5bd4704](https://github.com/BlackGlory/types/commit/5bd4704ecd172031eca852e5594ae0fb1779159a))
|
|
258
|
+
|
|
259
|
+
### [0.4.7](https://github.com/BlackGlory/types/compare/v0.4.6...v0.4.7) (2021-07-10)
|
|
260
|
+
|
|
261
|
+
|
|
262
|
+
### Features
|
|
263
|
+
|
|
264
|
+
* add isBigInt, isntBigInt ([1c66209](https://github.com/BlackGlory/types/commit/1c662092f2d05963696c99325f35b121a78cbddd))
|
|
265
|
+
|
|
266
|
+
### [0.4.6](https://github.com/BlackGlory/types/compare/v0.4.5...v0.4.6) (2021-07-03)
|
|
267
|
+
|
|
268
|
+
### [0.4.5](https://github.com/BlackGlory/types/compare/v0.4.4...v0.4.5) (2021-06-30)
|
|
269
|
+
|
|
270
|
+
|
|
271
|
+
### Bug Fixes
|
|
272
|
+
|
|
273
|
+
* inEnum ([bff8c7c](https://github.com/BlackGlory/types/commit/bff8c7c47da1564b983e7b21abc276314c395295))
|
|
274
|
+
|
|
275
|
+
### [0.4.4](https://github.com/BlackGlory/types/compare/v0.4.3...v0.4.4) (2021-06-30)
|
|
276
|
+
|
|
277
|
+
|
|
278
|
+
### Features
|
|
279
|
+
|
|
280
|
+
* add inEnum ([c1a0736](https://github.com/BlackGlory/types/commit/c1a07364792242894a4d1d3dd1e24838e6e9844b))
|
|
281
|
+
* add isEmptyArray, isntEmptyArray ([a47d6f8](https://github.com/BlackGlory/types/commit/a47d6f80339bf2288a8e2c5b5a7d2c3ca6302850))
|
|
282
|
+
* add isEmptyObject, isntEmptyObject ([9c430ad](https://github.com/BlackGlory/types/commit/9c430addea77b02df9df5801d27916c72ed1baff))
|
|
283
|
+
|
|
284
|
+
### [0.4.3](https://github.com/BlackGlory/types/compare/v0.4.2...v0.4.3) (2021-06-04)
|
|
285
|
+
|
|
286
|
+
|
|
287
|
+
### Features
|
|
288
|
+
|
|
289
|
+
* add isArray, isntArray ([a57e048](https://github.com/BlackGlory/types/commit/a57e0483021d486b109300eaad5249da2fcad90c))
|
|
290
|
+
|
|
291
|
+
|
|
292
|
+
### Bug Fixes
|
|
293
|
+
|
|
294
|
+
* isntIterable ([2c0e437](https://github.com/BlackGlory/types/commit/2c0e4370f3d1481a1d96d9bb16fd5074e8670148))
|
|
295
|
+
|
|
296
|
+
### [0.4.2](https://github.com/BlackGlory/types/compare/v0.4.1...v0.4.2) (2021-04-04)
|
|
297
|
+
|
|
298
|
+
|
|
299
|
+
### Features
|
|
300
|
+
|
|
301
|
+
* add isBoolean, isntBoolean ([c8740aa](https://github.com/BlackGlory/types/commit/c8740aa41215d63ef33adde44e81040125d127cc))
|
|
302
|
+
|
|
303
|
+
### [0.4.1](https://github.com/BlackGlory/types/compare/v0.4.0...v0.4.1) (2021-03-17)
|
|
304
|
+
|
|
305
|
+
## [0.4.0](https://github.com/BlackGlory/types/compare/v0.3.3...v0.4.0) (2021-03-17)
|
|
306
|
+
|
|
307
|
+
|
|
308
|
+
### ⚠ BREAKING CHANGES
|
|
309
|
+
|
|
310
|
+
* rewrite
|
|
311
|
+
|
|
312
|
+
### Features
|
|
313
|
+
|
|
314
|
+
* rewrite ([7f9c8ec](https://github.com/BlackGlory/types/commit/7f9c8ec3a48a115bcf24dc857db89d10d8130f08))
|
|
315
|
+
|
|
316
|
+
### [0.3.3](https://github.com/BlackGlory/types/compare/v0.3.2...v0.3.3) (2021-03-08)
|
|
317
|
+
|
|
318
|
+
|
|
319
|
+
### Features
|
|
320
|
+
|
|
321
|
+
* add Nullable ([0629b85](https://github.com/BlackGlory/types/commit/0629b859a531faccb85e71a662b9c8621cfc2ed0))
|
|
322
|
+
|
|
323
|
+
### [0.3.2](https://github.com/BlackGlory/types/compare/v0.3.1...v0.3.2) (2021-03-08)
|
|
324
|
+
|
|
325
|
+
|
|
326
|
+
### Features
|
|
327
|
+
|
|
328
|
+
* add UnboxPromise, UnboxPromiseLike ([36ba941](https://github.com/BlackGlory/types/commit/36ba9414996e85caa324cb8d8c3eb99dca01d5a8))
|
|
329
|
+
|
|
330
|
+
### [0.3.1](https://github.com/BlackGlory/types/compare/v0.3.0...v0.3.1) (2021-03-06)
|
|
331
|
+
|
|
332
|
+
|
|
333
|
+
### Features
|
|
334
|
+
|
|
335
|
+
* add isDate, isntDate ([7f3df8b](https://github.com/BlackGlory/types/commit/7f3df8b334de32edc27bfae1505480572102ba9a))
|
|
336
|
+
|
|
337
|
+
## [0.3.0](https://github.com/BlackGlory/types/compare/v0.2.25...v0.3.0) (2021-03-05)
|
|
338
|
+
|
|
339
|
+
|
|
340
|
+
### ⚠ BREAKING CHANGES
|
|
341
|
+
|
|
342
|
+
* remove isPromise, isPromiseLike, isntPromise, isntPromiseLike,
|
|
343
|
+
isDocument, isElement, isntDocument, isntElement,
|
|
344
|
+
isNodeJSWritableStream, isNodeReadableStream,
|
|
345
|
+
isntNodeJSWritableStream, isntNodeJSReadableStream
|
|
346
|
+
|
|
347
|
+
### Features
|
|
348
|
+
|
|
349
|
+
* move functions to extra-dom, extra-promise, extra-stream ([6e5b169](https://github.com/BlackGlory/types/commit/6e5b16950341270549b35b295c2c6551e12e454e))
|
|
350
|
+
|
|
351
|
+
### [0.2.25](https://github.com/BlackGlory/types/compare/v0.2.24...v0.2.25) (2021-03-05)
|
|
352
|
+
|
|
353
|
+
### [0.2.24](https://github.com/BlackGlory/types/compare/v0.2.23...v0.2.24) (2021-03-05)
|
|
354
|
+
|
|
355
|
+
### [0.2.23](https://github.com/BlackGlory/types/compare/v0.2.22...v0.2.23) (2021-02-28)
|
|
356
|
+
|
|
357
|
+
|
|
358
|
+
### Features
|
|
359
|
+
|
|
360
|
+
* add higher-order types ([9096402](https://github.com/BlackGlory/types/commit/909640269b88a82d43532d4150b3159261dd337b))
|
|
361
|
+
|
|
362
|
+
### [0.2.22](https://github.com/BlackGlory/types/compare/v0.2.21...v0.2.22) (2021-02-28)
|
|
363
|
+
|
|
364
|
+
|
|
365
|
+
### Features
|
|
366
|
+
|
|
367
|
+
* add Constructor, ReturnTypeOfConstructor ([d49b0d1](https://github.com/BlackGlory/types/commit/d49b0d1d1ef6d44324bd22f40b6cc4089a96279c))
|
|
368
|
+
|
|
369
|
+
### [0.2.21](https://github.com/BlackGlory/types/compare/v0.2.20...v0.2.21) (2021-02-28)
|
|
370
|
+
|
|
371
|
+
|
|
372
|
+
### Bug Fixes
|
|
373
|
+
|
|
374
|
+
* exports ([4b51b3d](https://github.com/BlackGlory/types/commit/4b51b3dfc332adfb3aada944f0f9a7672bed04b0))
|
|
375
|
+
|
|
376
|
+
### [0.2.20](https://github.com/BlackGlory/types/compare/v0.2.19...v0.2.20) (2021-02-28)
|
|
377
|
+
|
|
378
|
+
|
|
379
|
+
### Features
|
|
380
|
+
|
|
381
|
+
* add WithDefaultType ([6187404](https://github.com/BlackGlory/types/commit/61874049dff68c0432bb276010bdf519ce6078f6))
|
|
382
|
+
|
|
383
|
+
### [0.2.19](https://github.com/BlackGlory/types/compare/v0.2.18...v0.2.19) (2021-02-28)
|
|
384
|
+
|
|
385
|
+
|
|
386
|
+
### Features
|
|
387
|
+
|
|
388
|
+
* add array, object interfaces ([d91e3b1](https://github.com/BlackGlory/types/commit/d91e3b143bb01a8b291ced0007dfdbbd4c2805f5))
|
|
389
|
+
|
|
390
|
+
### [0.2.18](https://github.com/BlackGlory/types/compare/v0.2.17...v0.2.18) (2021-02-25)
|
|
391
|
+
|
|
392
|
+
### [0.2.17](https://github.com/BlackGlory/types/compare/v0.2.16...v0.2.17) (2021-02-24)
|
|
393
|
+
|
|
394
|
+
### [0.2.16](https://github.com/BlackGlory/types/compare/v0.2.15...v0.2.16) (2021-02-21)
|
|
395
|
+
|
|
396
|
+
|
|
397
|
+
### Features
|
|
398
|
+
|
|
399
|
+
* add functions ([1b05438](https://github.com/BlackGlory/types/commit/1b05438bd42bee1d8b9e29eb569482ca69c84a43))
|
|
400
|
+
|
|
401
|
+
### [0.2.15](https://github.com/BlackGlory/types/compare/v0.2.14...v0.2.15) (2021-02-10)
|
|
402
|
+
|
|
403
|
+
|
|
404
|
+
### Bug Fixes
|
|
405
|
+
|
|
406
|
+
* isNumber ([ea96935](https://github.com/BlackGlory/types/commit/ea96935f2b2c31aada327e6923acd2aba5026628))
|
|
407
|
+
|
|
408
|
+
### [0.2.14](https://github.com/BlackGlory/types/compare/v0.2.13...v0.2.14) (2021-02-04)
|
|
409
|
+
|
|
410
|
+
|
|
411
|
+
### Bug Fixes
|
|
412
|
+
|
|
413
|
+
* bundle ([2a05c84](https://github.com/BlackGlory/types/commit/2a05c8475d36e64f82bcada05fa7f9d820964f91))
|
|
414
|
+
|
|
415
|
+
### [0.2.13](https://github.com/BlackGlory/types/compare/v0.2.12...v0.2.13) (2021-02-04)
|
|
416
|
+
|
|
417
|
+
### [0.2.12](https://github.com/BlackGlory/types/compare/v0.2.11...v0.2.12) (2021-02-03)
|
|
418
|
+
|
|
419
|
+
### [0.2.11](https://github.com/BlackGlory/types/compare/v0.2.10...v0.2.11) (2021-01-31)
|
|
420
|
+
|
|
421
|
+
### [0.2.10](https://github.com/BlackGlory/types/compare/v0.2.9...v0.2.10) (2021-01-31)
|
|
422
|
+
|
|
423
|
+
|
|
424
|
+
### Features
|
|
425
|
+
|
|
426
|
+
* add Node.js support ([2c76829](https://github.com/BlackGlory/types/commit/2c76829f86f82881e16abdd93f89cf8577e24ec8))
|
|
427
|
+
|
|
428
|
+
### [0.2.9](https://github.com/BlackGlory/types/compare/v0.2.8...v0.2.9) (2021-01-20)
|
|
429
|
+
|
|
430
|
+
|
|
431
|
+
### Bug Fixes
|
|
432
|
+
|
|
433
|
+
* es2018 build ([e4d9820](https://github.com/BlackGlory/types/commit/e4d982079193e18b09e5bae7db42ab95e7c6ef2c))
|
|
434
|
+
|
|
435
|
+
### [0.2.8](https://github.com/BlackGlory/types/compare/v0.2.7...v0.2.8) (2021-01-20)
|
|
436
|
+
|
|
437
|
+
### [0.2.7](https://github.com/BlackGlory/types/compare/v0.2.6...v0.2.7) (2021-01-16)
|
|
438
|
+
|
|
439
|
+
|
|
440
|
+
### Features
|
|
441
|
+
|
|
442
|
+
* add isElement, isDocument ([e9cb820](https://github.com/BlackGlory/types/commit/e9cb8207bef007e020d0c0ad2db4d35d2780c635))
|
|
443
|
+
|
|
444
|
+
### [0.2.6](https://github.com/BlackGlory/types/compare/v0.2.5...v0.2.6) (2021-01-15)
|
|
445
|
+
|
|
446
|
+
|
|
447
|
+
### Bug Fixes
|
|
448
|
+
|
|
449
|
+
* esm bundle ([ec2da0b](https://github.com/BlackGlory/types/commit/ec2da0b5db7344e9a4c08066b5bb123488467928))
|
|
450
|
+
|
|
451
|
+
### [0.2.5](https://github.com/BlackGlory/types/compare/v0.2.4...v0.2.5) (2021-01-11)
|
|
452
|
+
|
|
453
|
+
|
|
454
|
+
### Features
|
|
455
|
+
|
|
456
|
+
* add isAbsoluteURL ([0d15610](https://github.com/BlackGlory/types/commit/0d1561036646d08b9c7a1fdf5423ccea4d7c34fe))
|
|
457
|
+
|
|
458
|
+
### [0.2.4](https://github.com/BlackGlory/types/compare/v0.2.3...v0.2.4) (2021-01-04)
|
|
459
|
+
|
|
460
|
+
|
|
461
|
+
### Bug Fixes
|
|
462
|
+
|
|
463
|
+
* target ([06bb624](https://github.com/BlackGlory/types/commit/06bb624a6bffdb700028966f41fbdcd17df3eee8))
|
|
464
|
+
|
|
465
|
+
### [0.2.3](https://github.com/BlackGlory/types/compare/v0.2.2...v0.2.3) (2021-01-04)
|
|
466
|
+
|
|
467
|
+
### [0.2.2](https://github.com/BlackGlory/types/compare/v0.2.1...v0.2.2) (2021-01-04)
|
|
468
|
+
|
|
469
|
+
|
|
470
|
+
### Bug Fixes
|
|
471
|
+
|
|
472
|
+
* bundle ([39df724](https://github.com/BlackGlory/types/commit/39df724cec417a81845a0357799f7124fdafc56f))
|
|
473
|
+
|
|
474
|
+
### [0.2.1](https://github.com/BlackGlory/types/compare/v0.2.0...v0.2.1) (2020-12-26)
|
|
475
|
+
|
|
476
|
+
|
|
477
|
+
### Features
|
|
478
|
+
|
|
479
|
+
* add Getter, Setter ([42fc6e8](https://github.com/BlackGlory/types/commit/42fc6e8dfd71b30cc63affe0897d2cb5c5a63fb9))
|
|
480
|
+
|
|
481
|
+
## [0.2.0](https://github.com/BlackGlory/types/compare/v0.1.12...v0.2.0) (2020-12-24)
|
|
482
|
+
|
|
483
|
+
|
|
484
|
+
### ⚠ BREAKING CHANGES
|
|
485
|
+
|
|
486
|
+
* use `instanceof` for HTMLElement
|
|
487
|
+
|
|
488
|
+
### Features
|
|
489
|
+
|
|
490
|
+
* remove type guards for HTMLElement ([0a89641](https://github.com/BlackGlory/types/commit/0a89641d8b737de21a4162713b832c34757825a6))
|
|
491
|
+
|
|
492
|
+
### [0.1.12](https://github.com/BlackGlory/types/compare/v0.1.11...v0.1.12) (2020-12-24)
|
|
493
|
+
|
|
494
|
+
|
|
495
|
+
### Features
|
|
496
|
+
|
|
497
|
+
* add HTMLElement type guards ([6f33d30](https://github.com/BlackGlory/types/commit/6f33d30fd69e308b21e9a68e709c9c2f62eafc4a))
|
|
498
|
+
|
|
499
|
+
### [0.1.11](https://github.com/BlackGlory/types/compare/v0.1.10...v0.1.11) (2020-12-20)
|
|
500
|
+
|
|
501
|
+
### [0.1.10](https://github.com/BlackGlory/types/compare/v0.1.9...v0.1.10) (2020-12-19)
|
|
502
|
+
|
|
503
|
+
|
|
504
|
+
### Features
|
|
505
|
+
|
|
506
|
+
* add JsonRpc ([c417108](https://github.com/BlackGlory/types/commit/c417108224d2d1b6722c6ba45c4ed95b6eda15b7))
|
|
507
|
+
|
|
508
|
+
### [0.1.9](https://github.com/BlackGlory/types/compare/v0.1.8...v0.1.9) (2020-12-14)
|
|
509
|
+
|
|
510
|
+
|
|
511
|
+
### Features
|
|
512
|
+
|
|
513
|
+
* add Dict interface ([0e8054a](https://github.com/BlackGlory/types/commit/0e8054af97461e352060f7f867e8cf159676005d))
|
|
514
|
+
|
|
515
|
+
### [0.1.8](https://github.com/BlackGlory/types/compare/v0.1.7...v0.1.8) (2020-12-04)
|
|
516
|
+
|
|
517
|
+
|
|
518
|
+
### Features
|
|
519
|
+
|
|
520
|
+
* add Falsy ([bd4ed11](https://github.com/BlackGlory/types/commit/bd4ed113008a52710bf7ea7230e58e6f607e5d64))
|
|
521
|
+
|
|
522
|
+
### [0.1.7](https://github.com/BlackGlory/types/compare/v0.1.6...v0.1.7) (2020-11-30)
|
|
523
|
+
|
|
524
|
+
|
|
525
|
+
### Features
|
|
526
|
+
|
|
527
|
+
* add json and others ([bf4eabd](https://github.com/BlackGlory/types/commit/bf4eabd8fe6e4eb91e73637d559b34cae01bf118))
|
|
528
|
+
|
|
529
|
+
### [0.1.6](https://github.com/BlackGlory/types/compare/v0.1.5...v0.1.6) (2020-11-21)
|
|
530
|
+
|
|
531
|
+
### [0.1.5](https://github.com/BlackGlory/types/compare/v0.1.4...v0.1.5) (2020-11-21)
|
|
532
|
+
|
|
533
|
+
### [0.1.4](https://github.com/BlackGlory/types/compare/v0.1.3...v0.1.4) (2020-11-21)
|
|
534
|
+
|
|
535
|
+
|
|
536
|
+
### Features
|
|
537
|
+
|
|
538
|
+
* add isNodeJSWritableStream, isNodeJSReadableStream ([2e39b80](https://github.com/BlackGlory/types/commit/2e39b802ba3ac72cedb63c43c5370e0ce7d93940))
|
package/LICENSE
CHANGED
|
File without changes
|
package/README.md
CHANGED
|
@@ -9,6 +9,12 @@ yarn add extra-utils
|
|
|
9
9
|
```
|
|
10
10
|
|
|
11
11
|
## API
|
|
12
|
+
### ArrayLike
|
|
13
|
+
```ts
|
|
14
|
+
function first<T>(arr: ArrayLike<T>): T | undefined
|
|
15
|
+
function last<T>(arr: ArrayLike<T>): T | undefined
|
|
16
|
+
```
|
|
17
|
+
|
|
12
18
|
### Array
|
|
13
19
|
```ts
|
|
14
20
|
function isArray<T>(val: unknown): val is Array<T>
|
|
@@ -98,6 +104,8 @@ function isntChar(val: unknown): boolean
|
|
|
98
104
|
|
|
99
105
|
function isURLString(text: string): boolean
|
|
100
106
|
function isntURLString(text: string): boolean
|
|
107
|
+
|
|
108
|
+
function toString(val: unknown): string
|
|
101
109
|
```
|
|
102
110
|
|
|
103
111
|
#### removeExtraIndents
|
package/lib/array/index.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export * from './is-array.js';
|
|
2
|
-
export * from './is-empty-array.js';
|
|
1
|
+
export * from './is-array.js';
|
|
2
|
+
export * from './is-empty-array.js';
|
package/lib/array/index.js
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export * from './is-array.js';
|
|
2
|
-
export * from './is-empty-array.js';
|
|
1
|
+
export * from './is-array.js';
|
|
2
|
+
export * from './is-empty-array.js';
|
|
3
3
|
//# sourceMappingURL=index.js.map
|
package/lib/array/is-array.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare function isArray<T>(val: unknown): val is Array<T>;
|
|
2
|
-
export declare function isntArray<T>(val: T): val is Exclude<T, Array<unknown>>;
|
|
1
|
+
export declare function isArray<T>(val: unknown): val is Array<T>;
|
|
2
|
+
export declare function isntArray<T>(val: T): val is Exclude<T, Array<unknown>>;
|
package/lib/array/is-array.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
export function isArray(val) {
|
|
2
|
-
return Array.isArray(val);
|
|
3
|
-
}
|
|
4
|
-
export function isntArray(val) {
|
|
5
|
-
return !isArray(val);
|
|
6
|
-
}
|
|
1
|
+
export function isArray(val) {
|
|
2
|
+
return Array.isArray(val);
|
|
3
|
+
}
|
|
4
|
+
export function isntArray(val) {
|
|
5
|
+
return !isArray(val);
|
|
6
|
+
}
|
|
7
7
|
//# sourceMappingURL=is-array.js.map
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { NonEmptyArray } from 'justypes';
|
|
2
|
-
export declare function isEmptyArray(val: unknown[]): boolean;
|
|
3
|
-
export declare function isntEmptyArray<T>(val: T[]): val is NonEmptyArray<T>;
|
|
1
|
+
import { NonEmptyArray } from 'justypes';
|
|
2
|
+
export declare function isEmptyArray(val: unknown[]): boolean;
|
|
3
|
+
export declare function isntEmptyArray<T>(val: T[]): val is NonEmptyArray<T>;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
export function isEmptyArray(val) {
|
|
2
|
-
return val.length === 0;
|
|
3
|
-
}
|
|
4
|
-
export function isntEmptyArray(val) {
|
|
5
|
-
return val.length !== 0;
|
|
6
|
-
}
|
|
1
|
+
export function isEmptyArray(val) {
|
|
2
|
+
return val.length === 0;
|
|
3
|
+
}
|
|
4
|
+
export function isntEmptyArray(val) {
|
|
5
|
+
return val.length !== 0;
|
|
6
|
+
}
|
|
7
7
|
//# sourceMappingURL=is-empty-array.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function first<T>(arr: ArrayLike<T>): T | undefined;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"first.js","sourceRoot":"","sources":["../../src/array-like/first.ts"],"names":[],"mappings":"AAAA,MAAM,UAAU,KAAK,CAAI,GAAiB;IACxC,OAAO,GAAG,CAAC,MAAM;QACZ,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC;QACR,CAAC,CAAC,SAAS,CAAA;AAClB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/array-like/index.ts"],"names":[],"mappings":"AAAA,cAAc,YAAY,CAAA;AAC1B,cAAc,WAAW,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function last<T>(arr: ArrayLike<T>): T | undefined;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"last.js","sourceRoot":"","sources":["../../src/array-like/last.ts"],"names":[],"mappings":"AAAA,MAAM,UAAU,IAAI,CAAI,GAAiB;IACvC,OAAO,GAAG,CAAC,MAAM;QACZ,CAAC,CAAC,GAAG,CAAC,GAAG,CAAC,MAAM,GAAG,CAAC,CAAC;QACrB,CAAC,CAAC,SAAS,CAAA;AAClB,CAAC"}
|
package/lib/boolean/index.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export * from './is-boolean.js';
|
|
2
|
-
export * from './is-falsy.js';
|
|
1
|
+
export * from './is-boolean.js';
|
|
2
|
+
export * from './is-falsy.js';
|
package/lib/boolean/index.js
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export * from './is-boolean.js';
|
|
2
|
-
export * from './is-falsy.js';
|
|
1
|
+
export * from './is-boolean.js';
|
|
2
|
+
export * from './is-falsy.js';
|
|
3
3
|
//# sourceMappingURL=index.js.map
|