{"id":19837346,"url":"https://github.com/e-e-e/http-random-access","last_synced_at":"2025-06-20T23:36:36.495Z","repository":{"id":57268279,"uuid":"107836705","full_name":"e-e-e/http-random-access","owner":"e-e-e","description":"A random access interface for files served over http","archived":false,"fork":false,"pushed_at":"2018-02-11T22:14:24.000Z","size":19,"stargazers_count":1,"open_issues_count":0,"forks_count":2,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-06-09T17:16:15.650Z","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/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":"2017-10-22T04:14:58.000Z","updated_at":"2020-05-19T03:16:32.000Z","dependencies_parsed_at":"2022-09-26T17:51:31.627Z","dependency_job_id":null,"html_url":"https://github.com/e-e-e/http-random-access","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/e-e-e/http-random-access","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/e-e-e%2Fhttp-random-access","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/e-e-e%2Fhttp-random-access/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/e-e-e%2Fhttp-random-access/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/e-e-e%2Fhttp-random-access/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/e-e-e","download_url":"https://codeload.github.com/e-e-e/http-random-access/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/e-e-e%2Fhttp-random-access/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":261037152,"owners_count":23100933,"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:08.678Z","updated_at":"2025-06-20T23:36:31.471Z","avatar_url":"https://github.com/e-e-e.png","language":"JavaScript","readme":"# http-random-access\n\n[![Build Status](https://travis-ci.org/e-e-e/http-random-access.svg?branch=master)](https://travis-ci.org/e-e-e/http-random-access) [![Coverage Status](https://coveralls.io/repos/github/e-e-e/http-random-access/badge.svg?branch=master)](https://coveralls.io/github/e-e-e/http-random-access?branch=master)\n\n**This module is deprecated - its has been functionally merged with [random-access-http](https://www.npmjs.com/package/random-access-http). Please use it instead.**\n\nAn implementation of [random-access-storage](https://www.npmjs.com/package/random-access-storage) to access content via http/s.\nProviding the same interface as [random-access-file](https://www.npmjs.com/package/random-access-file) and [random-access-memory](https://www.npmjs.com/package/random-access-memory). This implementation is intended as a drop-in replacement for random-access-file or random-access-memory in the dat-storage configuration.\n\n## Installation\n\n```\nnpm install http-random-access --save\n```\n\n## Basic Example\n\n```js\nvar raHttp = require('http-random-access')\n\nvar file = raHttp('/readme.md', { url: 'https://raw.githubusercontent.com/e-e-e/http-random-access/master/' })\n\nfile.read(100, 200, (err, data) =\u003e {\n  if (err) {\n    console.log('Something went wrong!')\n    console.log(err)\n    return\n  }\n  console.log(data.toString())\n})\n```\n\n## API\n\n#### var file = raHttp(file, options)\n\nOpen a new random access http file connection.\n\nOptions include:\n```js\n{\n  url: string // The url of the dat\n  verbose: boolean, // Optional. Default: false.\n}\n```\n\n#### file.read(offset, length, callback)\n\nRead a buffer at a specific offset of specified length. Callback is called with the read buffer or error if there was an error.\n\nExpects callback of the form `function (err, result) {}`.\n\n#### file.write(offset, buffer, callback)\n\n**Write is not implemented.** This will silently fail with no data being writen.\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fe-e-e%2Fhttp-random-access","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fe-e-e%2Fhttp-random-access","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fe-e-e%2Fhttp-random-access/lists"}