Stub module.
Features presented in this stub:
- ESLint.
- Babel.
- Terser.
- TypeScript support.
- ESM and CommonJS output.
- TypeScript declaration generation.
- JSDoc generation.
Though you can import CommonJS files, it's highly recommended to use ESM
modules with .js
extension and TypeScript. Otherwise declaration
generation can produce broken declarations.
Install via yarn:
yarn add stub
Install via npm:
npm i stub
Read the docs on GitHub pages.
const { stub, } = require('stub');
import { stub, } from 'stub';
console.log(stub(false)); // 'bar'