browser utils
npm install steamer-browserutils



./src/libs/
// Node
let utils = require('steamer-browserutils');
// or
let utils = require('steamer-browserutils/dist/index.cjs.js); // ES6
import { extend, isType } from 'steamer-browserutils/dist/index.esm.js';
// umd
// you can use index.umd.js
`By default, we require
steamer-browserutils/index.js which is an es5 version. However, sometimes you may need es6 version for tree-shaking in webpack or rollup, then you can explicitly require steamer-browserutils/index.esm.js.You also need to notice that compling tool like
webpack may exclude node_modules when compling js files in order to speed up the whole compling process. If so, please remove this config or just put ./dist/index.esm.js in your src folder.
`
{
test: /\.js?$/,
loader: 'babel',
query: {
// cacheDirectory: './webpack_cache/',
plugins: ['transform-decorators-legacy'],
presets: [
'es2015-loose',
'react',
]
},
exclude: /node_modules/,
},
`$3
If you hope to customized certain types of APIs. For example, if you hope to exclude safe and native APIs, you can modify ./src/mains.js by commenting safe and natve export.`
// export {
// callApi,
// } from './libs/native';
// export {
// encodeHTML,
// decodeHTML
// } from './libs/safe';
`Please be cautious if you want to exlucde
common since other APIs use its functions.$3
`javascript
npm test
``