{"id":28208559,"url":"https://github.com/squarecloudofc/redis-map","last_synced_at":"2026-02-24T01:03:19.163Z","repository":{"id":199991088,"uuid":"704321894","full_name":"squarecloudofc/redis-map","owner":"squarecloudofc","description":" A simple way to use something similar to the Map in JavaScript, but synchronized with the power of Redis. ","archived":false,"fork":false,"pushed_at":"2023-10-13T02:46:49.000Z","size":9,"stargazers_count":9,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-06-12T08:43:45.321Z","etag":null,"topics":["javascript","redis","squarecloud"],"latest_commit_sha":null,"homepage":"https://npmjs.com/@squarecloudofc/redis-map","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/squarecloudofc.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}},"created_at":"2023-10-13T02:38:16.000Z","updated_at":"2024-01-26T13:52:46.000Z","dependencies_parsed_at":null,"dependency_job_id":"5267c239-00ed-467d-a33c-7bd7ed2a4a82","html_url":"https://github.com/squarecloudofc/redis-map","commit_stats":null,"previous_names":["squarecloudofc/redis-map"],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/squarecloudofc/redis-map","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/squarecloudofc%2Fredis-map","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/squarecloudofc%2Fredis-map/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/squarecloudofc%2Fredis-map/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/squarecloudofc%2Fredis-map/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/squarecloudofc","download_url":"https://codeload.github.com/squarecloudofc/redis-map/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/squarecloudofc%2Fredis-map/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":265710619,"owners_count":23815383,"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":["javascript","redis","squarecloud"],"created_at":"2025-05-17T14:13:33.775Z","updated_at":"2026-02-24T01:03:19.130Z","avatar_url":"https://github.com/squarecloudofc.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"## Information\nA simple way to use something similar to the Map in javascript, but synchronized with the power of Redis.\n\n## Install\n```\nnpm install @squarecloudofc/redis-map\n```\n\n## Example of usage\n```javascript\nconst { RedisAPI, RedisMap } = require(\"@squarecloudofc/redis-map\");\n\n(async () =\u003e {\n    \n    const connections = await new RedisAPI({\n        url: process.env.REDIS, \n        monitor: (type, message) =\u003e {\n            console.log(`[REDIS] ${type}: ${message}`);\n        }\n    }).connect();\n\n    // Example using same connection (for two maps);\n\n    // first map;\n    const cacheUsers = new RedisMap({\n        connections,\n        name: \"example:cache:users\", \n        monitor: (type, message, name) =\u003e {\n            console.log(name, type, message);\n        }\n    });\n\n    // second map;\n    const cacheApps = new RedisMap({\n        connections,\n        name: \"example:cache:apps\",\n        sync: false // disable sync with redis;\n    });\n\n    await cacheUsers.set(\"joao\", { plan: \"free\", balance: 1000 });\n    console.log(cacheUsers.get(\"joao\"), \"\\n\");\n\n    await cacheApps.set(\"water_man\", { protection: 10, shield: 50 });\n    console.log(cacheApps.get(\"water_man\"), \"\\n\");\n\n    connections.disconnect();\n\n})();\n```\n\n## LICENSE\nThis project is licensed under the Apache License 2.0.\n\nSponsored by [Square Cloud](https://squarecloud.app/).","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsquarecloudofc%2Fredis-map","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsquarecloudofc%2Fredis-map","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsquarecloudofc%2Fredis-map/lists"}