Added some tests
This commit is contained in:
9
tests/node_modules/plur/index.js
generated
vendored
Normal file
9
tests/node_modules/plur/index.js
generated
vendored
Normal file
@@ -0,0 +1,9 @@
|
||||
'use strict';
|
||||
module.exports = function (str, plural, count) {
|
||||
if (typeof plural === 'number') {
|
||||
count = plural;
|
||||
plural = str + 's';
|
||||
}
|
||||
|
||||
return count === 1 ? str : plural;
|
||||
};
|
||||
21
tests/node_modules/plur/license
generated
vendored
Normal file
21
tests/node_modules/plur/license
generated
vendored
Normal file
@@ -0,0 +1,21 @@
|
||||
The MIT License (MIT)
|
||||
|
||||
Copyright (c) Sindre Sorhus <sindresorhus@gmail.com> (sindresorhus.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.
|
||||
69
tests/node_modules/plur/package.json
generated
vendored
Normal file
69
tests/node_modules/plur/package.json
generated
vendored
Normal file
@@ -0,0 +1,69 @@
|
||||
{
|
||||
"_from": "plur@^1.0.0",
|
||||
"_id": "plur@1.0.0",
|
||||
"_inBundle": false,
|
||||
"_integrity": "sha1-24XGgU9eXlo7Se/CjWBP7GKXUVY=",
|
||||
"_location": "/plur",
|
||||
"_phantomChildren": {},
|
||||
"_requested": {
|
||||
"type": "range",
|
||||
"registry": true,
|
||||
"raw": "plur@^1.0.0",
|
||||
"name": "plur",
|
||||
"escapedName": "plur",
|
||||
"rawSpec": "^1.0.0",
|
||||
"saveSpec": null,
|
||||
"fetchSpec": "^1.0.0"
|
||||
},
|
||||
"_requiredBy": [
|
||||
"/pretty-ms"
|
||||
],
|
||||
"_resolved": "https://registry.npmjs.org/plur/-/plur-1.0.0.tgz",
|
||||
"_shasum": "db85c6814f5e5e5a3b49efc28d604fec62975156",
|
||||
"_spec": "plur@^1.0.0",
|
||||
"_where": "/home/lilleman/go/src/gitlab.larvit.se/power-plan/auth/tests/node_modules/pretty-ms",
|
||||
"author": {
|
||||
"name": "Sindre Sorhus",
|
||||
"email": "sindresorhus@gmail.com",
|
||||
"url": "sindresorhus.com"
|
||||
},
|
||||
"bugs": {
|
||||
"url": "https://github.com/sindresorhus/plur/issues"
|
||||
},
|
||||
"bundleDependencies": false,
|
||||
"deprecated": false,
|
||||
"description": "Naively pluralize a word",
|
||||
"devDependencies": {
|
||||
"ava": "0.0.4"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=0.10.0"
|
||||
},
|
||||
"files": [
|
||||
"index.js"
|
||||
],
|
||||
"homepage": "https://github.com/sindresorhus/plur#readme",
|
||||
"keywords": [
|
||||
"plur",
|
||||
"plural",
|
||||
"plurals",
|
||||
"pluralize",
|
||||
"singular",
|
||||
"count",
|
||||
"word",
|
||||
"string",
|
||||
"str",
|
||||
"naive",
|
||||
"simple"
|
||||
],
|
||||
"license": "MIT",
|
||||
"name": "plur",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "git+https://github.com/sindresorhus/plur.git"
|
||||
},
|
||||
"scripts": {
|
||||
"test": "node test.js"
|
||||
},
|
||||
"version": "1.0.0"
|
||||
}
|
||||
52
tests/node_modules/plur/readme.md
generated
vendored
Normal file
52
tests/node_modules/plur/readme.md
generated
vendored
Normal file
@@ -0,0 +1,52 @@
|
||||
# plur [](https://travis-ci.org/sindresorhus/plur)
|
||||
|
||||
> Naively pluralize a word
|
||||
|
||||
|
||||
## Install
|
||||
|
||||
```
|
||||
$ npm install --save plur
|
||||
```
|
||||
|
||||
|
||||
## Usage
|
||||
|
||||
```js
|
||||
var plur = require('plur');
|
||||
|
||||
plur('unicorn', 4);
|
||||
//=> 'unicorns'
|
||||
|
||||
plur('hero', 'heroes', 4);
|
||||
//=> 'heroes'
|
||||
```
|
||||
|
||||
|
||||
## API
|
||||
|
||||
### plur(word, [plural], count)
|
||||
|
||||
#### word
|
||||
|
||||
Type: `string`
|
||||
|
||||
Word to pluralize.
|
||||
|
||||
#### plural
|
||||
|
||||
Type: `string`
|
||||
Default: `word` + `s`
|
||||
|
||||
Pluralized word.
|
||||
|
||||
#### count
|
||||
|
||||
Type: `number`
|
||||
|
||||
Count to determine whether to use singular or plural.
|
||||
|
||||
|
||||
## License
|
||||
|
||||
MIT © [Sindre Sorhus](http://sindresorhus.com)
|
||||
Reference in New Issue
Block a user