unkn

0.0.3 • Public • Published

Unkn

ES6 to Commonjs

stability

Usage:

One of the ways you can use Unkn is through the require hook. The require hook will bind itself to node's require and automatically compile files on the fly.

require('unkn/register')();

You can also use the command line:

unkn script.next.js --replace='/.next(.js)?/i,$1'

or node:

play with runkit

const unkn = require('unkn');
 
const source = `
/* eslint-disable no-unused-vars */
import * as internal from './internal/index.js';
import * as has from './has/index.js';
import * as is from './is/index.js';
 
export * from './internal/index.js';
export { has, is };
export { default as as } from './as/index.js';
export { default as schema } from './schema/index.js';
`;
 
unkn(source);

Package Sidebar

Install

npm i unkn

Weekly Downloads

1

Version

0.0.3

License

MIT

Unpacked Size

21.5 kB

Total Files

28

Last publish

Collaborators

  • adriancmiranda