{"id":18385290,"url":"https://github.com/wankdanker/node-redis-key","last_synced_at":"2026-04-28T08:05:04.364Z","repository":{"id":57349748,"uuid":"44267990","full_name":"wankdanker/node-redis-key","owner":"wankdanker","description":null,"archived":false,"fork":false,"pushed_at":"2015-11-23T14:29:27.000Z","size":4,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-08-21T19:40:36.999Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/wankdanker.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2015-10-14T18:29:26.000Z","updated_at":"2015-10-14T19:16:57.000Z","dependencies_parsed_at":"2022-09-15T15:52:51.972Z","dependency_job_id":null,"html_url":"https://github.com/wankdanker/node-redis-key","commit_stats":null,"previous_names":[],"tags_count":5,"template":false,"template_full_name":null,"purl":"pkg:github/wankdanker/node-redis-key","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wankdanker%2Fnode-redis-key","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wankdanker%2Fnode-redis-key/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wankdanker%2Fnode-redis-key/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wankdanker%2Fnode-redis-key/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/wankdanker","download_url":"https://codeload.github.com/wankdanker/node-redis-key/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wankdanker%2Fnode-redis-key/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32371706,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-27T20:07:02.737Z","status":"online","status_checked_at":"2026-04-28T02:00:07.250Z","response_time":56,"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":[],"created_at":"2024-11-06T01:17:13.740Z","updated_at":"2026-04-28T08:05:04.274Z","avatar_url":"https://github.com/wankdanker.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"redis-key\n---------\n\nRedis key generator / function argument joiner\n\nThis module is basically a shortcut for:\n\n```js\nArray.prototype.slice.call(arguments).join(separator);\n```\n\ninstall\n-------\n\n```bash\nnpm install redis-key\n```\n\nexample\n-------\n\n```js\nvar rk = require('redis-key');\n\n//default separator is ':'\nvar key = rk('product-collection', 'company', 'price-level');\n//key = \"product-collection:company:price-level\"\n```\n\n### Setting a default separator\n\n```js\nvar rk = require('redis-key').defaults('/');\n\n//now the separator is '/'\nvar key = rk('part', 1, 3);\n//key = \"part/1/3\"\n```\n\napi\n---\n\n### .defaults([separator, [prefix]])\n\n* separator - [string] the character[s] to put between the tokens that make up your key (default ':')\n* prefix - [string] an additional token that is prefixed to the key\n\nmotivation\n----------\n\nI've been generating redis keys like this:\n\n```js\nvar key = ['part1', var1, var2, var3].join(':');\n```\n\nI thought it would be more concise to be able to do this:\n\n```js\nvar key = k('part1', var1, var2, var3);\n```\n\nAnd if my math is correct, it is more concise by 9 whole characters. Joy.\n\nlicense\n-------\n\nMIT\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwankdanker%2Fnode-redis-key","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fwankdanker%2Fnode-redis-key","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwankdanker%2Fnode-redis-key/lists"}