{"id":21531927,"url":"https://github.com/matrixai/js-reference-pointer","last_synced_at":"2026-04-17T15:01:41.978Z","repository":{"id":143802190,"uuid":"119944688","full_name":"MatrixAI/js-reference-pointer","owner":"MatrixAI","description":"Wrap a primitive value in a reference pointer, and pass by reference!","archived":false,"fork":false,"pushed_at":"2018-02-05T10:28:06.000Z","size":1244,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":8,"default_branch":"master","last_synced_at":"2024-10-14T01:08:43.113Z","etag":null,"topics":["javascript","nodejs","pointer","reference"],"latest_commit_sha":null,"homepage":"https://matrix.ai","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/MatrixAI.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,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2018-02-02T06:54:55.000Z","updated_at":"2019-04-14T09:44:54.000Z","dependencies_parsed_at":"2024-01-29T12:30:34.916Z","dependency_job_id":null,"html_url":"https://github.com/MatrixAI/js-reference-pointer","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MatrixAI%2Fjs-reference-pointer","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MatrixAI%2Fjs-reference-pointer/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MatrixAI%2Fjs-reference-pointer/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MatrixAI%2Fjs-reference-pointer/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/MatrixAI","download_url":"https://codeload.github.com/MatrixAI/js-reference-pointer/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244096059,"owners_count":20397328,"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","nodejs","pointer","reference"],"created_at":"2024-11-24T02:18:12.729Z","updated_at":"2026-04-17T15:01:36.934Z","avatar_url":"https://github.com/MatrixAI.png","language":"JavaScript","readme":"# Reference Pointer\n\nThis library simply wraps a primitive value (number, string) into an object, so instead of passing a value around, you pass the object around. This allows you do pass-by-reference. This is basically JavaScript's equivalent of a pointer.\n\nBasic Usage\n-------------\n\n```sh\nnpm install --save 'reference-pointer';\n```\n\n```js\nimport Reference from 'reference-pointer';\n\nconst changed = new Reference(false);\n\nfunction changeBool (changed) {\n  changed.set(true);\n}\n\nchangeBool(changed);\n\nconsole.log(changed.get()); // true\n```\n\nDevelopment\n------------\n\nTo build this package for release:\n\n```\nnpm run build\n```\n\nIt will run tests, generate documentation and output multiple targets. One for browsers and one for nodejs. See `rollup.config.js` to see the target specification.\n\nIf your bundler is aware of the module field in `package.json`, you'll get the ES6 module directly.\n\nOnce you've updated the package run this:\n\n```\nnpm version \u003cupdate_type\u003e\nnpm publish\n```\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmatrixai%2Fjs-reference-pointer","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmatrixai%2Fjs-reference-pointer","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmatrixai%2Fjs-reference-pointer/lists"}