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:
+13
-4
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user