2
0
mirror of https://github.com/tenrok/vue-context.git synced 2026-06-09 00:12:23 +03:00

Merge pull request #39 from rawilk/remove-core-js-dep

This commit is contained in:
Randall Wilk
2019-10-11 22:57:09 -05:00
committed by GitHub
3 changed files with 13 additions and 10 deletions
+13 -4
View File
@@ -1,10 +1,19 @@
import fromPolyfill from 'core-js/library/fn/array/from';
import isArrayPolyfill from 'core-js/library/fn/array/is-array';
if (! Array.from) {
Array.from = object => {
'use strict';
return [].slice.call(object);
};
}
if (! Array.isArray) {
Array.isArray = arg => Object.prototype.toString.call(arg) === '[object Array]';
}
// --- Constants ---
const arrayFrom = Array.from || fromPolyfill;
const arrayFrom = Array.from;
export const isArray = Array.isArray || isArrayPolyfill;
export const isArray = Array.isArray;
export const keyCodes = {
ESC: 27,