~vovd/node-lodash/HEAD

« back to all changes in this revision

Viewing changes to lodash-cli/lib/listing.js

  • Committer: Pirate Praveen
  • Date: 2019-06-27 13:33:14 UTC
  • Revision ID: git-v1:938a1fd13c57018e0e1859f0c4ec13533eb09b6e
Import Debian changes 4.17.11+dfsg-3

node-lodash (4.17.11+dfsg-3) experimental; urgency=medium

  [ Xavier Guimard ]
  * Add upstream/metadata
  * Update URLs to https
  * Use debian/clean to clean build
  * Fix debian/watch

  [ Pirate Praveen ]
  * Generate ES modules and provide node-lodash-es

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
'use strict';
 
2
 
 
3
var _ = require('lodash'),
 
4
    mapping = require('./mapping'),
 
5
    util = require('./util'),
 
6
    Hash = util.Hash;
 
7
 
 
8
/*----------------------------------------------------------------------------*/
 
9
 
 
10
/** List of all function property dependencies. */
 
11
exports.funcDeps = _.uniq(_.flatMap(mapping.funcDep)).sort();
 
12
 
 
13
/** List of all variable dependencies. */
 
14
exports.varDeps = _.uniq(_.flatMap(mapping.varDep)).sort();
 
15
 
 
16
/** List of `exports` options. */
 
17
exports.buildExports = new Hash({
 
18
  'all': [
 
19
    'amd',
 
20
    'es',
 
21
    'global',
 
22
    'node',
 
23
    'npm',
 
24
    'umd'
 
25
  ],
 
26
  'defaults': {
 
27
    'modularize': [
 
28
      'node'
 
29
    ],
 
30
    'monolithic': [
 
31
      'amd',
 
32
      'global',
 
33
      'node',
 
34
      'umd'
 
35
    ]
 
36
  },
 
37
  'modularize': [
 
38
    'amd',
 
39
    'es',
 
40
    'node',
 
41
    'npm'
 
42
  ],
 
43
  'monolithic': [
 
44
    'amd',
 
45
    'global',
 
46
    'node',
 
47
    'umd'
 
48
  ],
 
49
  'umd': [
 
50
    'amd',
 
51
    'global',
 
52
    'node'
 
53
  ]
 
54
});
 
55
 
 
56
/** List of build flags. */
 
57
exports.buildFlags = [
 
58
  'core',
 
59
  'modularize',
 
60
  'strict',
 
61
  '-c', '--stdout',
 
62
  '-d', '--development',
 
63
  '-h', '--help',
 
64
  '-m', '--source-map',
 
65
  '-o', '--output',
 
66
  '-p', '--production',
 
67
  '-s', '--silent',
 
68
  '-V', '--version'
 
69
];
 
70
 
 
71
/** List of ES3 built-ins. */
 
72
exports.builtins = [
 
73
  'Array',
 
74
  'Boolean',
 
75
  'Date',
 
76
  'Error',
 
77
  'EvalError',
 
78
  'Function',
 
79
  'Math',
 
80
  'Object',
 
81
  'RangeError',
 
82
  'ReferenceError',
 
83
  'RegExp',
 
84
  'String',
 
85
  'SyntaxError',
 
86
  'TypeError',
 
87
  'URIEror'
 
88
];
 
89
 
 
90
/** List of all function categories. */
 
91
exports.categories = _.keys(mapping.category).sort();
 
92
 
 
93
/** List of variables with complex assignments. */
 
94
exports.complexVars = [
 
95
  'cloneableTags',
 
96
  'maskSrcKey',
 
97
  'nodeUtil',
 
98
  'reComplexWord',
 
99
  'typedArrayTags'
 
100
];
 
101
 
 
102
/** List of functions included in the "core" build. */
 
103
exports.coreFuncs = [
 
104
  'assignIn',
 
105
  'before',
 
106
  'bind',
 
107
  'chain',
 
108
  'clone',
 
109
  'compact',
 
110
  'concat',
 
111
  'create',
 
112
  'defaults',
 
113
  'defer',
 
114
  'delay',
 
115
  'escape',
 
116
  'every',
 
117
  'filter',
 
118
  'find',
 
119
  'flatten',
 
120
  'flattenDeep',
 
121
  'forEach',
 
122
  'has',
 
123
  'head',
 
124
  'identity',
 
125
  'indexOf',
 
126
  'isArguments',
 
127
  'isArray',
 
128
  'isBoolean',
 
129
  'isDate',
 
130
  'isEmpty',
 
131
  'isEqual',
 
132
  'isFinite',
 
133
  'isFunction',
 
134
  'isNaN',
 
135
  'isNull',
 
136
  'isNumber',
 
137
  'isObject',
 
138
  'isRegExp',
 
139
  'isString',
 
140
  'isUndefined',
 
141
  'iteratee',
 
142
  'keys',
 
143
  'last',
 
144
  'map',
 
145
  'matches',
 
146
  'max',
 
147
  'min',
 
148
  'mixin',
 
149
  'negate',
 
150
  'noConflict',
 
151
  'noop',
 
152
  'once',
 
153
  'pick',
 
154
  'reduce',
 
155
  'result',
 
156
  'size',
 
157
  'slice',
 
158
  'some',
 
159
  'sortBy',
 
160
  'tap',
 
161
  'thru',
 
162
  'toArray',
 
163
  'uniqueId',
 
164
  'value',
 
165
  'values'
 
166
];
 
167
 
 
168
/** List of all functions. */
 
169
exports.funcs = _.filter(_.difference(_.keys(mapping.funcDep), exports.varDeps).sort(), function(key) {
 
170
  var type = typeof _.prototype[key];
 
171
  return type == 'function' || type == 'undefined';
 
172
});
 
173
 
 
174
/** List of lodash functions included by default. */
 
175
exports.includes = _.intersection(exports.funcs, _.concat(
 
176
  _.functions(_),
 
177
  _.functions(_.prototype),
 
178
  mapping.category.Seq,
 
179
  ['main']
 
180
));
 
181
 
 
182
/** List of dependencies that should not cause a minor bump when changed. */
 
183
exports.laxSemVerDeps = [
 
184
  'eq',
 
185
  'gt',
 
186
  'gte',
 
187
  'isArguments',
 
188
  'isArray',
 
189
  'isArrayBuffer',
 
190
  'isArrayLike',
 
191
  'isArrayLikeObject',
 
192
  'isBoolean',
 
193
  'isBuffer',
 
194
  'isDate',
 
195
  'isElement',
 
196
  'isError',
 
197
  'isFinite',
 
198
  'isFunction',
 
199
  'isInteger',
 
200
  'isLength',
 
201
  'isMap',
 
202
  'isNaN',
 
203
  'isNative',
 
204
  'isNil',
 
205
  'isNull',
 
206
  'isNumber',
 
207
  'isObject',
 
208
  'isObjectLike',
 
209
  'isRegExp',
 
210
  'isSafeInteger',
 
211
  'isSet',
 
212
  'isString',
 
213
  'isSymbol',
 
214
  'isTypedArray',
 
215
  'isUndefined',
 
216
  'isWeakMap',
 
217
  'isWeakSet',
 
218
  'lt',
 
219
  'lte',
 
220
  'root',
 
221
  'toInteger',
 
222
  'toLength',
 
223
  'toNumber',
 
224
  'toSafeInteger',
 
225
  'toString'
 
226
];
 
227
 
 
228
/** List of properties to escape from minification. */
 
229
exports.minifyEscapes = _.union(
 
230
  _.keys(_),
 
231
  _.keys(_.prototype),
 
232
  _.keys(_.templateSettings), [
 
233
  'IE_PROTO',
 
234
  'NEGATIVE_INFINITY',
 
235
  'POSITIVE_INFINITY',
 
236
  'Array',
 
237
  'ArrayBuffer',
 
238
  'Boolean',
 
239
  'Buffer',
 
240
  'Cache',
 
241
  'Date',
 
242
  'Error',
 
243
  'Float32Array',
 
244
  'Float64Array',
 
245
  'Function',
 
246
  'Int8Array',
 
247
  'Int16Array',
 
248
  'Int32Array',
 
249
  'Map',
 
250
  'Math',
 
251
  'Number',
 
252
  'Object',
 
253
  'Promise',
 
254
  'Reflect',
 
255
  'RegExp',
 
256
  'Set',
 
257
  'String',
 
258
  'Symbol',
 
259
  'TypeError',
 
260
  'Uint8Array',
 
261
  'Uint8ClampedArray',
 
262
  'Uint16Array',
 
263
  'Uint32Array',
 
264
  'WeakMap',
 
265
  'WeakSet',
 
266
  'WinRTError',
 
267
  '__actions__',
 
268
  '__chain__',
 
269
  '__data__',
 
270
  '__dir__',
 
271
  '__filtered__',
 
272
  '__index__',
 
273
  '__iteratees__',
 
274
  '__takeCount__',
 
275
  '__values__',
 
276
  '__views__',
 
277
  '__wrapped__',
 
278
  'add',
 
279
  'amd',
 
280
  'args',
 
281
  'binding',
 
282
  'buffer',
 
283
  'byteLength',
 
284
  'cache',
 
285
  'cancel',
 
286
  'clear',
 
287
  'clearTimeout',
 
288
  'configurable',
 
289
  'copy',
 
290
  'count',
 
291
  'criteria',
 
292
  'delete',
 
293
  'document',
 
294
  'done',
 
295
  'end',
 
296
  'enumerable',
 
297
  'exports',
 
298
  'flush',
 
299
  'func',
 
300
  'get',
 
301
  'global',
 
302
  'has',
 
303
  'hash',
 
304
  'index',
 
305
  'isConcatSpreadable',
 
306
  'iteratee',
 
307
  'iterator',
 
308
  'leading',
 
309
  'length',
 
310
  'limit',
 
311
  'map',
 
312
  'maxWait',
 
313
  'message',
 
314
  'name',
 
315
  'next',
 
316
  'nodeType',
 
317
  'omission',
 
318
  'parseFloat',
 
319
  'placeholder',
 
320
  'process',
 
321
  'self',
 
322
  'separator',
 
323
  'set',
 
324
  'setTimeout',
 
325
  'size',
 
326
  'source',
 
327
  'sourceURL',
 
328
  'start',
 
329
  'string',
 
330
  'thisArg',
 
331
  'trailing',
 
332
  'type',
 
333
  'value',
 
334
  'window',
 
335
  'writable'
 
336
]);
 
337
 
 
338
/** List of functions that support argument placeholders. */
 
339
exports.placeholderFuncs = [
 
340
  'bind',
 
341
  'bindKey',
 
342
  'curry',
 
343
  'curryRight',
 
344
  'partial',
 
345
  'partialRight'
 
346
];
 
347
 
 
348
/* Used to designate dependencies at the top level. */
 
349
exports.topLevelDeps = [
 
350
  'main'
 
351
];
 
352
 
 
353
/** List of uninlinable dependencies. */
 
354
exports.uninlinables = [
 
355
  'reInterpolate',
 
356
  'templateSettings'
 
357
];