forked from enviPath/enviPy
Current Dev State
This commit is contained in:
21
static/js/ketcher2/node_modules/pluralize/LICENSE
generated
vendored
Normal file
21
static/js/ketcher2/node_modules/pluralize/LICENSE
generated
vendored
Normal file
@ -0,0 +1,21 @@
|
||||
The MIT License (MIT)
|
||||
|
||||
Copyright (c) 2013 Blake Embrey (hello@blakeembrey.com)
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in
|
||||
all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
THE SOFTWARE.
|
||||
78
static/js/ketcher2/node_modules/pluralize/Readme.md
generated
vendored
Normal file
78
static/js/ketcher2/node_modules/pluralize/Readme.md
generated
vendored
Normal file
@ -0,0 +1,78 @@
|
||||
# Pluralize
|
||||
|
||||
[![NPM version][npm-image]][npm-url]
|
||||
[![NPM downloads][downloads-image]][downloads-url]
|
||||
[![Build status][travis-image]][travis-url]
|
||||
[![Test coverage][coveralls-image]][coveralls-url]
|
||||
|
||||
> Pluralize and singularize any word.
|
||||
|
||||
## Installation
|
||||
|
||||
```
|
||||
npm install pluralize --save
|
||||
bower install pluralize --save
|
||||
```
|
||||
|
||||
### Node
|
||||
|
||||
```javascript
|
||||
var pluralize = require('pluralize')
|
||||
```
|
||||
|
||||
### AMD
|
||||
|
||||
```javascript
|
||||
define(function (require, exports, module) {
|
||||
var pluralize = require('pluralize')
|
||||
})
|
||||
```
|
||||
|
||||
### `<script>` tag
|
||||
|
||||
```html
|
||||
<script src="pluralize.js"></script>
|
||||
```
|
||||
|
||||
## Why?
|
||||
|
||||
This module uses a pre-defined list of rules, applied in order, to singularize or pluralize a given word. There are many cases where this is useful, such as any automation based on user input. For applications where the word(s) are known ahead of time, you can use a simple ternary (or function) which would be a much lighter alternative.
|
||||
|
||||
## Usage
|
||||
|
||||
```javascript
|
||||
pluralize('test') //=> "tests"
|
||||
pluralize('test', 1) //=> "test"
|
||||
pluralize('test', 5) //=> "tests"
|
||||
pluralize('test', 1, true) //=> "1 test"
|
||||
pluralize('test', 5, true) //=> "5 tests"
|
||||
|
||||
pluralize.plural('regex') //=> "regexes"
|
||||
pluralize.addPluralRule(/gex$/i, 'gexii')
|
||||
pluralize.plural('regex') //=> "regexii"
|
||||
|
||||
pluralize.plural('singles', 1) //=> "single"
|
||||
pluralize.addSingularRule(/singles$/i, 'singular')
|
||||
pluralize.plural('singles', 1) //=> "singular"
|
||||
|
||||
pluralize.plural('irregular') //=> "irregulars"
|
||||
pluralize.addIrregularRule('irregular', 'regular')
|
||||
pluralize.plural('irregular') //=> "regular"
|
||||
|
||||
pluralize.plural('paper') //=> "papers"
|
||||
pluralize.addUncountableRule('paper')
|
||||
pluralize.plural('paper') //=> "paper"
|
||||
```
|
||||
|
||||
## License
|
||||
|
||||
MIT
|
||||
|
||||
[npm-image]: https://img.shields.io/npm/v/pluralize.svg?style=flat
|
||||
[npm-url]: https://npmjs.org/package/pluralize
|
||||
[downloads-image]: https://img.shields.io/npm/dm/pluralize.svg?style=flat
|
||||
[downloads-url]: https://npmjs.org/package/pluralize
|
||||
[travis-image]: https://img.shields.io/travis/blakeembrey/pluralize.svg?style=flat
|
||||
[travis-url]: https://travis-ci.org/blakeembrey/pluralize
|
||||
[coveralls-image]: https://img.shields.io/coveralls/blakeembrey/pluralize.svg?style=flat
|
||||
[coveralls-url]: https://coveralls.io/r/blakeembrey/pluralize?branch=master
|
||||
69
static/js/ketcher2/node_modules/pluralize/package.json
generated
vendored
Normal file
69
static/js/ketcher2/node_modules/pluralize/package.json
generated
vendored
Normal file
@ -0,0 +1,69 @@
|
||||
{
|
||||
"_from": "pluralize@^1.2.1",
|
||||
"_id": "pluralize@1.2.1",
|
||||
"_inBundle": false,
|
||||
"_integrity": "sha1-0aIUg/0iu0HlihL6NCGCMUCJfEU=",
|
||||
"_location": "/pluralize",
|
||||
"_phantomChildren": {},
|
||||
"_requested": {
|
||||
"type": "range",
|
||||
"registry": true,
|
||||
"raw": "pluralize@^1.2.1",
|
||||
"name": "pluralize",
|
||||
"escapedName": "pluralize",
|
||||
"rawSpec": "^1.2.1",
|
||||
"saveSpec": null,
|
||||
"fetchSpec": "^1.2.1"
|
||||
},
|
||||
"_requiredBy": [
|
||||
"/eslint"
|
||||
],
|
||||
"_resolved": "https://registry.npmjs.org/pluralize/-/pluralize-1.2.1.tgz",
|
||||
"_shasum": "d1a21483fd22bb41e58a12fa3421823140897c45",
|
||||
"_spec": "pluralize@^1.2.1",
|
||||
"_where": "/home/manfred/enviPath/ketcher2/ketcher/node_modules/eslint",
|
||||
"author": {
|
||||
"name": "Blake Embrey",
|
||||
"email": "hello@blakeembrey.com",
|
||||
"url": "http://blakeembrey.me"
|
||||
},
|
||||
"bugs": {
|
||||
"url": "https://github.com/blakeembrey/pluralize/issues"
|
||||
},
|
||||
"bundleDependencies": false,
|
||||
"deprecated": false,
|
||||
"description": "Pluralize and singularize any word",
|
||||
"devDependencies": {
|
||||
"chai": "^1.9.1",
|
||||
"istanbul": "^0.3.0",
|
||||
"mocha": "^1.21.4",
|
||||
"pre-commit": "^1.0.10",
|
||||
"semistandard": "^7.0.2"
|
||||
},
|
||||
"files": [
|
||||
"pluralize.js",
|
||||
"LICENSE"
|
||||
],
|
||||
"homepage": "https://github.com/blakeembrey/pluralize#readme",
|
||||
"keywords": [
|
||||
"plural",
|
||||
"plurals",
|
||||
"pluralize",
|
||||
"singular",
|
||||
"singularize"
|
||||
],
|
||||
"license": "MIT",
|
||||
"main": "pluralize.js",
|
||||
"name": "pluralize",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "git+https://github.com/blakeembrey/pluralize.git"
|
||||
},
|
||||
"scripts": {
|
||||
"lint": "semistandard",
|
||||
"test": "npm run lint && npm run test-cov",
|
||||
"test-cov": "istanbul cover node_modules/mocha/bin/_mocha -- -R spec --bail",
|
||||
"test-spec": "mocha -R spec --bail"
|
||||
},
|
||||
"version": "1.2.1"
|
||||
}
|
||||
433
static/js/ketcher2/node_modules/pluralize/pluralize.js
generated
vendored
Normal file
433
static/js/ketcher2/node_modules/pluralize/pluralize.js
generated
vendored
Normal file
@ -0,0 +1,433 @@
|
||||
/* global define */
|
||||
|
||||
(function (root, pluralize) {
|
||||
/* istanbul ignore else */
|
||||
if (typeof require === 'function' && typeof exports === 'object' && typeof module === 'object') {
|
||||
// Node.
|
||||
module.exports = pluralize();
|
||||
} else if (typeof define === 'function' && define.amd) {
|
||||
// AMD, registers as an anonymous module.
|
||||
define(function () {
|
||||
return pluralize();
|
||||
});
|
||||
} else {
|
||||
// Browser global.
|
||||
root.pluralize = pluralize();
|
||||
}
|
||||
})(this, function () {
|
||||
// Rule storage - pluralize and singularize need to be run sequentially,
|
||||
// while other rules can be optimized using an object for instant lookups.
|
||||
var pluralRules = [];
|
||||
var singularRules = [];
|
||||
var uncountables = {};
|
||||
var irregularPlurals = {};
|
||||
var irregularSingles = {};
|
||||
|
||||
/**
|
||||
* Title case a string.
|
||||
*
|
||||
* @param {string} str
|
||||
* @return {string}
|
||||
*/
|
||||
function toTitleCase (str) {
|
||||
return str.charAt(0).toUpperCase() + str.substr(1).toLowerCase();
|
||||
}
|
||||
|
||||
/**
|
||||
* Sanitize a pluralization rule to a usable regular expression.
|
||||
*
|
||||
* @param {(RegExp|string)} rule
|
||||
* @return {RegExp}
|
||||
*/
|
||||
function sanitizeRule (rule) {
|
||||
if (typeof rule === 'string') {
|
||||
return new RegExp('^' + rule + '$', 'i');
|
||||
}
|
||||
|
||||
return rule;
|
||||
}
|
||||
|
||||
/**
|
||||
* Pass in a word token to produce a function that can replicate the case on
|
||||
* another word.
|
||||
*
|
||||
* @param {string} word
|
||||
* @param {string} token
|
||||
* @return {Function}
|
||||
*/
|
||||
function restoreCase (word, token) {
|
||||
// Upper cased words. E.g. "HELLO".
|
||||
if (word === word.toUpperCase()) {
|
||||
return token.toUpperCase();
|
||||
}
|
||||
|
||||
// Title cased words. E.g. "Title".
|
||||
if (word[0] === word[0].toUpperCase()) {
|
||||
return toTitleCase(token);
|
||||
}
|
||||
|
||||
// Lower cased words. E.g. "test".
|
||||
return token.toLowerCase();
|
||||
}
|
||||
|
||||
/**
|
||||
* Interpolate a regexp string.
|
||||
*
|
||||
* @param {string} str
|
||||
* @param {Array} args
|
||||
* @return {string}
|
||||
*/
|
||||
function interpolate (str, args) {
|
||||
return str.replace(/\$(\d{1,2})/g, function (match, index) {
|
||||
return args[index] || '';
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Sanitize a word by passing in the word and sanitization rules.
|
||||
*
|
||||
* @param {String} token
|
||||
* @param {String} word
|
||||
* @param {Array} collection
|
||||
* @return {String}
|
||||
*/
|
||||
function sanitizeWord (token, word, collection) {
|
||||
// Empty string or doesn't need fixing.
|
||||
if (!token.length || uncountables.hasOwnProperty(token)) {
|
||||
return word;
|
||||
}
|
||||
|
||||
var len = collection.length;
|
||||
|
||||
// Iterate over the sanitization rules and use the first one to match.
|
||||
while (len--) {
|
||||
var rule = collection[len];
|
||||
|
||||
// If the rule passes, return the replacement.
|
||||
if (rule[0].test(word)) {
|
||||
return word.replace(rule[0], function (match, index, word) {
|
||||
var result = interpolate(rule[1], arguments);
|
||||
|
||||
if (match === '') {
|
||||
return restoreCase(word[index - 1], result);
|
||||
}
|
||||
|
||||
return restoreCase(match, result);
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
return word;
|
||||
}
|
||||
|
||||
/**
|
||||
* Replace a word with the updated word.
|
||||
*
|
||||
* @param {Object} replaceMap
|
||||
* @param {Object} keepMap
|
||||
* @param {Array} rules
|
||||
* @return {Function}
|
||||
*/
|
||||
function replaceWord (replaceMap, keepMap, rules) {
|
||||
return function (word) {
|
||||
// Get the correct token and case restoration functions.
|
||||
var token = word.toLowerCase();
|
||||
|
||||
// Check against the keep object map.
|
||||
if (keepMap.hasOwnProperty(token)) {
|
||||
return restoreCase(word, token);
|
||||
}
|
||||
|
||||
// Check against the replacement map for a direct word replacement.
|
||||
if (replaceMap.hasOwnProperty(token)) {
|
||||
return restoreCase(word, replaceMap[token]);
|
||||
}
|
||||
|
||||
// Run all the rules against the word.
|
||||
return sanitizeWord(token, word, rules);
|
||||
};
|
||||
}
|
||||
|
||||
/**
|
||||
* Pluralize or singularize a word based on the passed in count.
|
||||
*
|
||||
* @param {String} word
|
||||
* @param {Number} count
|
||||
* @param {Boolean} inclusive
|
||||
* @return {String}
|
||||
*/
|
||||
function pluralize (word, count, inclusive) {
|
||||
var pluralized = count === 1
|
||||
? pluralize.singular(word) : pluralize.plural(word);
|
||||
|
||||
return (inclusive ? count + ' ' : '') + pluralized;
|
||||
}
|
||||
|
||||
/**
|
||||
* Pluralize a word.
|
||||
*
|
||||
* @type {Function}
|
||||
*/
|
||||
pluralize.plural = replaceWord(
|
||||
irregularSingles, irregularPlurals, pluralRules
|
||||
);
|
||||
|
||||
/**
|
||||
* Singularize a word.
|
||||
*
|
||||
* @type {Function}
|
||||
*/
|
||||
pluralize.singular = replaceWord(
|
||||
irregularPlurals, irregularSingles, singularRules
|
||||
);
|
||||
|
||||
/**
|
||||
* Add a pluralization rule to the collection.
|
||||
*
|
||||
* @param {(string|RegExp)} rule
|
||||
* @param {string} replacement
|
||||
*/
|
||||
pluralize.addPluralRule = function (rule, replacement) {
|
||||
pluralRules.push([sanitizeRule(rule), replacement]);
|
||||
};
|
||||
|
||||
/**
|
||||
* Add a singularization rule to the collection.
|
||||
*
|
||||
* @param {(string|RegExp)} rule
|
||||
* @param {string} replacement
|
||||
*/
|
||||
pluralize.addSingularRule = function (rule, replacement) {
|
||||
singularRules.push([sanitizeRule(rule), replacement]);
|
||||
};
|
||||
|
||||
/**
|
||||
* Add an uncountable word rule.
|
||||
*
|
||||
* @param {(string|RegExp)} word
|
||||
*/
|
||||
pluralize.addUncountableRule = function (word) {
|
||||
if (typeof word === 'string') {
|
||||
uncountables[word.toLowerCase()] = true;
|
||||
return;
|
||||
}
|
||||
|
||||
// Set singular and plural references for the word.
|
||||
pluralize.addPluralRule(word, '$0');
|
||||
pluralize.addSingularRule(word, '$0');
|
||||
};
|
||||
|
||||
/**
|
||||
* Add an irregular word definition.
|
||||
*
|
||||
* @param {String} single
|
||||
* @param {String} plural
|
||||
*/
|
||||
pluralize.addIrregularRule = function (single, plural) {
|
||||
plural = plural.toLowerCase();
|
||||
single = single.toLowerCase();
|
||||
|
||||
irregularSingles[single] = plural;
|
||||
irregularPlurals[plural] = single;
|
||||
};
|
||||
|
||||
/**
|
||||
* Irregular rules.
|
||||
*/
|
||||
[
|
||||
// Pronouns.
|
||||
['I', 'we'],
|
||||
['me', 'us'],
|
||||
['he', 'they'],
|
||||
['she', 'they'],
|
||||
['them', 'them'],
|
||||
['myself', 'ourselves'],
|
||||
['yourself', 'yourselves'],
|
||||
['itself', 'themselves'],
|
||||
['herself', 'themselves'],
|
||||
['himself', 'themselves'],
|
||||
['themself', 'themselves'],
|
||||
['is', 'are'],
|
||||
['this', 'these'],
|
||||
['that', 'those'],
|
||||
// Words ending in with a consonant and `o`.
|
||||
['echo', 'echoes'],
|
||||
['dingo', 'dingoes'],
|
||||
['volcano', 'volcanoes'],
|
||||
['tornado', 'tornadoes'],
|
||||
['torpedo', 'torpedoes'],
|
||||
// Ends with `us`.
|
||||
['genus', 'genera'],
|
||||
['viscus', 'viscera'],
|
||||
// Ends with `ma`.
|
||||
['stigma', 'stigmata'],
|
||||
['stoma', 'stomata'],
|
||||
['dogma', 'dogmata'],
|
||||
['lemma', 'lemmata'],
|
||||
['schema', 'schemata'],
|
||||
['anathema', 'anathemata'],
|
||||
// Other irregular rules.
|
||||
['ox', 'oxen'],
|
||||
['axe', 'axes'],
|
||||
['die', 'dice'],
|
||||
['yes', 'yeses'],
|
||||
['foot', 'feet'],
|
||||
['eave', 'eaves'],
|
||||
['goose', 'geese'],
|
||||
['tooth', 'teeth'],
|
||||
['quiz', 'quizzes'],
|
||||
['human', 'humans'],
|
||||
['proof', 'proofs'],
|
||||
['carve', 'carves'],
|
||||
['valve', 'valves'],
|
||||
['thief', 'thieves'],
|
||||
['genie', 'genies'],
|
||||
['groove', 'grooves'],
|
||||
['pickaxe', 'pickaxes'],
|
||||
['whiskey', 'whiskies']
|
||||
].forEach(function (rule) {
|
||||
return pluralize.addIrregularRule(rule[0], rule[1]);
|
||||
});
|
||||
|
||||
/**
|
||||
* Pluralization rules.
|
||||
*/
|
||||
[
|
||||
[/s?$/i, 's'],
|
||||
[/([^aeiou]ese)$/i, '$1'],
|
||||
[/(ax|test)is$/i, '$1es'],
|
||||
[/(alias|[^aou]us|tlas|gas|ris)$/i, '$1es'],
|
||||
[/(e[mn]u)s?$/i, '$1s'],
|
||||
[/([^l]ias|[aeiou]las|[emjzr]as|[iu]am)$/i, '$1'],
|
||||
[/(alumn|syllab|octop|vir|radi|nucle|fung|cact|stimul|termin|bacill|foc|uter|loc|strat)(?:us|i)$/i, '$1i'],
|
||||
[/(alumn|alg|vertebr)(?:a|ae)$/i, '$1ae'],
|
||||
[/(seraph|cherub)(?:im)?$/i, '$1im'],
|
||||
[/(her|at|gr)o$/i, '$1oes'],
|
||||
[/(agend|addend|millenni|dat|extrem|bacteri|desiderat|strat|candelabr|errat|ov|symposi|curricul|automat|quor)(?:a|um)$/i, '$1a'],
|
||||
[/(apheli|hyperbat|periheli|asyndet|noumen|phenomen|criteri|organ|prolegomen|hedr|automat)(?:a|on)$/i, '$1a'],
|
||||
[/sis$/i, 'ses'],
|
||||
[/(?:(kni|wi|li)fe|(ar|l|ea|eo|oa|hoo)f)$/i, '$1$2ves'],
|
||||
[/([^aeiouy]|qu)y$/i, '$1ies'],
|
||||
[/([^ch][ieo][ln])ey$/i, '$1ies'],
|
||||
[/(x|ch|ss|sh|zz)$/i, '$1es'],
|
||||
[/(matr|cod|mur|sil|vert|ind|append)(?:ix|ex)$/i, '$1ices'],
|
||||
[/(m|l)(?:ice|ouse)$/i, '$1ice'],
|
||||
[/(pe)(?:rson|ople)$/i, '$1ople'],
|
||||
[/(child)(?:ren)?$/i, '$1ren'],
|
||||
[/eaux$/i, '$0'],
|
||||
[/m[ae]n$/i, 'men'],
|
||||
['thou', 'you']
|
||||
].forEach(function (rule) {
|
||||
return pluralize.addPluralRule(rule[0], rule[1]);
|
||||
});
|
||||
|
||||
/**
|
||||
* Singularization rules.
|
||||
*/
|
||||
[
|
||||
[/s$/i, ''],
|
||||
[/(ss)$/i, '$1'],
|
||||
[/((a)naly|(b)a|(d)iagno|(p)arenthe|(p)rogno|(s)ynop|(t)he)(?:sis|ses)$/i, '$1sis'],
|
||||
[/(^analy)(?:sis|ses)$/i, '$1sis'],
|
||||
[/(wi|kni|(?:after|half|high|low|mid|non|night|[^\w]|^)li)ves$/i, '$1fe'],
|
||||
[/(ar|(?:wo|[ae])l|[eo][ao])ves$/i, '$1f'],
|
||||
[/([^aeiouy]|qu)ies$/i, '$1y'],
|
||||
[/(^[pl]|zomb|^(?:neck)?t|[aeo][lt]|cut)ies$/i, '$1ie'],
|
||||
[/(\b(?:mon|smil))ies$/i, '$1ey'],
|
||||
[/(m|l)ice$/i, '$1ouse'],
|
||||
[/(seraph|cherub)im$/i, '$1'],
|
||||
[/(x|ch|ss|sh|zz|tto|go|cho|alias|[^aou]us|tlas|gas|(?:her|at|gr)o|ris)(?:es)?$/i, '$1'],
|
||||
[/(e[mn]u)s?$/i, '$1'],
|
||||
[/(movie|twelve)s$/i, '$1'],
|
||||
[/(cris|test|diagnos)(?:is|es)$/i, '$1is'],
|
||||
[/(alumn|syllab|octop|vir|radi|nucle|fung|cact|stimul|termin|bacill|foc|uter|loc|strat)(?:us|i)$/i, '$1us'],
|
||||
[/(agend|addend|millenni|dat|extrem|bacteri|desiderat|strat|candelabr|errat|ov|symposi|curricul|quor)a$/i, '$1um'],
|
||||
[/(apheli|hyperbat|periheli|asyndet|noumen|phenomen|criteri|organ|prolegomen|hedr|automat)a$/i, '$1on'],
|
||||
[/(alumn|alg|vertebr)ae$/i, '$1a'],
|
||||
[/(cod|mur|sil|vert|ind)ices$/i, '$1ex'],
|
||||
[/(matr|append)ices$/i, '$1ix'],
|
||||
[/(pe)(rson|ople)$/i, '$1rson'],
|
||||
[/(child)ren$/i, '$1'],
|
||||
[/(eau)x?$/i, '$1'],
|
||||
[/men$/i, 'man']
|
||||
].forEach(function (rule) {
|
||||
return pluralize.addSingularRule(rule[0], rule[1]);
|
||||
});
|
||||
|
||||
/**
|
||||
* Uncountable rules.
|
||||
*/
|
||||
[
|
||||
// Singular words with no plurals.
|
||||
'advice',
|
||||
'agenda',
|
||||
'bison',
|
||||
'bream',
|
||||
'buffalo',
|
||||
'carp',
|
||||
'chassis',
|
||||
'cod',
|
||||
'cooperation',
|
||||
'corps',
|
||||
'digestion',
|
||||
'debris',
|
||||
'diabetes',
|
||||
'energy',
|
||||
'equipment',
|
||||
'elk',
|
||||
'excretion',
|
||||
'expertise',
|
||||
'flounder',
|
||||
'gallows',
|
||||
'garbage',
|
||||
'graffiti',
|
||||
'headquarters',
|
||||
'health',
|
||||
'herpes',
|
||||
'highjinks',
|
||||
'homework',
|
||||
'information',
|
||||
'jeans',
|
||||
'justice',
|
||||
'kudos',
|
||||
'labour',
|
||||
'machinery',
|
||||
'mackerel',
|
||||
'media',
|
||||
'mews',
|
||||
'moose',
|
||||
'news',
|
||||
'pike',
|
||||
'plankton',
|
||||
'pliers',
|
||||
'pollution',
|
||||
'premises',
|
||||
'rain',
|
||||
'rice',
|
||||
'salmon',
|
||||
'scissors',
|
||||
'series',
|
||||
'sewage',
|
||||
'shambles',
|
||||
'shrimp',
|
||||
'species',
|
||||
'staff',
|
||||
'swine',
|
||||
'trout',
|
||||
'tuna',
|
||||
'whiting',
|
||||
'wildebeest',
|
||||
'wildlife',
|
||||
'you',
|
||||
// Regexes.
|
||||
/pox$/i, // "chickpox", "smallpox"
|
||||
/ois$/i,
|
||||
/deer$/i, // "deer", "reindeer"
|
||||
/fish$/i, // "fish", "blowfish", "angelfish"
|
||||
/sheep$/i,
|
||||
/measles$/i,
|
||||
/[^aeiou]ese$/i // "chinese", "japanese"
|
||||
].forEach(pluralize.addUncountableRule);
|
||||
|
||||
return pluralize;
|
||||
});
|
||||
Reference in New Issue
Block a user