{"id":28539336,"url":"https://github.com/yourtion/node-elock","last_synced_at":"2026-05-14T23:38:40.038Z","repository":{"id":57222658,"uuid":"116449336","full_name":"yourtion/node-elock","owner":"yourtion","description":"Easy use distributed redis lock implementation","archived":false,"fork":false,"pushed_at":"2020-05-30T19:53:19.000Z","size":261,"stargazers_count":0,"open_issues_count":12,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-07-12T02:35:34.743Z","etag":null,"topics":["distributed","distributed-lock","node-lock","redis","redis-lock"],"latest_commit_sha":null,"homepage":"https://npmjs.org/package/elock","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/yourtion.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}},"created_at":"2018-01-06T03:17:03.000Z","updated_at":"2019-03-08T10:12:09.000Z","dependencies_parsed_at":"2022-08-29T01:50:50.748Z","dependency_job_id":null,"html_url":"https://github.com/yourtion/node-elock","commit_stats":null,"previous_names":[],"tags_count":5,"template":false,"template_full_name":null,"purl":"pkg:github/yourtion/node-elock","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yourtion%2Fnode-elock","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yourtion%2Fnode-elock/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yourtion%2Fnode-elock/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yourtion%2Fnode-elock/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/yourtion","download_url":"https://codeload.github.com/yourtion/node-elock/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yourtion%2Fnode-elock/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":268693670,"owners_count":24291664,"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-04T02:00:09.867Z","response_time":79,"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":["distributed","distributed-lock","node-lock","redis","redis-lock"],"created_at":"2025-06-09T18:31:37.729Z","updated_at":"2026-05-14T23:38:39.960Z","avatar_url":"https://github.com/yourtion.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# node-elock\n\n[![Greenkeeper badge](https://badges.greenkeeper.io/yourtion/node-elock.svg)](https://greenkeeper.io/)\n\nEasy use distributed redis lock implementation\n\n## Installation\n\n```bash\nnpm install elock --save\n```\n\n## Usage\n\n```javascript\n// Init redis client\nconst Redis = require('ioredis');\nconst redisClient = new Redis();\n\n// Init ELock\nconst ELock = require('elock');\nconst lock = new ELock({ redis: redisClient });\n\n// Acquire Lock\nlock.acquire('key').then(() =\u003e {\n  // do someting when get lock\n\n  // release after done\n  return lock.release('key')\n}).catch((err) =\u003e {\n  // err when can't get lock\n})\n\n// Get lock\nlock.get('key').then((res) =\u003e {\n  if(res === null) return '' // null is get lock fail\n  // do someting when get lock\n})\n\n// Check is Locked\nlock.locked('key').then((locked) =\u003e {\n  // locked is a boolean\n})\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyourtion%2Fnode-elock","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fyourtion%2Fnode-elock","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyourtion%2Fnode-elock/lists"}