{"id":19584788,"url":"https://github.com/flex-development/is-builtin","last_synced_at":"2026-02-12T00:32:56.597Z","repository":{"id":61060632,"uuid":"547762511","full_name":"flex-development/is-builtin","owner":"flex-development","description":"Universal drop-in replacement for module.isBuiltin","archived":false,"fork":false,"pushed_at":"2024-11-08T18:01:40.000Z","size":5585,"stargazers_count":0,"open_issues_count":1,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2024-11-08T19:17:31.234Z","etag":null,"topics":["builtin","module","node","nodejs","ponyfill","typescript"],"latest_commit_sha":null,"homepage":"https://github.com/flex-development/is-builtin","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-3-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/flex-development.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":".github/funding.yml","license":"LICENSE.md","code_of_conduct":"CODE_OF_CONDUCT.md","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},"funding":{"github":["flex-development"]}},"created_at":"2022-10-08T08:39:10.000Z","updated_at":"2024-11-08T18:00:10.000Z","dependencies_parsed_at":"2024-10-31T23:20:06.347Z","dependency_job_id":"ffd9ac15-197c-401e-ab60-28d2fefd5d48","html_url":"https://github.com/flex-development/is-builtin","commit_stats":{"total_commits":105,"total_committers":2,"mean_commits":52.5,"dds":"0.47619047619047616","last_synced_commit":"ded8fd398216b4eff09e4e3c5a950f0e1eedd0b8"},"previous_names":[],"tags_count":6,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/flex-development%2Fis-builtin","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/flex-development%2Fis-builtin/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/flex-development%2Fis-builtin/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/flex-development%2Fis-builtin/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/flex-development","download_url":"https://codeload.github.com/flex-development/is-builtin/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":224069554,"owners_count":17250454,"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":["builtin","module","node","nodejs","ponyfill","typescript"],"created_at":"2024-11-11T07:49:45.334Z","updated_at":"2026-02-12T00:32:56.575Z","avatar_url":"https://github.com/flex-development.png","language":"JavaScript","readme":"# is-builtin\n\n[![github release](https://img.shields.io/github/v/release/flex-development/is-builtin.svg?include_prereleases\\\u0026sort=semver)](https://github.com/flex-development/is-builtin/releases/latest)\n[![npm](https://img.shields.io/npm/v/@flex-development/is-builtin.svg)](https://npmjs.com/package/@flex-development/is-builtin)\n[![codecov](https://codecov.io/github/flex-development/is-builtin/branch/main/graph/badge.svg?token=MQ427OD7XD)](https://codecov.io/github/flex-development/is-builtin)\n[![module type: esm](https://img.shields.io/badge/module%20type-esm-brightgreen)](https://github.com/voxpelli/badges-cjs-esm)\n[![license](https://img.shields.io/github/license/flex-development/is-builtin.svg)](LICENSE.md)\n[![conventional commits](https://img.shields.io/badge/-conventional%20commits-fe5196?logo=conventional-commits\\\u0026logoColor=ffffff)](https://conventionalcommits.org)\n[![typescript](https://img.shields.io/badge/-typescript-3178c6?logo=typescript\\\u0026logoColor=ffffff)](https://typescriptlang.org)\n[![vitest](https://img.shields.io/badge/-vitest-6e9f18?style=flat\\\u0026logo=vitest\\\u0026logoColor=ffffff)](https://vitest.dev)\n[![yarn](https://img.shields.io/badge/-yarn-2c8ebb?style=flat\\\u0026logo=yarn\\\u0026logoColor=ffffff)](https://yarnpkg.com)\n\nUniversal drop-in replacement for [`module.isBuiltin`][moduleisbuiltin]\n\n## Contents\n\n- [What is this?](#what-is-this)\n- [When should I use this?](#when-should-i-use-this)\n- [Install](#install)\n- [Use](#use)\n- [API](#api)\n  - [`isBuiltin(m)`](#isbuiltinm)\n- [Types](#types)\n- [Related](#related)\n- [Contribute](#contribute)\n\n## What is this?\n\nThis package is a universal drop-in replacement for [`module.isBuiltin`][moduleisbuiltin].\n\n## When should I use this?\n\nThis package exports a single function that can be used to determine if a module is a [builtin module][builtin]. Builtin\nmodules are core modules maintained by Node.js. They can be imported by name or using a [`node:` URL][node-url].\n\n## Install\n\nThis package is [ESM only][esm].\n\nIn Node.js (version 18+) with [yarn][]:\n\n```sh\nyarn add @flex-development/is-builtin\n```\n\n\u003cblockquote\u003e\n  \u003csmall\u003e\n    See \u003ca href='https://yarnpkg.com/protocol/git'\u003eGit - Protocols | Yarn\u003c/a\u003e\n    \u0026nbsp;for details regarding installing from Git.\n  \u003c/small\u003e\n\u003c/blockquote\u003e\n\nIn Deno with [`esm.sh`][esmsh]:\n\n```ts\nimport { isBuiltin } from 'https://esm.sh/@flex-development/is-builtin'\n```\n\nIn browsers with [`esm.sh`][esmsh]:\n\n```html\n\u003cscript type=\"module\"\u003e\n  import { isBuiltin } from 'https://esm.sh/@flex-development/is-builtin'\n\u003c/script\u003e\n```\n\n## Use\n\n```ts\nimport { isBuiltin } from '@flex-development/is-builtin'\n\nisBuiltin('@flex-development/is-builtin') // false\nisBuiltin('assert')                       // true\nisBuiltin('fs/promises')                  // true\nisBuiltin(new URL('node:os'))             // true\nisBuiltin('node:module')                  // true\nisBuiltin('node:test/reporters')          // true\nisBuiltin('test')                         // false\nisBuiltin(null)                           // false\n```\n\n## API\n\nThis package exports the identifier [`isBuiltin`](#isbuiltinm).\n\nThe default export is also `isBuiltin`.\n\n### `isBuiltin(m)`\n\nCheck if `m` references a [builtin module][builtin].\n\n\u003e 👉 **Note**: `m` will be converted to a string (`String(m)`) before being checked.\n\n#### Parameters\n\n- `m` (`unknown`) — the thing to check\n\n#### Returns\n\n`true` if `m` references builtin module, `false` otherwise.\n\n## Types\n\nThis package is fully typed with [TypeScript][].\n\n## Related\n\n- [`builtin-modules`][builtin-modules]\n  — Universal drop-in replacement for [`module.builtinModules`][modulebuiltinmodules]\n\n## Contribute\n\nSee [`CONTRIBUTING.md`](./CONTRIBUTING.md).\n\nThis project has a [code of conduct](./CODE_OF_CONDUCT.md). By interacting with this repository, organization, or\ncommunity you agree to abide by its terms.\n\n[builtin-modules]: https://github.com/flex-development/builtin-modules\n\n[builtin]: https://nodejs.org/api/esm.html#builtin-modules\n\n[esm]: https://gist.github.com/sindresorhus/a39789f98801d908bbc7ff3ecc99d99c\n\n[esmsh]: https://esm.sh\n\n[modulebuiltinmodules]: https://nodejs.org/api/module.html#modulebuiltinmodules\n\n[moduleisbuiltin]: https://nodejs.org/api/module.html#moduleisbuiltinmodulename\n\n[node-url]: https://nodejs.org/api/esm.html#node-imports\n\n[typescript]: https://www.typescriptlang.org\n\n[yarn]: https://yarnpkg.com\n","funding_links":["https://github.com/sponsors/flex-development"],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fflex-development%2Fis-builtin","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fflex-development%2Fis-builtin","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fflex-development%2Fis-builtin/lists"}