{"id":18901095,"url":"https://github.com/regular/pull-sandbox","last_synced_at":"2025-06-20T07:34:35.567Z","repository":{"id":65478643,"uuid":"266198766","full_name":"regular/pull-sandbox","owner":"regular","description":null,"archived":false,"fork":false,"pushed_at":"2020-06-08T16:43:45.000Z","size":5,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-05-31T22:09:49.551Z","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/regular.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":"2020-05-22T20:10:45.000Z","updated_at":"2020-06-08T16:43:40.000Z","dependencies_parsed_at":"2023-01-25T07:55:13.668Z","dependency_job_id":null,"html_url":"https://github.com/regular/pull-sandbox","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/regular/pull-sandbox","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/regular%2Fpull-sandbox","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/regular%2Fpull-sandbox/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/regular%2Fpull-sandbox/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/regular%2Fpull-sandbox/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/regular","download_url":"https://codeload.github.com/regular/pull-sandbox/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/regular%2Fpull-sandbox/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":260901338,"owners_count":23079749,"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-08T08:55:09.146Z","updated_at":"2025-06-20T07:34:30.557Z","avatar_url":"https://github.com/regular.png","language":"JavaScript","readme":"pull-sandbox\n---\n\nA through stream that runs a mapper function in a quickjs sandbox in a worker thread.\n\n```\nconst test = require('tape')\nconst sandbox = require('pull-sandbox')\nconst pull = require('pull-stream')\n\ntest('pull some numbers through the sandbox', t=\u003e{\n  pull(\n    pull.values([1,2,3,4]),\n    sandbox(`\n      module.exports = function(a) {\n        return {n: a * 10}\n      }\n    `),\n    pull.collect( (err, values) =\u003e{\n      t.error(err)\n      t.deepEqual(values, [{n:10},{n:20},{n:30},{n:40}])\n      t.end()\n    })\n  )\n})\n````\n\n## API\n\n### `sandbox(code)`\n  \n  - code: source code of a commonJS module that exports a map function.\n\nSee [sandbox-worker](https://github.com/regular/sandbox-worker) for details.\n\nLicense: MIT\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fregular%2Fpull-sandbox","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fregular%2Fpull-sandbox","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fregular%2Fpull-sandbox/lists"}