Repository navigation
v0.2.0
Minor Changes
-
47be3d5Thanks @andreww2012! - Narrowed the supported Node.js versions to^22.23.1 || ^24.18.0 || >=26.4.0(was^22.23.1 || >=24) and exportedpackage.jsonas/package.jsonsubpath -
9fe6fdbThanks @andreww2012! - Added the following new utilities fromms-tspackage:ms(miscgroup)Ms(typesgroup)
-
2fecdafThanks @andreww2012! - Added a newmisc/generateMailtoLinkutility -
ca6a52cThanks @andreww2012! - Added a newarray/arrayHasMaxElementsutility - the "at most" counterpart toarray/arrayHasMinElements- together with thetypes/ArrayWithMaxLengthtype powering its narrowing -
280d41eThanks @andreww2012! - Added the following new utilities fromtyped-query-selectorpackage, belonging to the newdomgroup:querySelectorTypedquerySelectorAllTypedclosestTypedElementFromSelector(type)ElementFromSelectorStrict(type)ElementFromTagName(type)
Added two opt-in side-effect entrypoints that type the native DOM lookup methods from the selector:
unutils/dom/query-selector-typed.globalunutils/dom/query-selector-typed-strict.global
You should import at most one of the two.
-
19ad83aThanks @andreww2012! - Added the following new utilities fromnanoidpackage, belonging to the newidgroup:nanoidnanoidFactoryNANOID_URL_ALPHABET(constant)
-
625e1a3Thanks @andreww2012! - Added two newmaputilities that mirror the nativeMap#getOrInsertandMap#getOrInsertComputedmethods, which are not yet widely available:mapGetOrInsert- returns the value stored under a key, inserting an eagerly built default first when the key is missingmapGetOrInsertComputed- the lazy counterpart, building the default only on a miss
Both return a non-optional value, so
mapGetOrInsertComputed(map, key, () => []).push(item)replaces the usual read-check-insert dance. -
2c764a4Thanks @andreww2012! - Updatedtype-festfrom v5.8.0 to v5.10.0:- Added
RenameKeys(as-is) andMaxNumberInUnion(renamed fromUnionMax) utilities
- Added
-
17d62efThanks @andreww2012! - Updatedes-toolkitfrom v1.49.0 to v1.52.0:- Added the following utilities:
objectgroup:freezeDeep(renamed fromdeepFreeze)mapKeysAsync(as-is)mapValuesAsync(as-is)
functiongroup:flowAsync(flowAsyncfromes-toolkit/fp, taking the functions as an array likeflow)toDisposable(consolidatesdeferanddeferAsync)
iterablegroup, from the newes-toolkit/iteratorentrypoint (all of them accept any iterable, not only iterators):generateSequence(renamed fromiterate)iterableCartesianProduct(renamed fromcartesianProduct)iterableChunks(renamed fromchunk)iterableCount(renamed fromcount)iterableDropWhile(renamed fromdropWhile)iterableFirst(renamed fromhead)iterablePartition(renamed frompartition)iterableRange(renamed fromrange)iterableScan(renamed fromscan)iterableTakeWhile(renamed fromtakeWhile)iterableTranspose(renamed fromzip)iterableUnique(renamed fromuniqBy)
mathgroup, from the newes-toolkit/bigintentrypoint:bigintMedian(consolidatesmedianandmedianBy)bigintPercentile(renamed frompercentile)bigintSum(consolidatessumandsumBy)
- The following utilities now also accept bigints, consolidated with their counterparts from the new
es-toolkit/bigintentrypoint: toConstantCaseKeysDeep,toKebabCaseKeysDeepandtoPascalCaseKeysDeepare now based on the newtoConstantCaseKeys,toKebabCaseKeysandtoPascalCaseKeys: non-ASCII letters are no longer treated as word boundaries, and class instances are kept as-is
- Added the following utilities:
-
3c743b5Thanks @andreww2012! - Updateddevaluefrom v5.8.1 to v6.0.2Added the following new utilities from
devaluepackage (jsongroup):structuredStringifyAsync(renamed fromstringifyAsync) - the promise-awaiting counterpart ofstructuredStringifyStructuredStringifyError(renamed fromDevalueError) - thrown bystructuredStringifyandstructuredStringifyAsyncstructuredFilterArrayIndexes(renamed fromfilterArrayIndices) - for customStructuredStringifyOperationsSTRUCTURED_STRINGIFY_DEFAULT_OPERATIONS(constant, renamed fromdefaultStringifyOperations) - defaultoperationsofstructuredStringifyandstructuredStringifyAsyncSTRUCTURED_PARSE_DEFAULT_OPERATIONS(constant, renamed fromdefaultParseOperations) - defaultoperationsofstructuredParseStructuredStringifyOptions(type, renamed fromStringifyOptions) - options ofstructuredStringifyandstructuredStringifyAsyncStructuredStringifyOperations(type, renamed fromStringifyOperations) -operationsoption ofstructuredStringifyandstructuredStringifyAsyncStructuredParseOptions(type, renamed fromParseOptions) - options ofstructuredParseStructuredParseOperations(type, renamed fromParseOperations) -operationsoption ofstructuredParse
Patch Changes
-
4154dfdThanks @andreww2012! - Updatednanoidfrom v6.0.1 to v6.0.2 -
36aec3bThanks @andreww2012! - Updatedarkregexfrom v0.0.8 to v0.0.12 -
9de1274Thanks @andreww2012! - FixedjsonParseAsyncandjsonStringifyAsync:jsonParseAsyncno longer rejects every input withReferenceError: chunk is not definedjsonStringifyAsyncnow matchesJSON.stringifyin more cases:- nested objects and arrays are indented correctly with
space spaceis limited like inJSON.stringify: strings are cut to 10 characters, and numbers are truncated- values with
toJSON(likeDate) no longer get extra whitespace, and the replacer gets them aftertoJSONis called - the replacer gets array indexes as strings, and a replacer array accepts numbers and skips duplicates
- control characters are escaped
- nested objects and arrays are indented correctly with
jsonStringifyAsyncnow respectsintensityinstead of always using1- Concurrent
jsonStringifyAsynccalls no longer mix up long strings or fail with "Circular Structure Detected"
-
1e232d0Thanks @andreww2012! - The package now declares thesideEffectsfield inpackage.json, so bundlers drop unused modules: for example, importing a single utility from the main entrypoint no longer adds ~19 KB of unused code to the bundle -
c15d096Thanks @andreww2012! - Updatedremedafrom v2.39.0 to v2.51.0 -
55cfbc6Thanks @andreww2012! - Updatedts-extrasfrom v1.2.0 to v1.3.0 -
8edb1b4Thanks @andreww2012! - Updatedtyped-query-selectorfrom v2.12.2 to v2.12.3Selectors with
[]inside a quoted attribute value, likeinput[name="tags[]"], are now resolved to the right element type instead of falling back toElement