ansuko 1.3.13 → 1.3.15
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.ts +308 -308
- package/dist/index.js +51 -49
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import
|
|
1
|
+
import lodash from "lodash";
|
|
2
2
|
/**
|
|
3
3
|
* Checks if the value is a non-empty string. null/undefined/empty string -> false.
|
|
4
4
|
* @param str - Value to check
|
|
@@ -213,7 +213,7 @@ declare const arrayDepth: (ary: unknown) => number;
|
|
|
213
213
|
* Extends ansuko with a plugin and returns the augmented instance.
|
|
214
214
|
* @param plugin - Plugin function
|
|
215
215
|
* @returns Extended instance
|
|
216
|
-
* @example const extended =
|
|
216
|
+
* @example const extended = lodash.extend(jaPlugin)
|
|
217
217
|
* @category Core Functions
|
|
218
218
|
*/
|
|
219
219
|
declare const extend: <T extends AnsukoType, E>(this: T, plugin: (a: T) => T & E) => T & E;
|
|
@@ -242,311 +242,311 @@ export interface AnsukoType {
|
|
|
242
242
|
isEmpty: typeof isEmpty;
|
|
243
243
|
toNumber: typeof toNumber;
|
|
244
244
|
castArray: typeof castArray;
|
|
245
|
-
isEmptyOrg: typeof
|
|
246
|
-
toNumberOrg: typeof
|
|
247
|
-
castArrayOrg: typeof
|
|
248
|
-
add: typeof
|
|
249
|
-
after: typeof
|
|
250
|
-
ary: typeof
|
|
251
|
-
assign: typeof
|
|
252
|
-
assignIn: typeof
|
|
253
|
-
assignInWith: typeof
|
|
254
|
-
assignWith: typeof
|
|
255
|
-
at: typeof
|
|
256
|
-
attempt: typeof
|
|
257
|
-
before: typeof
|
|
258
|
-
bind: typeof
|
|
259
|
-
bindAll: typeof
|
|
260
|
-
bindKey: typeof
|
|
261
|
-
camelCase: typeof
|
|
262
|
-
capitalize: typeof
|
|
263
|
-
ceil: typeof
|
|
264
|
-
chain: typeof
|
|
265
|
-
chunk: typeof
|
|
266
|
-
clamp: typeof
|
|
267
|
-
clone: typeof
|
|
268
|
-
cloneDeep: typeof
|
|
269
|
-
cloneDeepWith: typeof
|
|
270
|
-
cloneWith: typeof
|
|
271
|
-
compact: typeof
|
|
272
|
-
concat: typeof
|
|
273
|
-
cond: typeof
|
|
274
|
-
conforms: typeof
|
|
275
|
-
conformsTo: typeof
|
|
276
|
-
constant: typeof
|
|
277
|
-
countBy: typeof
|
|
278
|
-
create: typeof
|
|
279
|
-
curry: typeof
|
|
280
|
-
curryRight: typeof
|
|
281
|
-
debounce: typeof
|
|
282
|
-
deburr: typeof
|
|
283
|
-
defaultTo: typeof
|
|
284
|
-
defaults: typeof
|
|
285
|
-
defaultsDeep: typeof
|
|
286
|
-
defer: typeof
|
|
287
|
-
delay: typeof
|
|
288
|
-
difference: typeof
|
|
289
|
-
differenceBy: typeof
|
|
290
|
-
differenceWith: typeof
|
|
291
|
-
divide: typeof
|
|
292
|
-
drop: typeof
|
|
293
|
-
dropRight: typeof
|
|
294
|
-
dropRightWhile: typeof
|
|
295
|
-
dropWhile: typeof
|
|
296
|
-
each: typeof
|
|
297
|
-
eachRight: typeof
|
|
298
|
-
endsWith: typeof
|
|
299
|
-
entries: typeof
|
|
300
|
-
entriesIn: typeof
|
|
301
|
-
eq: typeof
|
|
302
|
-
escape: typeof
|
|
303
|
-
escapeRegExp: typeof
|
|
304
|
-
every: typeof
|
|
305
|
-
extendWith: typeof
|
|
306
|
-
fill: typeof
|
|
307
|
-
filter: typeof
|
|
308
|
-
find: typeof
|
|
309
|
-
findIndex: typeof
|
|
310
|
-
findKey: typeof
|
|
311
|
-
findLast: typeof
|
|
312
|
-
findLastIndex: typeof
|
|
313
|
-
findLastKey: typeof
|
|
314
|
-
first: typeof
|
|
315
|
-
flatMap: typeof
|
|
316
|
-
flatMapDeep: typeof
|
|
317
|
-
flatMapDepth: typeof
|
|
318
|
-
flatten: typeof
|
|
319
|
-
flattenDeep: typeof
|
|
320
|
-
flattenDepth: typeof
|
|
321
|
-
flip: typeof
|
|
322
|
-
floor: typeof
|
|
323
|
-
flow: typeof
|
|
324
|
-
flowRight: typeof
|
|
325
|
-
forEach: typeof
|
|
326
|
-
forEachRight: typeof
|
|
327
|
-
forIn: typeof
|
|
328
|
-
forInRight: typeof
|
|
329
|
-
forOwn: typeof
|
|
330
|
-
forOwnRight: typeof
|
|
331
|
-
fromPairs: typeof
|
|
332
|
-
functions: typeof
|
|
333
|
-
functionsIn: typeof
|
|
334
|
-
get: typeof
|
|
335
|
-
groupBy: typeof
|
|
336
|
-
gt: typeof
|
|
337
|
-
gte: typeof
|
|
338
|
-
has: typeof
|
|
339
|
-
hasIn: typeof
|
|
340
|
-
head: typeof
|
|
341
|
-
identity: typeof
|
|
342
|
-
inRange: typeof
|
|
343
|
-
includes: typeof
|
|
344
|
-
indexOf: typeof
|
|
345
|
-
initial: typeof
|
|
346
|
-
intersection: typeof
|
|
347
|
-
intersectionBy: typeof
|
|
348
|
-
intersectionWith: typeof
|
|
349
|
-
invert: typeof
|
|
350
|
-
invertBy: typeof
|
|
351
|
-
invoke: typeof
|
|
352
|
-
invokeMap: typeof
|
|
353
|
-
isArguments: typeof
|
|
354
|
-
isArray: typeof
|
|
355
|
-
isArrayBuffer: typeof
|
|
356
|
-
isArrayLike: typeof
|
|
357
|
-
isArrayLikeObject: typeof
|
|
358
|
-
isBoolean: typeof
|
|
359
|
-
isBuffer: typeof
|
|
360
|
-
isDate: typeof
|
|
361
|
-
isElement: typeof
|
|
362
|
-
isEqual: typeof
|
|
363
|
-
isEqualWith: typeof
|
|
364
|
-
isError: typeof
|
|
365
|
-
isFinite: typeof
|
|
366
|
-
isFunction: typeof
|
|
367
|
-
isInteger: typeof
|
|
368
|
-
isLength: typeof
|
|
369
|
-
isMap: typeof
|
|
370
|
-
isMatch: typeof
|
|
371
|
-
isMatchWith: typeof
|
|
372
|
-
isNaN: typeof
|
|
373
|
-
isNative: typeof
|
|
374
|
-
isNil: typeof
|
|
375
|
-
isNull: typeof
|
|
376
|
-
isNumber: typeof
|
|
377
|
-
isObject: typeof
|
|
378
|
-
isObjectLike: typeof
|
|
379
|
-
isPlainObject: typeof
|
|
380
|
-
isRegExp: typeof
|
|
381
|
-
isSafeInteger: typeof
|
|
382
|
-
isSet: typeof
|
|
383
|
-
isString: typeof
|
|
384
|
-
isSymbol: typeof
|
|
385
|
-
isTypedArray: typeof
|
|
386
|
-
isUndefined: typeof
|
|
387
|
-
isWeakMap: typeof
|
|
388
|
-
isWeakSet: typeof
|
|
389
|
-
iteratee: typeof
|
|
390
|
-
join: typeof
|
|
391
|
-
kebabCase: typeof
|
|
392
|
-
keyBy: typeof
|
|
393
|
-
keys: typeof
|
|
394
|
-
keysIn: typeof
|
|
395
|
-
last: typeof
|
|
396
|
-
lastIndexOf: typeof
|
|
397
|
-
lowerCase: typeof
|
|
398
|
-
lowerFirst: typeof
|
|
399
|
-
lt: typeof
|
|
400
|
-
lte: typeof
|
|
401
|
-
map: typeof
|
|
402
|
-
mapKeys: typeof
|
|
403
|
-
mapValues: typeof
|
|
404
|
-
matches: typeof
|
|
405
|
-
matchesProperty: typeof
|
|
406
|
-
max: typeof
|
|
407
|
-
maxBy: typeof
|
|
408
|
-
mean: typeof
|
|
409
|
-
meanBy: typeof
|
|
410
|
-
memoize: typeof
|
|
411
|
-
merge: typeof
|
|
412
|
-
mergeWith: typeof
|
|
413
|
-
method: typeof
|
|
414
|
-
methodOf: typeof
|
|
415
|
-
min: typeof
|
|
416
|
-
minBy: typeof
|
|
417
|
-
mixin: typeof
|
|
418
|
-
multiply: typeof
|
|
419
|
-
negate: typeof
|
|
420
|
-
noConflict: typeof
|
|
421
|
-
noop: typeof
|
|
422
|
-
now: typeof
|
|
423
|
-
nth: typeof
|
|
424
|
-
nthArg: typeof
|
|
425
|
-
omit: typeof
|
|
426
|
-
omitBy: typeof
|
|
427
|
-
once: typeof
|
|
428
|
-
orderBy: typeof
|
|
429
|
-
over: typeof
|
|
430
|
-
overArgs: typeof
|
|
431
|
-
overEvery: typeof
|
|
432
|
-
overSome: typeof
|
|
433
|
-
pad: typeof
|
|
434
|
-
padEnd: typeof
|
|
435
|
-
padStart: typeof
|
|
436
|
-
parseInt: typeof
|
|
437
|
-
partial: typeof
|
|
438
|
-
partialRight: typeof
|
|
439
|
-
partition: typeof
|
|
440
|
-
pick: typeof
|
|
441
|
-
pickBy: typeof
|
|
442
|
-
property: typeof
|
|
443
|
-
propertyOf: typeof
|
|
444
|
-
pull: typeof
|
|
445
|
-
pullAll: typeof
|
|
446
|
-
pullAllBy: typeof
|
|
447
|
-
pullAllWith: typeof
|
|
448
|
-
pullAt: typeof
|
|
449
|
-
random: typeof
|
|
450
|
-
range: typeof
|
|
451
|
-
rangeRight: typeof
|
|
452
|
-
rearg: typeof
|
|
453
|
-
reduce: typeof
|
|
454
|
-
reduceRight: typeof
|
|
455
|
-
reject: typeof
|
|
456
|
-
remove: typeof
|
|
457
|
-
repeat: typeof
|
|
458
|
-
replace: typeof
|
|
459
|
-
rest: typeof
|
|
460
|
-
result: typeof
|
|
461
|
-
reverse: typeof
|
|
462
|
-
round: typeof
|
|
463
|
-
runInContext: typeof
|
|
464
|
-
sample: typeof
|
|
465
|
-
sampleSize: typeof
|
|
466
|
-
set: typeof
|
|
467
|
-
setWith: typeof
|
|
468
|
-
shuffle: typeof
|
|
469
|
-
size: typeof
|
|
470
|
-
slice: typeof
|
|
471
|
-
snakeCase: typeof
|
|
472
|
-
some: typeof
|
|
473
|
-
sortBy: typeof
|
|
474
|
-
sortedIndex: typeof
|
|
475
|
-
sortedIndexBy: typeof
|
|
476
|
-
sortedIndexOf: typeof
|
|
477
|
-
sortedLastIndex: typeof
|
|
478
|
-
sortedLastIndexBy: typeof
|
|
479
|
-
sortedLastIndexOf: typeof
|
|
480
|
-
sortedUniq: typeof
|
|
481
|
-
sortedUniqBy: typeof
|
|
482
|
-
split: typeof
|
|
483
|
-
spread: typeof
|
|
484
|
-
startCase: typeof
|
|
485
|
-
startsWith: typeof
|
|
486
|
-
stubArray: typeof
|
|
487
|
-
stubFalse: typeof
|
|
488
|
-
stubObject: typeof
|
|
489
|
-
stubString: typeof
|
|
490
|
-
stubTrue: typeof
|
|
491
|
-
subtract: typeof
|
|
492
|
-
sum: typeof
|
|
493
|
-
sumBy: typeof
|
|
494
|
-
tail: typeof
|
|
495
|
-
take: typeof
|
|
496
|
-
takeRight: typeof
|
|
497
|
-
takeRightWhile: typeof
|
|
498
|
-
takeWhile: typeof
|
|
499
|
-
tap: typeof
|
|
500
|
-
template: typeof
|
|
501
|
-
throttle: typeof
|
|
502
|
-
thru: typeof
|
|
503
|
-
times: typeof
|
|
504
|
-
toArray: typeof
|
|
505
|
-
toFinite: typeof
|
|
506
|
-
toInteger: typeof
|
|
507
|
-
toLength: typeof
|
|
508
|
-
toLower: typeof
|
|
509
|
-
toPairs: typeof
|
|
510
|
-
toPairsIn: typeof
|
|
511
|
-
toPath: typeof
|
|
512
|
-
toPlainObject: typeof
|
|
513
|
-
toSafeInteger: typeof
|
|
514
|
-
toString: typeof
|
|
515
|
-
toUpper: typeof
|
|
516
|
-
transform: typeof
|
|
517
|
-
trim: typeof
|
|
518
|
-
trimEnd: typeof
|
|
519
|
-
trimStart: typeof
|
|
520
|
-
truncate: typeof
|
|
521
|
-
unary: typeof
|
|
522
|
-
unescape: typeof
|
|
523
|
-
union: typeof
|
|
524
|
-
unionBy: typeof
|
|
525
|
-
unionWith: typeof
|
|
526
|
-
uniq: typeof
|
|
527
|
-
uniqBy: typeof
|
|
528
|
-
uniqWith: typeof
|
|
529
|
-
uniqueId: typeof
|
|
530
|
-
unset: typeof
|
|
531
|
-
unzip: typeof
|
|
532
|
-
unzipWith: typeof
|
|
533
|
-
update: typeof
|
|
534
|
-
updateWith: typeof
|
|
535
|
-
upperCase: typeof
|
|
536
|
-
upperFirst: typeof
|
|
537
|
-
values: typeof
|
|
538
|
-
valuesIn: typeof
|
|
539
|
-
without: typeof
|
|
540
|
-
words: typeof
|
|
541
|
-
wrap: typeof
|
|
542
|
-
xor: typeof
|
|
543
|
-
xorBy: typeof
|
|
544
|
-
xorWith: typeof
|
|
545
|
-
zip: typeof
|
|
546
|
-
zipObject: typeof
|
|
547
|
-
zipObjectDeep: typeof
|
|
548
|
-
zipWith: typeof
|
|
245
|
+
isEmptyOrg: typeof lodash.isEmpty;
|
|
246
|
+
toNumberOrg: typeof lodash.toNumber;
|
|
247
|
+
castArrayOrg: typeof lodash.castArray;
|
|
248
|
+
add: typeof lodash.add;
|
|
249
|
+
after: typeof lodash.after;
|
|
250
|
+
ary: typeof lodash.ary;
|
|
251
|
+
assign: typeof lodash.assign;
|
|
252
|
+
assignIn: typeof lodash.assignIn;
|
|
253
|
+
assignInWith: typeof lodash.assignInWith;
|
|
254
|
+
assignWith: typeof lodash.assignWith;
|
|
255
|
+
at: typeof lodash.at;
|
|
256
|
+
attempt: typeof lodash.attempt;
|
|
257
|
+
before: typeof lodash.before;
|
|
258
|
+
bind: typeof lodash.bind;
|
|
259
|
+
bindAll: typeof lodash.bindAll;
|
|
260
|
+
bindKey: typeof lodash.bindKey;
|
|
261
|
+
camelCase: typeof lodash.camelCase;
|
|
262
|
+
capitalize: typeof lodash.capitalize;
|
|
263
|
+
ceil: typeof lodash.ceil;
|
|
264
|
+
chain: typeof lodash.chain;
|
|
265
|
+
chunk: typeof lodash.chunk;
|
|
266
|
+
clamp: typeof lodash.clamp;
|
|
267
|
+
clone: typeof lodash.clone;
|
|
268
|
+
cloneDeep: typeof lodash.cloneDeep;
|
|
269
|
+
cloneDeepWith: typeof lodash.cloneDeepWith;
|
|
270
|
+
cloneWith: typeof lodash.cloneWith;
|
|
271
|
+
compact: typeof lodash.compact;
|
|
272
|
+
concat: typeof lodash.concat;
|
|
273
|
+
cond: typeof lodash.cond;
|
|
274
|
+
conforms: typeof lodash.conforms;
|
|
275
|
+
conformsTo: typeof lodash.conformsTo;
|
|
276
|
+
constant: typeof lodash.constant;
|
|
277
|
+
countBy: typeof lodash.countBy;
|
|
278
|
+
create: typeof lodash.create;
|
|
279
|
+
curry: typeof lodash.curry;
|
|
280
|
+
curryRight: typeof lodash.curryRight;
|
|
281
|
+
debounce: typeof lodash.debounce;
|
|
282
|
+
deburr: typeof lodash.deburr;
|
|
283
|
+
defaultTo: typeof lodash.defaultTo;
|
|
284
|
+
defaults: typeof lodash.defaults;
|
|
285
|
+
defaultsDeep: typeof lodash.defaultsDeep;
|
|
286
|
+
defer: typeof lodash.defer;
|
|
287
|
+
delay: typeof lodash.delay;
|
|
288
|
+
difference: typeof lodash.difference;
|
|
289
|
+
differenceBy: typeof lodash.differenceBy;
|
|
290
|
+
differenceWith: typeof lodash.differenceWith;
|
|
291
|
+
divide: typeof lodash.divide;
|
|
292
|
+
drop: typeof lodash.drop;
|
|
293
|
+
dropRight: typeof lodash.dropRight;
|
|
294
|
+
dropRightWhile: typeof lodash.dropRightWhile;
|
|
295
|
+
dropWhile: typeof lodash.dropWhile;
|
|
296
|
+
each: typeof lodash.each;
|
|
297
|
+
eachRight: typeof lodash.eachRight;
|
|
298
|
+
endsWith: typeof lodash.endsWith;
|
|
299
|
+
entries: typeof lodash.entries;
|
|
300
|
+
entriesIn: typeof lodash.entriesIn;
|
|
301
|
+
eq: typeof lodash.eq;
|
|
302
|
+
escape: typeof lodash.escape;
|
|
303
|
+
escapeRegExp: typeof lodash.escapeRegExp;
|
|
304
|
+
every: typeof lodash.every;
|
|
305
|
+
extendWith: typeof lodash.extendWith;
|
|
306
|
+
fill: typeof lodash.fill;
|
|
307
|
+
filter: typeof lodash.filter;
|
|
308
|
+
find: typeof lodash.find;
|
|
309
|
+
findIndex: typeof lodash.findIndex;
|
|
310
|
+
findKey: typeof lodash.findKey;
|
|
311
|
+
findLast: typeof lodash.findLast;
|
|
312
|
+
findLastIndex: typeof lodash.findLastIndex;
|
|
313
|
+
findLastKey: typeof lodash.findLastKey;
|
|
314
|
+
first: typeof lodash.first;
|
|
315
|
+
flatMap: typeof lodash.flatMap;
|
|
316
|
+
flatMapDeep: typeof lodash.flatMapDeep;
|
|
317
|
+
flatMapDepth: typeof lodash.flatMapDepth;
|
|
318
|
+
flatten: typeof lodash.flatten;
|
|
319
|
+
flattenDeep: typeof lodash.flattenDeep;
|
|
320
|
+
flattenDepth: typeof lodash.flattenDepth;
|
|
321
|
+
flip: typeof lodash.flip;
|
|
322
|
+
floor: typeof lodash.floor;
|
|
323
|
+
flow: typeof lodash.flow;
|
|
324
|
+
flowRight: typeof lodash.flowRight;
|
|
325
|
+
forEach: typeof lodash.forEach;
|
|
326
|
+
forEachRight: typeof lodash.forEachRight;
|
|
327
|
+
forIn: typeof lodash.forIn;
|
|
328
|
+
forInRight: typeof lodash.forInRight;
|
|
329
|
+
forOwn: typeof lodash.forOwn;
|
|
330
|
+
forOwnRight: typeof lodash.forOwnRight;
|
|
331
|
+
fromPairs: typeof lodash.fromPairs;
|
|
332
|
+
functions: typeof lodash.functions;
|
|
333
|
+
functionsIn: typeof lodash.functionsIn;
|
|
334
|
+
get: typeof lodash.get;
|
|
335
|
+
groupBy: typeof lodash.groupBy;
|
|
336
|
+
gt: typeof lodash.gt;
|
|
337
|
+
gte: typeof lodash.gte;
|
|
338
|
+
has: typeof lodash.has;
|
|
339
|
+
hasIn: typeof lodash.hasIn;
|
|
340
|
+
head: typeof lodash.head;
|
|
341
|
+
identity: typeof lodash.identity;
|
|
342
|
+
inRange: typeof lodash.inRange;
|
|
343
|
+
includes: typeof lodash.includes;
|
|
344
|
+
indexOf: typeof lodash.indexOf;
|
|
345
|
+
initial: typeof lodash.initial;
|
|
346
|
+
intersection: typeof lodash.intersection;
|
|
347
|
+
intersectionBy: typeof lodash.intersectionBy;
|
|
348
|
+
intersectionWith: typeof lodash.intersectionWith;
|
|
349
|
+
invert: typeof lodash.invert;
|
|
350
|
+
invertBy: typeof lodash.invertBy;
|
|
351
|
+
invoke: typeof lodash.invoke;
|
|
352
|
+
invokeMap: typeof lodash.invokeMap;
|
|
353
|
+
isArguments: typeof lodash.isArguments;
|
|
354
|
+
isArray: typeof lodash.isArray;
|
|
355
|
+
isArrayBuffer: typeof lodash.isArrayBuffer;
|
|
356
|
+
isArrayLike: typeof lodash.isArrayLike;
|
|
357
|
+
isArrayLikeObject: typeof lodash.isArrayLikeObject;
|
|
358
|
+
isBoolean: typeof lodash.isBoolean;
|
|
359
|
+
isBuffer: typeof lodash.isBuffer;
|
|
360
|
+
isDate: typeof lodash.isDate;
|
|
361
|
+
isElement: typeof lodash.isElement;
|
|
362
|
+
isEqual: typeof lodash.isEqual;
|
|
363
|
+
isEqualWith: typeof lodash.isEqualWith;
|
|
364
|
+
isError: typeof lodash.isError;
|
|
365
|
+
isFinite: typeof lodash.isFinite;
|
|
366
|
+
isFunction: typeof lodash.isFunction;
|
|
367
|
+
isInteger: typeof lodash.isInteger;
|
|
368
|
+
isLength: typeof lodash.isLength;
|
|
369
|
+
isMap: typeof lodash.isMap;
|
|
370
|
+
isMatch: typeof lodash.isMatch;
|
|
371
|
+
isMatchWith: typeof lodash.isMatchWith;
|
|
372
|
+
isNaN: typeof lodash.isNaN;
|
|
373
|
+
isNative: typeof lodash.isNative;
|
|
374
|
+
isNil: typeof lodash.isNil;
|
|
375
|
+
isNull: typeof lodash.isNull;
|
|
376
|
+
isNumber: typeof lodash.isNumber;
|
|
377
|
+
isObject: typeof lodash.isObject;
|
|
378
|
+
isObjectLike: typeof lodash.isObjectLike;
|
|
379
|
+
isPlainObject: typeof lodash.isPlainObject;
|
|
380
|
+
isRegExp: typeof lodash.isRegExp;
|
|
381
|
+
isSafeInteger: typeof lodash.isSafeInteger;
|
|
382
|
+
isSet: typeof lodash.isSet;
|
|
383
|
+
isString: typeof lodash.isString;
|
|
384
|
+
isSymbol: typeof lodash.isSymbol;
|
|
385
|
+
isTypedArray: typeof lodash.isTypedArray;
|
|
386
|
+
isUndefined: typeof lodash.isUndefined;
|
|
387
|
+
isWeakMap: typeof lodash.isWeakMap;
|
|
388
|
+
isWeakSet: typeof lodash.isWeakSet;
|
|
389
|
+
iteratee: typeof lodash.iteratee;
|
|
390
|
+
join: typeof lodash.join;
|
|
391
|
+
kebabCase: typeof lodash.kebabCase;
|
|
392
|
+
keyBy: typeof lodash.keyBy;
|
|
393
|
+
keys: typeof lodash.keys;
|
|
394
|
+
keysIn: typeof lodash.keysIn;
|
|
395
|
+
last: typeof lodash.last;
|
|
396
|
+
lastIndexOf: typeof lodash.lastIndexOf;
|
|
397
|
+
lowerCase: typeof lodash.lowerCase;
|
|
398
|
+
lowerFirst: typeof lodash.lowerFirst;
|
|
399
|
+
lt: typeof lodash.lt;
|
|
400
|
+
lte: typeof lodash.lte;
|
|
401
|
+
map: typeof lodash.map;
|
|
402
|
+
mapKeys: typeof lodash.mapKeys;
|
|
403
|
+
mapValues: typeof lodash.mapValues;
|
|
404
|
+
matches: typeof lodash.matches;
|
|
405
|
+
matchesProperty: typeof lodash.matchesProperty;
|
|
406
|
+
max: typeof lodash.max;
|
|
407
|
+
maxBy: typeof lodash.maxBy;
|
|
408
|
+
mean: typeof lodash.mean;
|
|
409
|
+
meanBy: typeof lodash.meanBy;
|
|
410
|
+
memoize: typeof lodash.memoize;
|
|
411
|
+
merge: typeof lodash.merge;
|
|
412
|
+
mergeWith: typeof lodash.mergeWith;
|
|
413
|
+
method: typeof lodash.method;
|
|
414
|
+
methodOf: typeof lodash.methodOf;
|
|
415
|
+
min: typeof lodash.min;
|
|
416
|
+
minBy: typeof lodash.minBy;
|
|
417
|
+
mixin: typeof lodash.mixin;
|
|
418
|
+
multiply: typeof lodash.multiply;
|
|
419
|
+
negate: typeof lodash.negate;
|
|
420
|
+
noConflict: typeof lodash.noConflict;
|
|
421
|
+
noop: typeof lodash.noop;
|
|
422
|
+
now: typeof lodash.now;
|
|
423
|
+
nth: typeof lodash.nth;
|
|
424
|
+
nthArg: typeof lodash.nthArg;
|
|
425
|
+
omit: typeof lodash.omit;
|
|
426
|
+
omitBy: typeof lodash.omitBy;
|
|
427
|
+
once: typeof lodash.once;
|
|
428
|
+
orderBy: typeof lodash.orderBy;
|
|
429
|
+
over: typeof lodash.over;
|
|
430
|
+
overArgs: typeof lodash.overArgs;
|
|
431
|
+
overEvery: typeof lodash.overEvery;
|
|
432
|
+
overSome: typeof lodash.overSome;
|
|
433
|
+
pad: typeof lodash.pad;
|
|
434
|
+
padEnd: typeof lodash.padEnd;
|
|
435
|
+
padStart: typeof lodash.padStart;
|
|
436
|
+
parseInt: typeof lodash.parseInt;
|
|
437
|
+
partial: typeof lodash.partial;
|
|
438
|
+
partialRight: typeof lodash.partialRight;
|
|
439
|
+
partition: typeof lodash.partition;
|
|
440
|
+
pick: typeof lodash.pick;
|
|
441
|
+
pickBy: typeof lodash.pickBy;
|
|
442
|
+
property: typeof lodash.property;
|
|
443
|
+
propertyOf: typeof lodash.propertyOf;
|
|
444
|
+
pull: typeof lodash.pull;
|
|
445
|
+
pullAll: typeof lodash.pullAll;
|
|
446
|
+
pullAllBy: typeof lodash.pullAllBy;
|
|
447
|
+
pullAllWith: typeof lodash.pullAllWith;
|
|
448
|
+
pullAt: typeof lodash.pullAt;
|
|
449
|
+
random: typeof lodash.random;
|
|
450
|
+
range: typeof lodash.range;
|
|
451
|
+
rangeRight: typeof lodash.rangeRight;
|
|
452
|
+
rearg: typeof lodash.rearg;
|
|
453
|
+
reduce: typeof lodash.reduce;
|
|
454
|
+
reduceRight: typeof lodash.reduceRight;
|
|
455
|
+
reject: typeof lodash.reject;
|
|
456
|
+
remove: typeof lodash.remove;
|
|
457
|
+
repeat: typeof lodash.repeat;
|
|
458
|
+
replace: typeof lodash.replace;
|
|
459
|
+
rest: typeof lodash.rest;
|
|
460
|
+
result: typeof lodash.result;
|
|
461
|
+
reverse: typeof lodash.reverse;
|
|
462
|
+
round: typeof lodash.round;
|
|
463
|
+
runInContext: typeof lodash.runInContext;
|
|
464
|
+
sample: typeof lodash.sample;
|
|
465
|
+
sampleSize: typeof lodash.sampleSize;
|
|
466
|
+
set: typeof lodash.set;
|
|
467
|
+
setWith: typeof lodash.setWith;
|
|
468
|
+
shuffle: typeof lodash.shuffle;
|
|
469
|
+
size: typeof lodash.size;
|
|
470
|
+
slice: typeof lodash.slice;
|
|
471
|
+
snakeCase: typeof lodash.snakeCase;
|
|
472
|
+
some: typeof lodash.some;
|
|
473
|
+
sortBy: typeof lodash.sortBy;
|
|
474
|
+
sortedIndex: typeof lodash.sortedIndex;
|
|
475
|
+
sortedIndexBy: typeof lodash.sortedIndexBy;
|
|
476
|
+
sortedIndexOf: typeof lodash.sortedIndexOf;
|
|
477
|
+
sortedLastIndex: typeof lodash.sortedLastIndex;
|
|
478
|
+
sortedLastIndexBy: typeof lodash.sortedLastIndexBy;
|
|
479
|
+
sortedLastIndexOf: typeof lodash.sortedLastIndexOf;
|
|
480
|
+
sortedUniq: typeof lodash.sortedUniq;
|
|
481
|
+
sortedUniqBy: typeof lodash.sortedUniqBy;
|
|
482
|
+
split: typeof lodash.split;
|
|
483
|
+
spread: typeof lodash.spread;
|
|
484
|
+
startCase: typeof lodash.startCase;
|
|
485
|
+
startsWith: typeof lodash.startsWith;
|
|
486
|
+
stubArray: typeof lodash.stubArray;
|
|
487
|
+
stubFalse: typeof lodash.stubFalse;
|
|
488
|
+
stubObject: typeof lodash.stubObject;
|
|
489
|
+
stubString: typeof lodash.stubString;
|
|
490
|
+
stubTrue: typeof lodash.stubTrue;
|
|
491
|
+
subtract: typeof lodash.subtract;
|
|
492
|
+
sum: typeof lodash.sum;
|
|
493
|
+
sumBy: typeof lodash.sumBy;
|
|
494
|
+
tail: typeof lodash.tail;
|
|
495
|
+
take: typeof lodash.take;
|
|
496
|
+
takeRight: typeof lodash.takeRight;
|
|
497
|
+
takeRightWhile: typeof lodash.takeRightWhile;
|
|
498
|
+
takeWhile: typeof lodash.takeWhile;
|
|
499
|
+
tap: typeof lodash.tap;
|
|
500
|
+
template: typeof lodash.template;
|
|
501
|
+
throttle: typeof lodash.throttle;
|
|
502
|
+
thru: typeof lodash.thru;
|
|
503
|
+
times: typeof lodash.times;
|
|
504
|
+
toArray: typeof lodash.toArray;
|
|
505
|
+
toFinite: typeof lodash.toFinite;
|
|
506
|
+
toInteger: typeof lodash.toInteger;
|
|
507
|
+
toLength: typeof lodash.toLength;
|
|
508
|
+
toLower: typeof lodash.toLower;
|
|
509
|
+
toPairs: typeof lodash.toPairs;
|
|
510
|
+
toPairsIn: typeof lodash.toPairsIn;
|
|
511
|
+
toPath: typeof lodash.toPath;
|
|
512
|
+
toPlainObject: typeof lodash.toPlainObject;
|
|
513
|
+
toSafeInteger: typeof lodash.toSafeInteger;
|
|
514
|
+
toString: typeof lodash.toString;
|
|
515
|
+
toUpper: typeof lodash.toUpper;
|
|
516
|
+
transform: typeof lodash.transform;
|
|
517
|
+
trim: typeof lodash.trim;
|
|
518
|
+
trimEnd: typeof lodash.trimEnd;
|
|
519
|
+
trimStart: typeof lodash.trimStart;
|
|
520
|
+
truncate: typeof lodash.truncate;
|
|
521
|
+
unary: typeof lodash.unary;
|
|
522
|
+
unescape: typeof lodash.unescape;
|
|
523
|
+
union: typeof lodash.union;
|
|
524
|
+
unionBy: typeof lodash.unionBy;
|
|
525
|
+
unionWith: typeof lodash.unionWith;
|
|
526
|
+
uniq: typeof lodash.uniq;
|
|
527
|
+
uniqBy: typeof lodash.uniqBy;
|
|
528
|
+
uniqWith: typeof lodash.uniqWith;
|
|
529
|
+
uniqueId: typeof lodash.uniqueId;
|
|
530
|
+
unset: typeof lodash.unset;
|
|
531
|
+
unzip: typeof lodash.unzip;
|
|
532
|
+
unzipWith: typeof lodash.unzipWith;
|
|
533
|
+
update: typeof lodash.update;
|
|
534
|
+
updateWith: typeof lodash.updateWith;
|
|
535
|
+
upperCase: typeof lodash.upperCase;
|
|
536
|
+
upperFirst: typeof lodash.upperFirst;
|
|
537
|
+
values: typeof lodash.values;
|
|
538
|
+
valuesIn: typeof lodash.valuesIn;
|
|
539
|
+
without: typeof lodash.without;
|
|
540
|
+
words: typeof lodash.words;
|
|
541
|
+
wrap: typeof lodash.wrap;
|
|
542
|
+
xor: typeof lodash.xor;
|
|
543
|
+
xorBy: typeof lodash.xorBy;
|
|
544
|
+
xorWith: typeof lodash.xorWith;
|
|
545
|
+
zip: typeof lodash.zip;
|
|
546
|
+
zipObject: typeof lodash.zipObject;
|
|
547
|
+
zipObjectDeep: typeof lodash.zipObjectDeep;
|
|
548
|
+
zipWith: typeof lodash.zipWith;
|
|
549
549
|
}
|
|
550
|
-
declare const
|
|
551
|
-
export default
|
|
550
|
+
declare const _: AnsukoType;
|
|
551
|
+
export default _;
|
|
552
552
|
export { isEmpty, toNumber, boolIf, isValidStr, valueOr, equalsOr, waited, parseJSON, jsonStringify, castArray, changes, strWrap, swallow, swallowMap, arrayDepth, };
|
package/dist/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import
|
|
1
|
+
import lodash from "lodash";
|
|
2
2
|
import JSON5 from "json5";
|
|
3
3
|
import { toHalfWidth } from "./util.js";
|
|
4
4
|
/**
|
|
@@ -10,10 +10,10 @@ import { toHalfWidth } from "./util.js";
|
|
|
10
10
|
* @category Type Guards
|
|
11
11
|
*/
|
|
12
12
|
const isValidStr = (str) => {
|
|
13
|
-
if (
|
|
13
|
+
if (lodash.isNil(str)) {
|
|
14
14
|
return false;
|
|
15
15
|
}
|
|
16
|
-
if (
|
|
16
|
+
if (lodash.isEmpty(str)) {
|
|
17
17
|
return false;
|
|
18
18
|
}
|
|
19
19
|
return typeof str === "string";
|
|
@@ -26,7 +26,7 @@ const valueOr = (value, els) => {
|
|
|
26
26
|
// Promiseかチェック
|
|
27
27
|
if (resolvedValue instanceof Promise) {
|
|
28
28
|
return Promise.resolve(resolvedValue).then(res => {
|
|
29
|
-
if (
|
|
29
|
+
if (lodash.isNil(res) || isEmpty(res)) {
|
|
30
30
|
if (typeof els === "function") {
|
|
31
31
|
return els();
|
|
32
32
|
}
|
|
@@ -35,7 +35,7 @@ const valueOr = (value, els) => {
|
|
|
35
35
|
return res;
|
|
36
36
|
});
|
|
37
37
|
}
|
|
38
|
-
if (!
|
|
38
|
+
if (!lodash.isNil(resolvedValue) && !isEmpty(resolvedValue)) {
|
|
39
39
|
return resolvedValue;
|
|
40
40
|
}
|
|
41
41
|
if (typeof els === "function") {
|
|
@@ -51,7 +51,7 @@ const emptyOr = (value, els) => {
|
|
|
51
51
|
// Promiseかチェック
|
|
52
52
|
if (resolvedValue instanceof Promise) {
|
|
53
53
|
return Promise.resolve(resolvedValue).then(res => {
|
|
54
|
-
if (
|
|
54
|
+
if (lodash.isNil(res) || isEmpty(res)) {
|
|
55
55
|
return null;
|
|
56
56
|
}
|
|
57
57
|
if (typeof els === "function") {
|
|
@@ -60,7 +60,7 @@ const emptyOr = (value, els) => {
|
|
|
60
60
|
return els;
|
|
61
61
|
});
|
|
62
62
|
}
|
|
63
|
-
if (
|
|
63
|
+
if (lodash.isNil(resolvedValue) || isEmpty(resolvedValue)) {
|
|
64
64
|
return null;
|
|
65
65
|
}
|
|
66
66
|
if (typeof els === "function") {
|
|
@@ -87,9 +87,9 @@ const hasOr = (value, paths, els) => {
|
|
|
87
87
|
const pathArray = Array.isArray(paths) ? paths : [paths];
|
|
88
88
|
// パスが全て存在するかチェック
|
|
89
89
|
const checkPaths = (val) => {
|
|
90
|
-
if (
|
|
90
|
+
if (lodash.isNil(val) || isEmpty(val))
|
|
91
91
|
return false;
|
|
92
|
-
return pathArray.every(path =>
|
|
92
|
+
return pathArray.every(path => lodash.has(val, path));
|
|
93
93
|
};
|
|
94
94
|
// Promiseかチェック
|
|
95
95
|
if (resolvedValue instanceof Promise) {
|
|
@@ -120,16 +120,16 @@ const hasOr = (value, paths, els) => {
|
|
|
120
120
|
* @category Core Functions
|
|
121
121
|
*/
|
|
122
122
|
const isEmpty = (value) => {
|
|
123
|
-
if (
|
|
123
|
+
if (lodash.isNil(value)) {
|
|
124
124
|
return true;
|
|
125
125
|
}
|
|
126
|
-
if (
|
|
126
|
+
if (lodash.isNumber(value)) {
|
|
127
127
|
return false;
|
|
128
128
|
}
|
|
129
|
-
if (
|
|
129
|
+
if (lodash.isBoolean(value)) {
|
|
130
130
|
return false;
|
|
131
131
|
}
|
|
132
|
-
return
|
|
132
|
+
return lodash.isEmpty(value);
|
|
133
133
|
};
|
|
134
134
|
/**
|
|
135
135
|
* Converts a value to number (full-width and comma aware). Returns null when invalid.
|
|
@@ -144,10 +144,10 @@ const isEmpty = (value) => {
|
|
|
144
144
|
* @category Core Functions
|
|
145
145
|
*/
|
|
146
146
|
const toNumber = (value, toFixed) => {
|
|
147
|
-
if (
|
|
147
|
+
if (lodash.isNil(value)) {
|
|
148
148
|
return null;
|
|
149
149
|
}
|
|
150
|
-
if (
|
|
150
|
+
if (lodash.isNumber(value)) {
|
|
151
151
|
return value;
|
|
152
152
|
}
|
|
153
153
|
if (isEmpty(value)) {
|
|
@@ -155,16 +155,16 @@ const toNumber = (value, toFixed) => {
|
|
|
155
155
|
}
|
|
156
156
|
let v = toHalfWidth(value);
|
|
157
157
|
if (typeof v === "string" && v.trim().match(/^[0-9][0-9,.]*$/)) {
|
|
158
|
-
v =
|
|
158
|
+
v = lodash.toNumber(v.trim().replace(/,/g, ""));
|
|
159
159
|
}
|
|
160
160
|
else {
|
|
161
|
-
v =
|
|
161
|
+
v = lodash.toNumber(v);
|
|
162
162
|
}
|
|
163
|
-
if (!
|
|
164
|
-
const f =
|
|
163
|
+
if (!lodash.isNaN(v) && !lodash.isNil(toFixed)) {
|
|
164
|
+
const f = lodash.toNumber(toFixed);
|
|
165
165
|
v = parseFloat(v.toFixed(f));
|
|
166
166
|
}
|
|
167
|
-
if (
|
|
167
|
+
if (lodash.isNaN(v)) {
|
|
168
168
|
return null;
|
|
169
169
|
}
|
|
170
170
|
return v;
|
|
@@ -180,16 +180,16 @@ const toNumber = (value, toFixed) => {
|
|
|
180
180
|
* @category Core Functions
|
|
181
181
|
*/
|
|
182
182
|
const toBool = (value, undetected = null) => {
|
|
183
|
-
if (
|
|
183
|
+
if (lodash.isNil(value)) {
|
|
184
184
|
return false;
|
|
185
185
|
}
|
|
186
186
|
if (isEmpty(value)) {
|
|
187
187
|
return false;
|
|
188
188
|
}
|
|
189
|
-
if (
|
|
189
|
+
if (lodash.isBoolean(value)) {
|
|
190
190
|
return value;
|
|
191
191
|
}
|
|
192
|
-
if (
|
|
192
|
+
if (lodash.isNumber(value)) {
|
|
193
193
|
return value !== 0;
|
|
194
194
|
}
|
|
195
195
|
const n = toNumber(value);
|
|
@@ -231,10 +231,10 @@ const toBool = (value, undetected = null) => {
|
|
|
231
231
|
* @category Core Functions
|
|
232
232
|
*/
|
|
233
233
|
const boolIf = (value, defaultValue = false) => {
|
|
234
|
-
if (
|
|
234
|
+
if (lodash.isBoolean(value)) {
|
|
235
235
|
return value;
|
|
236
236
|
}
|
|
237
|
-
if (
|
|
237
|
+
if (lodash.isNumber(value)) {
|
|
238
238
|
return !!value;
|
|
239
239
|
}
|
|
240
240
|
return defaultValue;
|
|
@@ -286,10 +286,10 @@ const equalsOr = (...args) => {
|
|
|
286
286
|
Promise.resolve(p1),
|
|
287
287
|
Promise.resolve(p2)
|
|
288
288
|
]).then(([v1, v2]) => {
|
|
289
|
-
if (
|
|
289
|
+
if (lodash.isNil(v1) && lodash.isNil(v2)) {
|
|
290
290
|
return null;
|
|
291
291
|
}
|
|
292
|
-
if (
|
|
292
|
+
if (lodash.isEqual(v1, v2)) {
|
|
293
293
|
return v1;
|
|
294
294
|
}
|
|
295
295
|
// elsの解決
|
|
@@ -301,10 +301,10 @@ const equalsOr = (...args) => {
|
|
|
301
301
|
}
|
|
302
302
|
else {
|
|
303
303
|
// 同期処理ブランチ
|
|
304
|
-
if (
|
|
304
|
+
if (lodash.isNil(p1) && lodash.isNil(p2)) {
|
|
305
305
|
return null;
|
|
306
306
|
}
|
|
307
|
-
if (
|
|
307
|
+
if (lodash.isEqual(p1, p2)) {
|
|
308
308
|
return p1;
|
|
309
309
|
}
|
|
310
310
|
// elsの解決
|
|
@@ -323,7 +323,7 @@ const equalsOr = (...args) => {
|
|
|
323
323
|
* @category Conversion
|
|
324
324
|
*/
|
|
325
325
|
const parseJSON = (str) => {
|
|
326
|
-
if (
|
|
326
|
+
if (lodash.isNil(str)) {
|
|
327
327
|
return null;
|
|
328
328
|
}
|
|
329
329
|
if (typeof str === "object") {
|
|
@@ -347,7 +347,7 @@ const parseJSON = (str) => {
|
|
|
347
347
|
* @category Conversion
|
|
348
348
|
*/
|
|
349
349
|
const jsonStringify = (obj, replacer, space) => {
|
|
350
|
-
if (
|
|
350
|
+
if (lodash.isNil(obj)) {
|
|
351
351
|
return null;
|
|
352
352
|
}
|
|
353
353
|
if (typeof obj === "string") {
|
|
@@ -378,10 +378,10 @@ const jsonStringify = (obj, replacer, space) => {
|
|
|
378
378
|
* @category Array Utilities
|
|
379
379
|
*/
|
|
380
380
|
const castArray = (value) => {
|
|
381
|
-
if (
|
|
381
|
+
if (lodash.isNil(value)) {
|
|
382
382
|
return [];
|
|
383
383
|
}
|
|
384
|
-
return
|
|
384
|
+
return lodash.castArray(value);
|
|
385
385
|
};
|
|
386
386
|
/**
|
|
387
387
|
* Computes differences between two objects. Supports deep paths. When `keyExcludes` is true,
|
|
@@ -405,7 +405,7 @@ const castArray = (value) => {
|
|
|
405
405
|
*/
|
|
406
406
|
const changes = (sourceValue, currentValue, keys, options, finallyCallback, notEmptyCallback) => {
|
|
407
407
|
const diff = {};
|
|
408
|
-
if (
|
|
408
|
+
if (lodash.isEmpty(keys)) {
|
|
409
409
|
keys = [];
|
|
410
410
|
options = { ...options, keyExcludes: true };
|
|
411
411
|
}
|
|
@@ -418,28 +418,28 @@ const changes = (sourceValue, currentValue, keys, options, finallyCallback, notE
|
|
|
418
418
|
}
|
|
419
419
|
}
|
|
420
420
|
const targetKeys = options?.keyExcludes === true
|
|
421
|
-
?
|
|
421
|
+
? lodash.difference(lodash.uniq([...Object.keys(sourceValue), ...Object.keys(currentValue)]), keys)
|
|
422
422
|
: keys;
|
|
423
423
|
for (const key of targetKeys) {
|
|
424
|
-
const v1 = options?.keyExcludes === true ? sourceValue[key] :
|
|
425
|
-
const v2 = options?.keyExcludes === true ? currentValue[key] :
|
|
426
|
-
if (
|
|
424
|
+
const v1 = options?.keyExcludes === true ? sourceValue[key] : lodash.get(sourceValue, key);
|
|
425
|
+
const v2 = options?.keyExcludes === true ? currentValue[key] : lodash.get(currentValue, key);
|
|
426
|
+
if (lodash.isNil(v1) && lodash.isNil(v2))
|
|
427
427
|
continue;
|
|
428
|
-
if (
|
|
428
|
+
if (lodash.isNil(v1) || lodash.isNil(v2)) {
|
|
429
429
|
if (options?.keyExcludes === true) {
|
|
430
430
|
diff[key] = v2 ?? null;
|
|
431
431
|
}
|
|
432
432
|
else {
|
|
433
|
-
|
|
433
|
+
lodash.set(diff, key, v2 ?? null);
|
|
434
434
|
}
|
|
435
435
|
continue;
|
|
436
436
|
}
|
|
437
|
-
if (!
|
|
437
|
+
if (!lodash.isEqual(v1, v2)) {
|
|
438
438
|
if (options?.keyExcludes === true) {
|
|
439
439
|
diff[key] = v2 ?? null;
|
|
440
440
|
}
|
|
441
441
|
else {
|
|
442
|
-
|
|
442
|
+
lodash.set(diff, key, v2 ?? null);
|
|
443
443
|
}
|
|
444
444
|
}
|
|
445
445
|
}
|
|
@@ -559,7 +559,7 @@ const arrayDepth = (ary) => {
|
|
|
559
559
|
if (!Array.isArray(ary)) {
|
|
560
560
|
return 0;
|
|
561
561
|
}
|
|
562
|
-
if (
|
|
562
|
+
if (lodash.size(ary) === 0) {
|
|
563
563
|
return 1;
|
|
564
564
|
}
|
|
565
565
|
return 1 + Math.min(...ary.map(arrayDepth));
|
|
@@ -568,7 +568,7 @@ const arrayDepth = (ary) => {
|
|
|
568
568
|
* Extends ansuko with a plugin and returns the augmented instance.
|
|
569
569
|
* @param plugin - Plugin function
|
|
570
570
|
* @returns Extended instance
|
|
571
|
-
* @example const extended =
|
|
571
|
+
* @example const extended = lodash.extend(jaPlugin)
|
|
572
572
|
* @category Core Functions
|
|
573
573
|
*/
|
|
574
574
|
const extend = function (plugin) {
|
|
@@ -578,12 +578,13 @@ const extend = function (plugin) {
|
|
|
578
578
|
return this;
|
|
579
579
|
};
|
|
580
580
|
// Ansuko型へのキャストを外し、より安全な unknown as LoDashStatic に変更
|
|
581
|
-
|
|
582
|
-
|
|
581
|
+
// 変数名を _ にすることで、VS Code の auto import 候補が `_` として表示される
|
|
582
|
+
const _ = {
|
|
583
|
+
...lodash,
|
|
583
584
|
extend,
|
|
584
|
-
isEmptyOrg:
|
|
585
|
-
toNumberOrg:
|
|
586
|
-
castArrayOrg:
|
|
585
|
+
isEmptyOrg: lodash.isEmpty,
|
|
586
|
+
toNumberOrg: lodash.toNumber,
|
|
587
|
+
castArrayOrg: lodash.castArray,
|
|
587
588
|
strWrap,
|
|
588
589
|
isEmpty,
|
|
589
590
|
toNumber,
|
|
@@ -603,5 +604,6 @@ export default {
|
|
|
603
604
|
swallowMap,
|
|
604
605
|
arrayDepth,
|
|
605
606
|
};
|
|
607
|
+
export default _;
|
|
606
608
|
// 個別エクスポートはそのまま
|
|
607
609
|
export { isEmpty, toNumber, boolIf, isValidStr, valueOr, equalsOr, waited, parseJSON, jsonStringify, castArray, changes, strWrap, swallow, swallowMap, arrayDepth, };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "ansuko",
|
|
3
|
-
"version": "1.3.
|
|
3
|
+
"version": "1.3.15",
|
|
4
4
|
"description": "A modern JavaScript/TypeScript utility library that extends lodash with practical, intuitive behaviors. Fixes lodash quirks, adds Promise support, Japanese text processing, and GeoJSON utilities.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"lodash",
|