Skip to content
This repository has been archived by the owner on Feb 18, 2024. It is now read-only.

jspm/node-browser-builtins

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 

Repository files navigation

node-browser-builtins

Provides the Browserify builtins through a single package dependency.

Exports a single resolver method.

const resolveBuiltin = require('node-browser-builtins');
resolveBuiltin('fs'); // -> "@empty"
resolveBuiltin('zlib'); // -> "/<..>/node-browser-builtins/node_modules/browserify-zlib/lib/index.js"
resolveBuiltin('asdf'); // throws code "MODULE_NOT_FOUND" error

Resolution is done lazily so there is no resolve boot cost for requiring this dependency.