2
0
mirror of https://github.com/tenrok/vue-context.git synced 2026-06-01 14:34:02 +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
-5
View File
@@ -2281,11 +2281,6 @@
"integrity": "sha1-Z29us8OZl8LuGsOpJP1hJHSPV40=",
"dev": true
},
"core-js": {
"version": "2.6.9",
"resolved": "https://registry.npmjs.org/core-js/-/core-js-2.6.9.tgz",
"integrity": "sha512-HOpZf6eXmnl7la+cUdMnLvUxKNqLUzJvgIziQ0DiF3JwSImNphIqdGqzj6hIKyX04MmV0poclQ7+wjWvxQyR2A=="
},
"core-js-compat": {
"version": "3.1.4",
"resolved": "https://registry.npmjs.org/core-js-compat/-/core-js-compat-3.1.4.tgz",
-1
View File
@@ -26,7 +26,6 @@
},
"homepage": "https://vue-context.com/docs",
"dependencies": {
"core-js": ">=2.6.5 <3.0.0",
"vue-clickaway": "^2.2.2"
},
"devDependencies": {
+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,