{"id":15393166,"url":"https://github.com/birdofpreyru/js-utils","last_synced_at":"2025-08-02T08:34:37.226Z","repository":{"id":157209134,"uuid":"632587279","full_name":"birdofpreyru/js-utils","owner":"birdofpreyru","description":"Collection of JavaScript (TypeScript) utilities.","archived":false,"fork":false,"pushed_at":"2025-07-22T11:36:19.000Z","size":358,"stargazers_count":2,"open_issues_count":6,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-07-22T14:55:32.447Z","etag":null,"topics":["javascript","js","js-utils","node","react-native","utility","utils","web"],"latest_commit_sha":null,"homepage":"https://dr.pogodin.studio/","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/birdofpreyru.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE.md","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,"publiccode":null,"codemeta":null},"funding":{"github":"birdofpreyru"}},"created_at":"2023-04-25T18:06:28.000Z","updated_at":"2025-07-22T11:31:39.000Z","dependencies_parsed_at":"2024-02-20T14:51:20.862Z","dependency_job_id":"4ad80929-c079-4be7-b39e-4badcf8eaa79","html_url":"https://github.com/birdofpreyru/js-utils","commit_stats":null,"previous_names":[],"tags_count":22,"template":false,"template_full_name":null,"purl":"pkg:github/birdofpreyru/js-utils","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/birdofpreyru%2Fjs-utils","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/birdofpreyru%2Fjs-utils/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/birdofpreyru%2Fjs-utils/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/birdofpreyru%2Fjs-utils/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/birdofpreyru","download_url":"https://codeload.github.com/birdofpreyru/js-utils/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/birdofpreyru%2Fjs-utils/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":268355765,"owners_count":24237367,"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","status":"online","status_checked_at":"2025-08-02T02:00:12.353Z","response_time":74,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["javascript","js","js-utils","node","react-native","utility","utils","web"],"created_at":"2024-10-01T15:18:05.965Z","updated_at":"2025-08-02T08:34:37.218Z","avatar_url":"https://github.com/birdofpreyru.png","language":"TypeScript","funding_links":["https://github.com/sponsors/birdofpreyru"],"categories":[],"sub_categories":[],"readme":"[React Utils]: https://github.com/birdofpreyru/react-utils\n\n# JS Utils\n\n[![Latest NPM Release](https://img.shields.io/npm/v/@dr.pogodin/js-utils.svg)](https://www.npmjs.com/package/@dr.pogodin/js-utils)\n[![NPM Downloads](https://img.shields.io/npm/dm/@dr.pogodin/js-utils.svg)](https://www.npmjs.com/package/@dr.pogodin/js-utils)\n[![CircleCI](https://dl.circleci.com/status-badge/img/gh/birdofpreyru/js-utils/tree/master.svg?style=shield)](https://app.circleci.com/pipelines/github/birdofpreyru/js-utils)\n[![GitHub repo stars](https://img.shields.io/github/stars/birdofpreyru/js-utils?style=social)](https://github.com/birdofpreyru/js-utils)\n[![Dr. Pogodin Studio](https://raw.githubusercontent.com/birdofpreyru/js-utils/master/.README/logo-dr-pogodin-studio.svg)](https://dr.pogodin.studio/docs/js-utils)\n\nThe aim for this repo/package is to move in from the [React Utils] the pieces\nwhich are not React-specific, thus are also useful cross non-React projects,\nand thus having them in a dedicated package will faciliate their re-use\nin generic JavaScript (and TypeScript) projects.\n\nAt least for the first time, all stuff moved in here will still be exposed from\n[React Utils] the same  way as before, and the documentation for these pieces\nwill be still kept at https://dr.pogodin.studio/docs/react-utils/index.html.\nMaybe later, time permitting, this will be documented as a stand-alone library,\nbut prior to that it will be maintained and used as a stand-alone lib, but not\nvery well documented as such.\n\nYeah, the source code will be written in TypeScript, and for the library\nversion released to NPM it will be also compiled into plain JavaScript.\nConsumers of that NPM package thus will have access to both TS (`/src` folder)\nand JS (`/build` folder) version of the library.\n\n[![Sponsor](https://raw.githubusercontent.com/birdofpreyru/js-utils/master/.README/sponsor.svg)](https://github.com/sponsors/birdofpreyru)\n\n## Content\n\nThe library currently exports (links below lead to [React Utils] docs,\nbut the same stuff can be imported from this `@dr.pogodin/js-utils`,\nand used in the same way):\n\n### Constants\n- [SEC_MS](https://dr.pogodin.studio/docs/react-utils/docs/api/utils/time#sec_ms)\n  \u0026mdash; One second expressed in milliseconds.\n- [MIN_MS](https://dr.pogodin.studio/docs/react-utils/docs/api/utils/time#min_ms)\n  \u0026mdash; One minute expressed in milliseconds.\n- [HOUR_MS](https://dr.pogodin.studio/docs/react-utils/docs/api/utils/time#hour_ms)\n  \u0026mdash; One hour expressed in milliseconds.\n- [DAY_MS](https://dr.pogodin.studio/docs/react-utils/docs/api/utils/time#day_ms)\n  \u0026mdash; One day expressed in milliseconds.\n- [YEAR_MS](https://dr.pogodin.studio/docs/react-utils/docs/api/utils/time#year_ms)\n  \u0026mdash; One year expressed in milliseconds.\n\n### Types\n- `ObjectKey` \u0026mdash; **string** | **number** | **symbol** \u0026mdash;\n  The most generic valid type of an object key in TypeScript.\n\n### Functions\n- `assertEmptyObject()` \u0026mdash; Asserts given object is empty,\n  both compile- and run-time.\n- [timer()] \u0026mdash; Creates a [Barrier] which resolves after the specified timeout.\n- [withRetries()] \u0026mdash; Attempts a given action multiple times until its succeeds.\n\n### Classes\n- [Barrier] \u0026mdash; A [Promise] with **resolve()** and **reject()** exposed as\n  instance methods.\n\n- [Cached](https://dr.pogodin.studio/docs/react-utils/docs/api/classes/Cached)\n  \u0026mdash; A cache of (a)synchronously retrieved items with timestamp-based\n  expiration.\n\n- [Emitter](https://dr.pogodin.studio/docs/react-utils/docs/api/classes/Emitter)\n  \u0026mdash; Simple listeneable data emitter.\n- [Semaphore](https://dr.pogodin.studio/docs/react-utils/docs/api/classes/Semaphore)\n  \u0026mdash; Synchronization primitive.\n- `Timer` \u0026mdash; The core implementation of [timer()] functionality, allowing\n  to create further customized timer objects. _To be documented_.\n\n---\nRepository of this library also hosts some documents, to be referenced from\nother projects, as needed:\n- [The Common Sense Versioning](./docs/common-sense-versioning.md) \u0026mdash;\n  a lax description of a lax approach to product versioning that makes more\n  sense than [SemVer](https://semver.org).\n\n\u003c!-- References --\u003e\n\n[Barrier]: https://dr.pogodin.studio/docs/react-utils/docs/api/classes/Barrier\n[Promise]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise\n[timer()]: https://dr.pogodin.studio/docs/react-utils/docs/api/utils/time#timer\n[withRetries()]: https://dr.pogodin.studio/docs/react-utils/docs/api/functions/withretries\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbirdofpreyru%2Fjs-utils","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbirdofpreyru%2Fjs-utils","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbirdofpreyru%2Fjs-utils/lists"}