Skip to content

Commit 50a871a

Browse files
authored
use lodash submodule instead of main module (#134)
* use lodash submodule instead of main module * 2.14.12
1 parent e6c7b63 commit 50a871a

File tree

6 files changed

+31
-35
lines changed

6 files changed

+31
-35
lines changed

package-lock.json

Lines changed: 10 additions & 26 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@themost/query",
3-
"version": "2.14.11",
3+
"version": "2.14.12",
44
"description": "MOST Web Framework Codename ZeroGravity - Query Module",
55
"main": "dist/index.cjs.js",
66
"module": "dist/index.esm.js",
@@ -41,7 +41,7 @@
4141
"@themost/common": "^2.10.4",
4242
"@themost/json-logger": "^1.1.0",
4343
"@themost/peers": "^1.0.2",
44-
"@themost/sqlite": "^2.9.3",
44+
"@themost/sqlite": "^2.10.0",
4545
"@types/jasmine": "^3.5.14",
4646
"@types/node": "^17.0.23",
4747
"@types/sprintf-js": "^1.1.2",

src/formatter.js

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,12 @@
11
// MOST Web Framework Codename Zero Gravity Copyright (c) 2017-2022, THEMOST LP All rights reserved
22
import { SqlUtils } from './utils';
33
import { sprintf } from 'sprintf-js';
4-
import { isNil, isString, isFunction, map, forEach, isObject } from 'lodash';
4+
import isNil from 'lodash/isNil';
5+
import isString from 'lodash/isString';
6+
import isFunction from 'lodash/isFunction';
7+
import isObject from 'lodash/isObject';
8+
import map from 'lodash/map';
9+
import forEach from 'lodash/forEach';
510
import { QueryEntity, QueryExpression, QueryField } from './query';
611
import { instanceOf } from './instance-of';
712
import './polyfills';

src/is-object.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
1-
import {isPlainObject, isObjectLike, isNative} from 'lodash';
1+
import isPlainObject from 'lodash/isPlainObject';
2+
import isObjectLike from 'lodash/isObjectLike';
3+
import isNative from 'lodash/isNative';
24

35
const objectToString = Function.prototype.toString.call(Object);
46

src/odata.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ import {
1212
} from './expressions';
1313
import { SelectAnyExpression, AnyExpressionFormatter } from './expressions';
1414
import { OrderByAnyExpression } from './expressions';
15-
import { trim } from 'lodash';
15+
import trim from 'lodash/trim';
1616
import { series } from 'async'
1717

1818
class OpenDataParser {

src/query.js

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,10 @@
11
// MOST Web Framework Codename Zero Gravity Copyright (c) 2017-2022, THEMOST LP All rights reserved
2-
import { keys as _keys, isArray, isNil, cloneDeep, forEach, assign, isObject } from 'lodash';
2+
import isArray from 'lodash/isArray';
3+
import isNil from 'lodash/isNil';
4+
import cloneDeep from 'lodash/cloneDeep';
5+
import forEach from 'lodash/forEach';
6+
import assign from 'lodash/assign';
7+
import isObject from 'lodash/isObject';
38
import { ClosureParser } from './closures/ClosureParser';
49
const aggregate = Symbol();
510
import './polyfills';
@@ -38,7 +43,7 @@ class QueryFieldAggregator {
3843
* @param {*} comparison
3944
*/
4045
wrapWith(comparison) {
41-
let name = _keys(this)[0];
46+
let name = Object.keys(this)[0];
4247
if (name) {
4348
if (isArray(this[name])) {
4449
//search for query parameter
@@ -928,7 +933,7 @@ class QueryExpression {
928933
let op = this.privates.expression;
929934
if (op) {
930935
//get current operator
931-
let keys = _keys(this.$where);
936+
let keys = Object.keys(this.$where);
932937
if (keys[0] === op) {
933938
this.$where[op].push(expr);
934939
}
@@ -1801,7 +1806,7 @@ class QueryField {
18011806
if (typeof alias === 'undefined') {
18021807
if (typeof this.$name !== 'undefined')
18031808
return null;
1804-
let keys = _keys(this);
1809+
let keys = Object.keys(this);
18051810
if (keys.length === 0)
18061811
return null;
18071812

0 commit comments

Comments
 (0)