{"id":18886313,"url":"https://github.com/nanokind/babel-is","last_synced_at":"2026-04-19T01:01:44.385Z","repository":{"id":57188786,"uuid":"373846997","full_name":"fengzilong/babel-is","owner":"fengzilong","description":"verify an AST path with css-selector-like syntax in your babel plugin","archived":false,"fork":false,"pushed_at":"2021-06-05T07:34:23.000Z","size":48,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-01-31T08:47:47.138Z","etag":null,"topics":["ast","babel","match","plugin","test","verify"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/fengzilong.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}},"created_at":"2021-06-04T13:15:43.000Z","updated_at":"2021-06-05T07:34:26.000Z","dependencies_parsed_at":"2022-08-28T11:11:42.042Z","dependency_job_id":null,"html_url":"https://github.com/fengzilong/babel-is","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fengzilong%2Fbabel-is","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fengzilong%2Fbabel-is/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fengzilong%2Fbabel-is/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fengzilong%2Fbabel-is/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/fengzilong","download_url":"https://codeload.github.com/fengzilong/babel-is/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":239859558,"owners_count":19708861,"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","babel","match","plugin","test","verify"],"created_at":"2024-11-08T07:26:31.798Z","updated_at":"2026-02-23T14:30:21.001Z","avatar_url":"https://github.com/fengzilong.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# babel-is\n\n### Installation\n\nFor npm users\n\n```bash\nnpm i babel-is\n```\n\nFor yarn users\n\n```bash\nyarn add babel-is\n```\n\n### Usage\n\nIn your babel plugin\n\n```js\nconst is = require( 'babel-is' )\n\nmodule.exports = function () {\n  return {\n    visitor: {\n      // matches all `let` variable declarations in `foo` function\n      VariableDeclaration( path ) {\n        const selector = `FunctionDeclaration[id.name=foo] [kind=let]`\n\n        if ( is( path, selector ) ) {\n          // add your logic\n          // ...\n        }\n      }\n    }\n  }\n}\n```\n\n\n\n### License\n\nMIT\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnanokind%2Fbabel-is","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnanokind%2Fbabel-is","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnanokind%2Fbabel-is/lists"}