choo-shortcache
Version:
choo nanocomponent cache shortcut
12 lines (9 loc) • 297 B
JavaScript
var window = require('global/window')
if (isElectron()) {
module.exports = require('./index.js') // explicite relative import to avoid browser field
} else {
module.exports = function () {}
}
function isElectron () {
return window && window.process && window.process.type === 'renderer'
}