Package Exports
- alcalzone-shared
- alcalzone-shared/arrays
- alcalzone-shared/arrays/index.js
- alcalzone-shared/async
- alcalzone-shared/async/index.js
- alcalzone-shared/comparable
- alcalzone-shared/comparable/index.js
- alcalzone-shared/deferred-promise
- alcalzone-shared/deferred-promise/index.js
- alcalzone-shared/helpers
- alcalzone-shared/helpers/index.js
- alcalzone-shared/index.js
- alcalzone-shared/math
- alcalzone-shared/math/index.js
- alcalzone-shared/objects
- alcalzone-shared/objects/index.js
- alcalzone-shared/sorted-list
- alcalzone-shared/sorted-list/index.js
- alcalzone-shared/strings
- alcalzone-shared/strings/index.js
- alcalzone-shared/typeguards
- alcalzone-shared/typeguards/index.js
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (alcalzone-shared) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
shared-utils
A set of utilities shared between my projects
Function documentation available here
Changelog
4.0.6 (2022-09-07)
- Fix: correctly narrow return type of
isObject
4.0.5 (2022-09-07)
- Fix: correctly narrow return type of isArray for
{}arguments
4.0.4 (2022-09-07)
- Fix: narrowed type for
isArrayis inferred correctly forreadonlyarrays
4.0.3 (2022-08-27)
- Update
isArrayto be compatible with TS 4.8 changes
4.0.1 (2021-11-15)
SortedQueue: Fixed an issue where inserting an item before the first one would cause the queue to lose track of items
4.0.0 (2021-06-19)
- Node.js 12+ is now required
3.0.4 (2021-04-24)
- Fix compatibility of
wait()with Electron ifunrefistrue - Dependency updates
3.0.3 (2021-03-09)
Fixes
- Fixed compatibility with TypeScript 4.2
3.0.2 (2021-01-16)
Fixes
- The argument to
resolveofDeferredPromiseis no longer optional, except forPromise<void>
3.0.1 (2020-12-05)
Fixes
- The typeguard
isObjectno longer narrows the type of the argument toobject
3.0.0 (2020-08-16)
Breaking changes
- Renamed the following types:
DropLast->LeadTakeLast->LastTakeLastArgument->LastArgument
- TypeScript 4.1 is now required
Features
- Added the following types:
FixedIndizesOf<T[]>- LikeIndizesOf, but does not include the typenumberif the tuple/array is variable-lengthTail<T[]>- Returns all but the first item's type in a tuple/arrayPush<List[], Item>- Returns the given tuple/array with the item type appended to itConcat<T1[], T2[]>- Concatenates the given tuples/arraysTupleOf<T, N>- Returns a tuple of lengthNwith item typesT.Range<N>- Creates a Union of all numbers (converted to string) from 0 to N (exclusive), e.g.Range<4>is equal to"0" | "1" | "2" | "3".RangeFrom<N, M>- Creates a Union of all numbers from N (inclusive) to M (exclusive), e.g.RangeFrom<2, 4>is equal to"2" | "3".IsGreaterThan<N, M>- is equal totrueifN > M, otherwisefalseIsLessThanOrEqual<N, M>- is equal totrueifN <= M, otherwisefalseIsLessThan<N, M>- is equal totrueifN < M, otherwisefalseIsGreaterThanOrEqual<N, M>- is equal totrueifN >= M, otherwisefalse
Fixes
- The type
CallbackAPIReturnTypenow works withstrictNullChecks. - The type
Promisifyis no longer experimental and no longer messes up the inferred signature argument names
2.3.0 (2020-06-08)
- Added optional
unrefparameter toasync->wait(ms, [unref])