Begin to move all src javascript to es6. Add search/filter ignore case option.

This commit is contained in:
Lars Jung 2016-06-02 23:16:23 +02:00
parent f37e8e7b89
commit 7ec2bdf16a
58 changed files with 3546 additions and 3420 deletions

View file

@ -0,0 +1,23 @@
const win = window; // eslint-disable-line no-undef
if (typeof win !== 'object' || win.window !== win || !win.document) {
throw new Error('no-window');
}
const noBrowser = 'no-browser';
const doc = win.document;
const docEl = doc.documentElement;
docEl.className = '';
function assert(expr, hint) {
if (!expr) {
docEl.className = noBrowser;
throw new Error(`${noBrowser}: ${hint}`);
}
}
assert(!doc.getElementById(noBrowser), 'ie<10');
assert(typeof Object.assign === 'function', 'assign');
assert(typeof Promise === 'function', 'promise');
module.exports = win;