|
1 | 1 | import * as ODataParser from '../odata-parser'; |
2 | 2 | import { expect } from 'chai'; |
3 | | -import * as _ from 'lodash'; |
4 | 3 |
|
5 | 4 | type BindPrimitive = number | string | boolean | object; |
6 | 5 | const getBindType = function (value: BindPrimitive) { |
7 | | - if (_.isNumber(value)) { |
| 6 | + if (typeof value === 'number') { |
8 | 7 | return ['Real', value]; |
9 | | - } else if (_.isString(value)) { |
| 8 | + } else if (typeof value === 'string') { |
10 | 9 | return ['Text', value]; |
11 | | - } else if (_.isBoolean(value)) { |
| 10 | + } else if (typeof value === 'boolean') { |
12 | 11 | return ['Boolean', value]; |
13 | 12 | } else { |
14 | 13 | return value; |
@@ -61,11 +60,11 @@ function raw( |
61 | 60 | const expectation = optArgs.pop() as ExpectationFn; |
62 | 61 | const [binds = [], options = { startRule: 'Process' }, params = {}] = |
63 | 62 | optArgs as any as [binds?: Binds, opts?: Opts, params?: Params]; |
64 | | - const processedBinds = _.map(binds, getBindType) as Binds & |
| 63 | + const processedBinds = binds.map(getBindType) as Binds & |
65 | 64 | Record<string, BindPrimitive>; |
66 | | - _.each(params, (value, key) => { |
| 65 | + for (const [key, value] of Object.entries(params)) { |
67 | 66 | processedBinds[key] = getBindType(value); |
68 | | - }); |
| 67 | + } |
69 | 68 | describe(`Parsing ${input}`, function () { |
70 | 69 | let result; |
71 | 70 | try { |
|
0 commit comments