{"id":16190932,"url":"https://github.com/maxmellon/babel-plugin-transform-isnil","last_synced_at":"2025-10-30T01:03:31.039Z","repository":{"id":86954172,"uuid":"57866946","full_name":"MaxMEllon/babel-plugin-transform-isNil","owner":"MaxMEllon","description":"[DEPLECATED] RIP :blue_heart: Replace the comparing of null or undefined with isNil :b:","archived":false,"fork":false,"pushed_at":"2018-02-21T11:37:34.000Z","size":39,"stargazers_count":8,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-12T13:36:21.817Z","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":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/MaxMEllon.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE.txt","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":"2016-05-02T04:57:13.000Z","updated_at":"2018-02-21T11:27:29.000Z","dependencies_parsed_at":"2023-05-29T23:15:13.350Z","dependency_job_id":null,"html_url":"https://github.com/MaxMEllon/babel-plugin-transform-isNil","commit_stats":null,"previous_names":["maxmellon/babel-plugin-existential-operator"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MaxMEllon%2Fbabel-plugin-transform-isNil","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MaxMEllon%2Fbabel-plugin-transform-isNil/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MaxMEllon%2Fbabel-plugin-transform-isNil/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MaxMEllon%2Fbabel-plugin-transform-isNil/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/MaxMEllon","download_url":"https://codeload.github.com/MaxMEllon/babel-plugin-transform-isNil/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244350959,"owners_count":20439290,"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-10-10T07:44:31.611Z","updated_at":"2025-10-30T01:03:31.023Z","avatar_url":"https://github.com/MaxMEllon.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# babel-plugin-transform-isNil is dead\n\nComing new syntax as [proposal-optional-chaining](https://github.com/tc39/proposal-optional-chaining) on [babel7](https://github.com/babel/babel/wiki/Babel-7)\n\n**Which is only compatible with babel6**\n\nPlease use **[@babel/plugin-proposal-optional-chaining](https://github.com/babel/babel/tree/master/packages/babel-plugin-proposal-optional-chaining)**\n\n\n## babel-plugin-transform-isNil\n\n\u003ca href=\"https://www.npmjs.com/package/babel-plugin-transform-isnil\"\u003e\n\t\u003cimg src=\"https://nodei.co/npm/babel-plugin-transform-isnil.png\"/\u003e\n\u003c/a\u003e\n\u003ca href=\"https://travis-ci.org/MaxMEllon/babel-plugin-transform-isNil\"\u003e\n  \u003cimg src=\"https://travis-ci.org/MaxMEllon/babel-plugin-transform-isNil.svg?branch=master\"/\u003e\n\u003c/a\u003e\n\u003ca href=\"https://github.com/sindresorhus/xo\"\u003e\n  \u003cimg src=\"https://img.shields.io/badge/code_style-XO-5ed9c7.svg\"/\u003e\n\u003c/a\u003e\n\n### About\n\nI like Existential Operator in `CoffeeScript`.\nCoffeeScript can be written as follows:\n\n```coffee\nhoge?\n```\n\nBecome to `JavaScript`\n\n```js\nhoge == null\n```\n\nSame meaning\n\n```\nhoge === null || hoge === undefined\n```\n\nI want to do the same thing in `JavaScript`.\n\n### Installation\n\n```bash\n$ npm install --save babel-plugin-transform-isnil\n```\n\nExample\n---\n\n**In**\n\n```js\nif (foo.isNil) {\n  console.log('foo is null or undefined');\n}\n```\n\n**Out**\n\n```js\nif (foo === null || foo === undefined) {\n  console.log('foo is null or undefined');\n}\n```\n\n**In**\n\n```js\nif (hoge.poge.isNil \u0026\u0026 foo.bar.isNil) {\n  console.log('hoge.poge and foo.bar is null or undefined');\n}\n```\n\n**Out**\n\n```js\nif ((hoge.poge === null || hoge.poge === undefined) \u0026\u0026 (foo.bar === null || foo.bar === undefined)) {\n  console.log('hoge.poge and foo.bar is null or undefined');\n}\n```\n\n**In**\n\n```js\nif (hoge.poge().isNil) {\n  console.log('returned value of hoge.poge() function is null or undefined');\n}\n```\n\n**Out**\n\n```js\nif (hoge.poge() === null || hoge.poge() === undefined) {\n  console.log('returned value of hoge.poge() function is null or undefined');\n}\n```\n\n**In**\n\n```js\nif (hoge.poge(hoge).isNil) {\n  console.log('returned value of hoge.poge() function is null or undefined');\n}\n```\n\n**Out**\n\n```js\nif (hoge.poge(hoge) === null || hoge.poge(hoge) === undefined) {\n  console.log('returned value of hoge.poge() function is null or undefined');\n}\n```\n\n### Usage\n\n#### Via `.babelrc`\n\n```json\n{\n  \"plugins\": [\"babel-plugin-transform-isnil\"]\n}\n```\n\n### Development\n\nRequirement global\n\n* Node v4 or above\n\n```bash\n$ git clone https://github.com/MaxMEllon/babel-plugin-transform-isNil\n$ cd babel-plugin-transform-isNil\n$ npm install\n\n$ npm test\n```\n\n### Special Thanks\n\n- [@shnhrrsn](https://github.com/shnhrrsn)\n\nLICENSE\n---\n[MIT](./LICENSE.txt)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmaxmellon%2Fbabel-plugin-transform-isnil","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmaxmellon%2Fbabel-plugin-transform-isnil","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmaxmellon%2Fbabel-plugin-transform-isnil/lists"}