@mythpe/quasar-ui-qui 0.1.95 → 0.1.96
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/package.json +1 -1
- package/src/utils/__pluralize.js +224 -241
package/package.json
CHANGED
package/src/utils/__pluralize.js
CHANGED
|
@@ -1,24 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
(function (root, pluralize) {
|
|
4
|
-
/* istanbul ignore else */
|
|
5
|
-
if (typeof require === 'function' && typeof exports === 'object' && typeof module === 'object') {
|
|
6
|
-
// Node.
|
|
7
|
-
// module.exports = pluralize()
|
|
8
|
-
module.exports = {
|
|
9
|
-
pluralize: pluralize(),
|
|
10
|
-
default: pluralize()
|
|
11
|
-
}
|
|
12
|
-
} else if (typeof define === 'function' && define.amd) {
|
|
13
|
-
// AMD, registers as an anonymous module.
|
|
14
|
-
define(function () {
|
|
15
|
-
return pluralize()
|
|
16
|
-
})
|
|
17
|
-
} else {
|
|
18
|
-
// Browser global.
|
|
19
|
-
root.pluralize = pluralize()
|
|
20
|
-
}
|
|
21
|
-
})(this, function () {
|
|
1
|
+
const __pluralize = function () {
|
|
22
2
|
// Rule storage - pluralize and singularize need to be run sequentially,
|
|
23
3
|
// while other rules can be optimized using an object for instant lookups.
|
|
24
4
|
const pluralRules = []
|
|
@@ -272,239 +252,242 @@
|
|
|
272
252
|
/**
|
|
273
253
|
* Irregular rules.
|
|
274
254
|
*/
|
|
275
|
-
|
|
255
|
+
const __irregularRules = [
|
|
276
256
|
// Pronouns.
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
257
|
+
['I', 'we'],
|
|
258
|
+
['me', 'us'],
|
|
259
|
+
['he', 'they'],
|
|
260
|
+
['she', 'they'],
|
|
261
|
+
['them', 'them'],
|
|
262
|
+
['myself', 'ourselves'],
|
|
263
|
+
['yourself', 'yourselves'],
|
|
264
|
+
['itself', 'themselves'],
|
|
265
|
+
['herself', 'themselves'],
|
|
266
|
+
['himself', 'themselves'],
|
|
267
|
+
['themself', 'themselves'],
|
|
268
|
+
['is', 'are'],
|
|
269
|
+
['was', 'were'],
|
|
270
|
+
['has', 'have'],
|
|
271
|
+
['this', 'these'],
|
|
272
|
+
['that', 'those'],
|
|
273
|
+
// Words ending in with a consonant and `o`.
|
|
274
|
+
['echo', 'echoes'],
|
|
275
|
+
['dingo', 'dingoes'],
|
|
276
|
+
['volcano', 'volcanoes'],
|
|
277
|
+
['tornado', 'tornadoes'],
|
|
278
|
+
['torpedo', 'torpedoes'],
|
|
279
|
+
// Ends with `us`.
|
|
280
|
+
['genus', 'genera'],
|
|
281
|
+
['viscus', 'viscera'],
|
|
282
|
+
// Ends with `ma`.
|
|
283
|
+
['stigma', 'stigmata'],
|
|
284
|
+
['stoma', 'stomata'],
|
|
285
|
+
['dogma', 'dogmata'],
|
|
286
|
+
['lemma', 'lemmata'],
|
|
287
|
+
['schema', 'schemata'],
|
|
288
|
+
['anathema', 'anathemata'],
|
|
289
|
+
// Other irregular rules.
|
|
290
|
+
['ox', 'oxen'],
|
|
291
|
+
['axe', 'axes'],
|
|
292
|
+
['die', 'dice'],
|
|
293
|
+
['yes', 'yeses'],
|
|
294
|
+
['foot', 'feet'],
|
|
295
|
+
['eave', 'eaves'],
|
|
296
|
+
['goose', 'geese'],
|
|
297
|
+
['tooth', 'teeth'],
|
|
298
|
+
['quiz', 'quizzes'],
|
|
299
|
+
['human', 'humans'],
|
|
300
|
+
['proof', 'proofs'],
|
|
301
|
+
['carve', 'carves'],
|
|
302
|
+
['valve', 'valves'],
|
|
303
|
+
['looey', 'looies'],
|
|
304
|
+
['thief', 'thieves'],
|
|
305
|
+
['groove', 'grooves'],
|
|
306
|
+
['pickaxe', 'pickaxes'],
|
|
307
|
+
['passerby', 'passersby']
|
|
308
|
+
]
|
|
309
|
+
__irregularRules.forEach(function (rule) {
|
|
310
|
+
return pluralize.addIrregularRule(rule[0], rule[1])
|
|
311
|
+
})
|
|
331
312
|
|
|
332
313
|
/**
|
|
333
314
|
* Pluralization rules.
|
|
334
315
|
*/
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
316
|
+
const __pluralizationRules = [
|
|
317
|
+
[/s?$/i, 's'],
|
|
318
|
+
[/[^\u0000-\u007F]$/i, '$0'],
|
|
319
|
+
[/([^aeiou]ese)$/i, '$1'],
|
|
320
|
+
[/(ax|test)is$/i, '$1es'],
|
|
321
|
+
[/(alias|[^aou]us|t[lm]as|gas|ris)$/i, '$1es'],
|
|
322
|
+
[/(e[mn]u)s?$/i, '$1s'],
|
|
323
|
+
[/([^l]ias|[aeiou]las|[ejzr]as|[iu]am)$/i, '$1'],
|
|
324
|
+
[/(alumn|syllab|vir|radi|nucle|fung|cact|stimul|termin|bacill|foc|uter|loc|strat)(?:us|i)$/i, '$1i'],
|
|
325
|
+
[/(alumn|alg|vertebr)(?:a|ae)$/i, '$1ae'],
|
|
326
|
+
[/(seraph|cherub)(?:im)?$/i, '$1im'],
|
|
327
|
+
[/(her|at|gr)o$/i, '$1oes'],
|
|
328
|
+
[/(agend|addend|millenni|dat|extrem|bacteri|desiderat|strat|candelabr|errat|ov|symposi|curricul|automat|quor)(?:a|um)$/i, '$1a'],
|
|
329
|
+
[/(apheli|hyperbat|periheli|asyndet|noumen|phenomen|criteri|organ|prolegomen|hedr|automat)(?:a|on)$/i, '$1a'],
|
|
330
|
+
[/sis$/i, 'ses'],
|
|
331
|
+
[/(?:(kni|wi|li)fe|(ar|l|ea|eo|oa|hoo)f)$/i, '$1$2ves'],
|
|
332
|
+
[/([^aeiouy]|qu)y$/i, '$1ies'],
|
|
333
|
+
[/([^ch][ieo][ln])ey$/i, '$1ies'],
|
|
334
|
+
[/(x|ch|ss|sh|zz)$/i, '$1es'],
|
|
335
|
+
[/(matr|cod|mur|sil|vert|ind|append)(?:ix|ex)$/i, '$1ices'],
|
|
336
|
+
[/\b((?:tit)?m|l)(?:ice|ouse)$/i, '$1ice'],
|
|
337
|
+
[/(pe)(?:rson|ople)$/i, '$1ople'],
|
|
338
|
+
[/(child)(?:ren)?$/i, '$1ren'],
|
|
339
|
+
[/eaux$/i, '$0'],
|
|
340
|
+
[/m[ae]n$/i, 'men'],
|
|
341
|
+
['thou', 'you']
|
|
342
|
+
]
|
|
343
|
+
|
|
344
|
+
__pluralizationRules.forEach(function (rule) {
|
|
345
|
+
return pluralize.addPluralRule(rule[0], rule[1])
|
|
346
|
+
})
|
|
364
347
|
|
|
365
348
|
/**
|
|
366
349
|
* Singularization rules.
|
|
367
350
|
*/
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
351
|
+
const __singularizationRules = [
|
|
352
|
+
[/s$/i, ''],
|
|
353
|
+
[/(ss)$/i, '$1'],
|
|
354
|
+
[/(wi|kni|(?:after|half|high|low|mid|non|night|[^\w]|^)li)ves$/i, '$1fe'],
|
|
355
|
+
[/(ar|(?:wo|[ae])l|[eo][ao])ves$/i, '$1f'],
|
|
356
|
+
[/ies$/i, 'y'],
|
|
357
|
+
[/\b([pl]|zomb|(?:neck|cross)?t|coll|faer|food|gen|goon|group|lass|talk|goal|cut)ies$/i, '$1ie'],
|
|
358
|
+
[/\b(mon|smil)ies$/i, '$1ey'],
|
|
359
|
+
[/\b((?:tit)?m|l)ice$/i, '$1ouse'],
|
|
360
|
+
[/(seraph|cherub)im$/i, '$1'],
|
|
361
|
+
[/(x|ch|ss|sh|zz|tto|go|cho|alias|[^aou]us|t[lm]as|gas|(?:her|at|gr)o|[aeiou]ris)(?:es)?$/i, '$1'],
|
|
362
|
+
[/(analy|diagno|parenthe|progno|synop|the|empha|cri|ne)(?:sis|ses)$/i, '$1sis'],
|
|
363
|
+
[/(movie|twelve|abuse|e[mn]u)s$/i, '$1'],
|
|
364
|
+
[/(test)(?:is|es)$/i, '$1is'],
|
|
365
|
+
[/(alumn|syllab|vir|radi|nucle|fung|cact|stimul|termin|bacill|foc|uter|loc|strat)(?:us|i)$/i, '$1us'],
|
|
366
|
+
[/(agend|addend|millenni|dat|extrem|bacteri|desiderat|strat|candelabr|errat|ov|symposi|curricul|quor)a$/i, '$1um'],
|
|
367
|
+
[/(apheli|hyperbat|periheli|asyndet|noumen|phenomen|criteri|organ|prolegomen|hedr|automat)a$/i, '$1on'],
|
|
368
|
+
[/(alumn|alg|vertebr)ae$/i, '$1a'],
|
|
369
|
+
[/(cod|mur|sil|vert|ind)ices$/i, '$1ex'],
|
|
370
|
+
[/(matr|append)ices$/i, '$1ix'],
|
|
371
|
+
[/(pe)(rson|ople)$/i, '$1rson'],
|
|
372
|
+
[/(child)ren$/i, '$1'],
|
|
373
|
+
[/(eau)x?$/i, '$1'],
|
|
374
|
+
[/men$/i, 'man']
|
|
375
|
+
]
|
|
376
|
+
__singularizationRules.forEach(function (rule) {
|
|
377
|
+
return pluralize.addSingularRule(rule[0], rule[1])
|
|
378
|
+
})
|
|
395
379
|
|
|
396
380
|
/**
|
|
397
381
|
* Uncountable rules.
|
|
398
382
|
*/
|
|
399
|
-
|
|
383
|
+
const __uncountableRules = [
|
|
400
384
|
// Singular words with no plurals.
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
|
|
385
|
+
'adulthood',
|
|
386
|
+
'advice',
|
|
387
|
+
'agenda',
|
|
388
|
+
'aid',
|
|
389
|
+
'aircraft',
|
|
390
|
+
'alcohol',
|
|
391
|
+
'ammo',
|
|
392
|
+
'analytics',
|
|
393
|
+
'anime',
|
|
394
|
+
'athletics',
|
|
395
|
+
'audio',
|
|
396
|
+
'bison',
|
|
397
|
+
'blood',
|
|
398
|
+
'bream',
|
|
399
|
+
'buffalo',
|
|
400
|
+
'butter',
|
|
401
|
+
'carp',
|
|
402
|
+
'cash',
|
|
403
|
+
'chassis',
|
|
404
|
+
'chess',
|
|
405
|
+
'clothing',
|
|
406
|
+
'cod',
|
|
407
|
+
'commerce',
|
|
408
|
+
'cooperation',
|
|
409
|
+
'corps',
|
|
410
|
+
'debris',
|
|
411
|
+
'diabetes',
|
|
412
|
+
'digestion',
|
|
413
|
+
'elk',
|
|
414
|
+
'energy',
|
|
415
|
+
'equipment',
|
|
416
|
+
'excretion',
|
|
417
|
+
'expertise',
|
|
418
|
+
'firmware',
|
|
419
|
+
'flounder',
|
|
420
|
+
'fun',
|
|
421
|
+
'gallows',
|
|
422
|
+
'garbage',
|
|
423
|
+
'graffiti',
|
|
424
|
+
'hardware',
|
|
425
|
+
'headquarters',
|
|
426
|
+
'health',
|
|
427
|
+
'herpes',
|
|
428
|
+
'highjinks',
|
|
429
|
+
'homework',
|
|
430
|
+
'housework',
|
|
431
|
+
'information',
|
|
432
|
+
'jeans',
|
|
433
|
+
'justice',
|
|
434
|
+
'kudos',
|
|
435
|
+
'labour',
|
|
436
|
+
'literature',
|
|
437
|
+
'machinery',
|
|
438
|
+
'mackerel',
|
|
439
|
+
'mail',
|
|
440
|
+
'media',
|
|
441
|
+
'mews',
|
|
442
|
+
'moose',
|
|
443
|
+
'music',
|
|
444
|
+
'mud',
|
|
445
|
+
'manga',
|
|
446
|
+
'news',
|
|
447
|
+
'only',
|
|
448
|
+
'personnel',
|
|
449
|
+
'pike',
|
|
450
|
+
'plankton',
|
|
451
|
+
'pliers',
|
|
452
|
+
'police',
|
|
453
|
+
'pollution',
|
|
454
|
+
'premises',
|
|
455
|
+
'rain',
|
|
456
|
+
'research',
|
|
457
|
+
'rice',
|
|
458
|
+
'salmon',
|
|
459
|
+
'scissors',
|
|
460
|
+
'series',
|
|
461
|
+
'sewage',
|
|
462
|
+
'shambles',
|
|
463
|
+
'shrimp',
|
|
464
|
+
'software',
|
|
465
|
+
'species',
|
|
466
|
+
'staff',
|
|
467
|
+
'swine',
|
|
468
|
+
'tennis',
|
|
469
|
+
'traffic',
|
|
470
|
+
'transportation',
|
|
471
|
+
'trout',
|
|
472
|
+
'tuna',
|
|
473
|
+
'wealth',
|
|
474
|
+
'welfare',
|
|
475
|
+
'whiting',
|
|
476
|
+
'wildebeest',
|
|
477
|
+
'wildlife',
|
|
478
|
+
'you',
|
|
479
|
+
/pok[eé]mon$/i,
|
|
480
|
+
// Regexes.
|
|
481
|
+
/[^aeiou]ese$/i, // "chinese", "japanese"
|
|
482
|
+
/deer$/i, // "deer", "reindeer"
|
|
483
|
+
/fish$/i, // "fish", "blowfish", "angelfish"
|
|
484
|
+
/measles$/i,
|
|
485
|
+
/o[iu]s$/i, // "carnivorous"
|
|
486
|
+
/pox$/i, // "chickpox", "smallpox"
|
|
487
|
+
/sheep$/i
|
|
488
|
+
]
|
|
489
|
+
__uncountableRules.forEach(pluralize.addUncountableRule)
|
|
506
490
|
return pluralize
|
|
507
|
-
}
|
|
508
|
-
|
|
509
|
-
import pluralize from 'pluralize'
|
|
491
|
+
}
|
|
492
|
+
export const pluralize = __pluralize()
|
|
510
493
|
export default pluralize
|