{"id":15395005,"url":"https://github.com/goto-bus-stop/get-assigned-identifiers","last_synced_at":"2025-04-15T23:53:51.236Z","repository":{"id":37412538,"uuid":"110345678","full_name":"goto-bus-stop/get-assigned-identifiers","owner":"goto-bus-stop","description":"get a list of identifiers that are initialised by a JavaScript AST node.","archived":false,"fork":false,"pushed_at":"2022-10-19T11:39:08.000Z","size":20,"stargazers_count":1,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"default","last_synced_at":"2025-03-29T03:05:14.273Z","etag":null,"topics":["ast","destructuring","identifiers"],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/goto-bus-stop.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2017-11-11T12:59:51.000Z","updated_at":"2021-10-05T08:40:19.000Z","dependencies_parsed_at":"2022-08-18T04:10:14.145Z","dependency_job_id":null,"html_url":"https://github.com/goto-bus-stop/get-assigned-identifiers","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/goto-bus-stop%2Fget-assigned-identifiers","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/goto-bus-stop%2Fget-assigned-identifiers/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/goto-bus-stop%2Fget-assigned-identifiers/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/goto-bus-stop%2Fget-assigned-identifiers/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/goto-bus-stop","download_url":"https://codeload.github.com/goto-bus-stop/get-assigned-identifiers/tar.gz/refs/heads/default","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":249173061,"owners_count":21224481,"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":["ast","destructuring","identifiers"],"created_at":"2024-10-01T15:25:19.115Z","updated_at":"2025-04-15T23:53:51.205Z","avatar_url":"https://github.com/goto-bus-stop.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# get-assigned-identifiers\n\nget a list of identifiers that are initialised by a JavaScript AST node.\n\n[![npm][npm-image]][npm-url]\n[![travis][travis-image]][travis-url]\n[![standard][standard-image]][standard-url]\n\n[npm-image]: https://img.shields.io/npm/v/get-assigned-identifiers.svg?style=flat-square\n[npm-url]: https://www.npmjs.com/package/get-assigned-identifiers\n[travis-image]: https://img.shields.io/travis/goto-bus-stop/get-assigned-identifiers.svg?style=flat-square\n[travis-url]: https://travis-ci.org/goto-bus-stop/get-assigned-identifiers\n[standard-image]: https://img.shields.io/badge/code%20style-standard-brightgreen.svg?style=flat-square\n[standard-url]: http://npm.im/standard\n\n## Install\n\n```\nnpm install get-assigned-identifiers\n```\n\n## Usage\n\n```js\nvar getAssignedIdentifiers = require('get-assigned-identifiers')\n\nvar ast = parse(`\n  var { a, b: [ c,, ...x ], d } = whatever()\n`)\nvar node = ast.body[0].declarations[0].id\ngetAssignedIdentifiers(node)\n// → [{ name: 'a' }, { name: 'c' }, { name: 'x' }, { name: 'd' }]\n```\n\n## API\n\n### `getAssignedIdentifiers(node)`\n\nReturn an array of AST Nodes referencing identifiers that are initialised by the `node`, taking into account destructuring.\n\nIf `node` is not an identifier or destructuring node, this returns an empty array.\n\n## License\n\n[Apache-2.0](LICENSE.md)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgoto-bus-stop%2Fget-assigned-identifiers","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgoto-bus-stop%2Fget-assigned-identifiers","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgoto-bus-stop%2Fget-assigned-identifiers/lists"}