зеркало из https://github.com/telerik/dss.git
fix: reduce bundle size by using only lodash.has instead of full lodash
This commit is contained in:
Родитель
2c440d27da
Коммит
a81f1dbca6
4
dss.js
4
dss.js
|
@ -1,4 +1,4 @@
|
|||
const _ = require('lodash');
|
||||
const _has = require('lodash.has');
|
||||
|
||||
// DSS Object
|
||||
let dss = ( function() {
|
||||
|
@ -107,7 +107,7 @@ let dss = ( function() {
|
|||
}
|
||||
} else {
|
||||
for ( let key in obj ) {
|
||||
if ( _.has( obj, key ) ) {
|
||||
if ( _has( obj, key ) ) {
|
||||
if ( iterator.call( context, obj[ key ], key, obj ) === {} ) {
|
||||
return;
|
||||
}
|
||||
|
|
|
@ -2603,7 +2603,8 @@
|
|||
"lodash": {
|
||||
"version": "4.17.20",
|
||||
"resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.20.tgz",
|
||||
"integrity": "sha512-PlhdFcillOINfeV7Ni6oF1TAEayyZBoZ8bcshTHqOYJYlrqzRK5hagpagky5o4HfCzzd1TRkXPMFq6cKk9rGmA=="
|
||||
"integrity": "sha512-PlhdFcillOINfeV7Ni6oF1TAEayyZBoZ8bcshTHqOYJYlrqzRK5hagpagky5o4HfCzzd1TRkXPMFq6cKk9rGmA==",
|
||||
"dev": true
|
||||
},
|
||||
"lodash.capitalize": {
|
||||
"version": "4.2.1",
|
||||
|
@ -2617,6 +2618,11 @@
|
|||
"integrity": "sha1-ZHYsSGGAglGKw99Mz11YhtriA0c=",
|
||||
"dev": true
|
||||
},
|
||||
"lodash.has": {
|
||||
"version": "4.5.2",
|
||||
"resolved": "https://registry.npmjs.org/lodash.has/-/lodash.has-4.5.2.tgz",
|
||||
"integrity": "sha1-0Z9NwQlQWMzL4rDN9O4P5Ko3yGI="
|
||||
},
|
||||
"lodash.ismatch": {
|
||||
"version": "4.4.0",
|
||||
"resolved": "https://registry.npmjs.org/lodash.ismatch/-/lodash.ismatch-4.4.0.tgz",
|
||||
|
|
|
@ -22,7 +22,7 @@
|
|||
},
|
||||
"peerDependencies": {},
|
||||
"dependencies": {
|
||||
"lodash": "^4.17.20"
|
||||
"lodash.has": "^4.5.2"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@commitlint/cli": "^11.0.0",
|
||||
|
|
Загрузка…
Ссылка в новой задаче