Licence
MIT
Version
0.13.1
Deps
4
Size
17 kB
Vulns
0
Weekly
1.2K
@gjsify/module
GJS implementation of the Node.js module module using Gio and GLib. Provides builtinModules, isBuiltin, and createRequire.
Part of the gjsify project — Node.js and Web APIs for GJS (GNOME JavaScript).
Installation
gjsify install @gjsify/module
# npm or yarn also work (e.g. adding it to an existing project):
npm install @gjsify/module
yarn add @gjsify/moduleUsage
import { builtinModules, isBuiltin, createRequire } from '@gjsify/module';
console.log(builtinModules);
console.log(isBuiltin('fs')); // true
const require = createRequire(import.meta.url);License
MIT