0.0.3 • Published 6 years ago
unkn v0.0.3
Unkn
ES6 to Commonjs
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:
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);