{"id":16759166,"url":"https://github.com/alcalzone/shared-utils","last_synced_at":"2025-03-21T23:31:54.999Z","repository":{"id":32741964,"uuid":"140561383","full_name":"AlCalzone/shared-utils","owner":"AlCalzone","description":"A set of utilities shared between my projects","archived":false,"fork":false,"pushed_at":"2024-04-01T02:31:17.000Z","size":2293,"stargazers_count":0,"open_issues_count":7,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2024-04-14T07:56:18.168Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/AlCalzone.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null}},"created_at":"2018-07-11T10:43:49.000Z","updated_at":"2024-04-15T20:38:04.201Z","dependencies_parsed_at":"2023-01-14T22:05:40.737Z","dependency_job_id":"cfeb03c6-6568-4ed9-a19a-f75fbd3f5a00","html_url":"https://github.com/AlCalzone/shared-utils","commit_stats":{"total_commits":586,"total_committers":7,"mean_commits":83.71428571428571,"dds":0.6348122866894198,"last_synced_commit":"4a624dbd7643a8f436df44a54db78eacba702d95"},"previous_names":[],"tags_count":36,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AlCalzone%2Fshared-utils","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AlCalzone%2Fshared-utils/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AlCalzone%2Fshared-utils/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AlCalzone%2Fshared-utils/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/AlCalzone","download_url":"https://codeload.github.com/AlCalzone/shared-utils/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244885196,"owners_count":20526282,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-10-13T04:07:30.233Z","updated_at":"2025-03-21T23:31:54.994Z","avatar_url":"https://github.com/AlCalzone.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# shared-utils\r\n\r\n[![node](https://img.shields.io/node/v/alcalzone-shared.svg) ![npm](https://img.shields.io/npm/v/alcalzone-shared.svg)](https://www.npmjs.com/package/alcalzone-shared)\r\n\r\n[![Build Status](https://img.shields.io/circleci/project/github/AlCalzone/shared-utils.svg)](https://circleci.com/gh/AlCalzone/shared-utils)\r\n[![Coverage Status](https://img.shields.io/coveralls/github/AlCalzone/shared-utils.svg)](https://coveralls.io/github/AlCalzone/shared-utils)\r\n\r\nA set of utilities shared between my projects\r\n\r\nFunction documentation available [here](https://alcalzone.github.io/shared-utils/)\r\n\r\n## Changelog\r\n\u003c!--\r\n\tPlaceholder for the next version (at the beginning of the line):\r\n\t### __WORK IN PROGRESS__\r\n--\u003e\n### 5.0.0 (2024-11-06)\r\n* Breaking: Node.js 18 is now required\r\n* Breaking: When using TypeScript, `moduleResolution` must be set to `node16` in `tsconfig.json`\r\n* Breaking: `entries`, `values`, and `composeObject` were removed. Use the widely available `Object.entries`, `Object.values`, and `Object.fromEntries` instead.\r\n* Breaking: `padStart` and by extension the entire `/strings` submodule were removed. Use the widely available `String.prototype.padStart` instead.\r\n* The package is now a hybrid ESM/CJS package\n\n### 4.0.8 (2022-09-07)\r\n* Fix: Update return types of `isArray` and `isObject` to use an extensive conditional type to replace what used to work in TS 4.7\n\n### 4.0.7 (2022-09-07)\r\nUndo changes to `isObject` from `4.0.6`. TS narrowing in 4.8.2 is broken.\n\n### 4.0.6 (2022-09-07)\r\n* Fix: correctly narrow return type of `isObject`\n\n### 4.0.5 (2022-09-07)\r\n* Fix: correctly narrow return type of isArray for `{}` arguments\n\n### 4.0.4 (2022-09-07)\r\n* Fix: narrowed type for `isArray` is inferred correctly for `readonly` arrays\n\n### 4.0.3 (2022-08-27)\r\n* Update `isArray` to be compatible with TS 4.8 changes\n\n### 4.0.1 (2021-11-15)\r\n`SortedQueue`: Fixed an issue where inserting an item before the first one would cause the queue to lose track of items\n\n### 4.0.0 (2021-06-19)\r\n* Node.js 12+ is now required\n\n### 3.0.4 (2021-04-24)\r\n* Fix compatibility of `wait()` with Electron if `unref` is `true`\r\n* Dependency updates\n\n### 3.0.3 (2021-03-09)\r\n#### Fixes\r\n* Fixed compatibility with TypeScript 4.2\n\n### 3.0.2 (2021-01-16)\r\n#### Fixes\r\n* The argument to `resolve` of `DeferredPromise` is no longer optional, except for `Promise\u003cvoid\u003e`\n\n### 3.0.1 (2020-12-05)\r\n#### Fixes\r\n* The typeguard `isObject` no longer narrows the type of the argument to `object`\n\n### 3.0.0 (2020-08-16)\r\n#### Breaking changes\r\n* Renamed the following types:\r\n  * `DropLast` -\u003e `Lead`\r\n  * `TakeLast` -\u003e `Last`\r\n  * `TakeLastArgument` -\u003e `LastArgument`\r\n* TypeScript 4.1 is now required\r\n\r\n#### Features\r\n* Added the following types:\r\n  * `FixedIndizesOf\u003cT[]\u003e` - Like `IndizesOf`, but does not include the type `number` if the tuple/array is variable-length\r\n  * `Tail\u003cT[]\u003e` - Returns all but the first item's type in a tuple/array\r\n  * `Push\u003cList[], Item\u003e` - Returns the given tuple/array with the item type appended to it\r\n  * `Concat\u003cT1[], T2[]\u003e` - Concatenates the given tuples/arrays\r\n  * `TupleOf\u003cT, N\u003e` - Returns a tuple of length `N` with item types `T`.\r\n  * `Range\u003cN\u003e` - Creates a Union of all numbers (converted to string) from 0 to N (exclusive), e.g. `Range\u003c4\u003e` is equal to `\"0\" | \"1\" | \"2\" | \"3\"`.\r\n  * `RangeFrom\u003cN, M\u003e` - Creates a Union of all numbers from N (inclusive) to M (exclusive), e.g. `RangeFrom\u003c2, 4\u003e` is equal to `\"2\" | \"3\"`.\r\n  * `IsGreaterThan\u003cN, M\u003e` - is equal to `true` if `N \u003e M`, otherwise `false`\r\n  * `IsLessThanOrEqual\u003cN, M\u003e` - is equal to `true` if `N \u003c= M`, otherwise `false`\r\n  * `IsLessThan\u003cN, M\u003e` - is equal to `true` if `N \u003c M`, otherwise `false`\r\n  * `IsGreaterThanOrEqual\u003cN, M\u003e` - is equal to `true` if `N \u003e= M`, otherwise `false`\r\n\r\n#### Fixes\r\n* The type `CallbackAPIReturnType` now works with `strictNullChecks`.\r\n* The type `Promisify` is no longer experimental and no longer messes up the inferred signature argument names\n\n### 2.3.0 (2020-06-08)\r\n* Added optional `unref` parameter to `async` -\u003e `wait(ms, [unref])`","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Falcalzone%2Fshared-utils","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Falcalzone%2Fshared-utils","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Falcalzone%2Fshared-utils/lists"}