{"id":19837360,"url":"https://github.com/e-e-e/random-access-alias","last_synced_at":"2025-06-21T21:34:58.157Z","repository":{"id":51669283,"uuid":"218141049","full_name":"e-e-e/random-access-alias","owner":"e-e-e","description":"A proxy wrapper for any random-access-storage compatible store which allows aliased mapping of filenames.","archived":false,"fork":false,"pushed_at":"2023-01-05T01:13:17.000Z","size":207,"stargazers_count":2,"open_issues_count":12,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-02-28T22:12:15.713Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","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/e-e-e.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":"2019-10-28T20:39:45.000Z","updated_at":"2019-11-21T22:40:20.000Z","dependencies_parsed_at":"2023-02-03T03:16:24.618Z","dependency_job_id":null,"html_url":"https://github.com/e-e-e/random-access-alias","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/e-e-e/random-access-alias","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/e-e-e%2Frandom-access-alias","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/e-e-e%2Frandom-access-alias/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/e-e-e%2Frandom-access-alias/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/e-e-e%2Frandom-access-alias/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/e-e-e","download_url":"https://codeload.github.com/e-e-e/random-access-alias/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/e-e-e%2Frandom-access-alias/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":261197480,"owners_count":23123724,"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":[],"created_at":"2024-11-12T12:14:12.895Z","updated_at":"2025-06-21T21:34:53.129Z","avatar_url":"https://github.com/e-e-e.png","language":"JavaScript","readme":"# Random Access Alias\n\n[![Build Status](https://travis-ci.org/e-e-e/random-access-alias.svg?branch=master)](https://travis-ci.org/e-e-e/random-access-alias)\n\nA proxy wrapper for any [random-access-storage](https://github.com/random-access-storage/random-access-storage) compatible store which allows aliased mapping of filenames.\n\nThis is useful for creating virtual file structures without having to change any directory structures on disk, or duplicate shared files.\n\n## Installation\n\n```bash\nnpm install --save random-access-alias\n```\n\n## Usage\n\n```js\nconst randomAccessAlias = require(\"random-access-alias\");\nconst ram = require(\"random-access-memory\");\n// A simple resolver - this could also query a database or parse and transform the name.\n// Resolvers can be async functions.\nconst resolver = name =\u003e {\n  switch (name) {\n    case \"marx/capital/some.pdf\":\n      return \"data/files/marx_capital_v1.pdf\";\n    case \"marx/capital/metadata.opf\":\n      return \"data/files/marx_capital_v1.opf\";\n    default:\n      return name;\n  }\n};\n\n// Pass the resolver and RAS implementation to create an aliased version.\nconst raa = randomAccessAlias.create(resolver, ram);\nconst options = {\n  // ... options to be provided to the RAS implementation used.\n};\n// Create store which may be used the same as any other Random Access Storage.\nconst store = raa(\"marx/capital/some.pdf\", options);\n```\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fe-e-e%2Frandom-access-alias","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fe-e-e%2Frandom-access-alias","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fe-e-e%2Frandom-access-alias/lists"}