{"id":19592297,"url":"https://github.com/smikhalevski/object-pool","last_synced_at":"2025-02-26T14:15:01.949Z","repository":{"id":45367502,"uuid":"402876500","full_name":"smikhalevski/object-pool","owner":"smikhalevski","description":"🤿 The tiny and efficient object pool.","archived":false,"fork":false,"pushed_at":"2021-12-17T12:24:10.000Z","size":93,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-02-10T03:48:33.666Z","etag":null,"topics":["caching","object-pool","performance"],"latest_commit_sha":null,"homepage":"","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/smikhalevski.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2021-09-03T19:21:26.000Z","updated_at":"2022-05-25T22:25:49.000Z","dependencies_parsed_at":"2022-09-05T05:51:31.366Z","dependency_job_id":null,"html_url":"https://github.com/smikhalevski/object-pool","commit_stats":null,"previous_names":["smikhalevski/yaop"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/smikhalevski%2Fobject-pool","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/smikhalevski%2Fobject-pool/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/smikhalevski%2Fobject-pool/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/smikhalevski%2Fobject-pool/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/smikhalevski","download_url":"https://codeload.github.com/smikhalevski/object-pool/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":240867427,"owners_count":19870405,"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":["caching","object-pool","performance"],"created_at":"2024-11-11T08:34:32.543Z","updated_at":"2025-02-26T14:15:01.891Z","avatar_url":"https://github.com/smikhalevski.png","language":"TypeScript","readme":"# object-pool [![build](https://github.com/smikhalevski/object-pool/actions/workflows/master.yml/badge.svg?branch=master\u0026event=push)](https://github.com/smikhalevski/object-pool/actions/workflows/master.yml)\n\n[The tiny](https://bundlephobia.com/package/@smikhalevski/object-pool) and efficient object pool.\n\nThis implementation was inspired by [deePool](https://github.com/getify/deePool) and is slightly faster than the\noriginal.\n\n```shell\nnpm install @smikhalevski/object-pool\n```\n\n# Usage\n\n```ts\nimport {ObjectPool} from '@smikhalevski/object-pool';\n\nconst pool = new ObjectPool(() =\u003e {\n  // Create and return a heavy object.\n}, (value) =\u003e {\n  // Reset the released object. \n});\n\n// Prepare 100 heavy objects.\npool.allocate(100);\n\n// Take a heavy object from the pool.\nconst heavyObject = pool.take();\n\n// Return heavy object back to the pool.\npool.release(heavyObject);\n```\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsmikhalevski%2Fobject-pool","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsmikhalevski%2Fobject-pool","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsmikhalevski%2Fobject-pool/lists"}