$ npm install console -g
Drop-in replacement for
console
- a cross-environment fix for missing methods.
npm install console --save
And then import it:
// using es modules
import console from 'console'
// common.js
const console = require('console').default
// AMD
// I've forgotten but it should work.
Or use script tags and globals.
<script src="https://unpkg.com/console/umd/console.min.js"></script>
And then grab it off the global like so:
const console = console.default
© 2010 - cnpmjs.org x YWFE | Home | YWFE