1.0.0 • Published 7 years ago
namespace-polyfill
Licence
Apache-2.0
Version
1.0.0
Deps
1
Size
13 kB
Vulns
0
Weekly
0
DeprecatedThis package is deprecated
NameSpace Polyfill
Use tomorrow's namespaces today!
What is this?
We are currently discussing making a namespace in Node.js.
There is a debate regarding the best mechanism to do so. Currently there are two major approaches:
- using a url like scheme such as
nodejs:${builtin} - using a scope such as
@nodejs/${builtin}
One of the critiques against the url like scheme is that it would not be easy to polyfill. This project serves as a proof of concept that we will be able to polyfill any approach to namespaces, making polyfilling a non-issue for reaching consesnsus in Node.js core.
Installing
npm install --save namespace-polyfill
Using
node -r namespace-polyfill [your-entry-point.js]
Now what?
You can start using the nodejs: namespace
const fs = require('nodejs:fs');