Skip to content

Commit

Permalink
Require Node.js 10
Browse files Browse the repository at this point in the history
  • Loading branch information
sindresorhus committed Feb 16, 2020
1 parent 14c5113 commit 498b2fb
Show file tree
Hide file tree
Showing 6 changed files with 13 additions and 23 deletions.
2 changes: 0 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,3 @@ language: node_js
node_js:
- '12'
- '10'
- '8'
- '6'
6 changes: 3 additions & 3 deletions index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,8 @@ plur('box', 2);
plur('cactus', 2);
//=> 'cacti'
```
*/
declare function plur(word: string, count?: number): string;
declare function plur(word: string, plural: string, count?: number): string;
*/
declare function plur(word: string, count: number): string;
declare function plur(word: string, plural: string, count: number): string;

export = plur;
3 changes: 1 addition & 2 deletions index.test-d.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import {expectType} from 'tsd';
import plur = require('.');

expectType<string>(plur('chicken'));
expectType<string>(plur('chicken', 2));
expectType<string>(plur('chicken', 'chicken', 2));
expectType<string>(plur('chicken', 'chicks', 2));
2 changes: 1 addition & 1 deletion license
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
MIT License

Copyright (c) Sindre Sorhus <sindresorhus@gmail.com> (sindresorhus.com)
Copyright (c) Sindre Sorhus <sindresorhus@gmail.com> (https://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:

Expand Down
11 changes: 6 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,14 @@
"description": "Pluralize a word",
"license": "MIT",
"repository": "sindresorhus/plur",
"funding": "https://github.com/sponsors/sindresorhus",
"author": {
"name": "Sindre Sorhus",
"email": "sindresorhus@gmail.com",
"url": "sindresorhus.com"
"url": "https://sindresorhus.com"
},
"engines": {
"node": ">=6"
"node": ">=10"
},
"scripts": {
"test": "xo && ava && tsd"
Expand All @@ -32,11 +33,11 @@
"nouns"
],
"dependencies": {
"irregular-plurals": "^2.0.0"
"irregular-plurals": "^3.2.0"
},
"devDependencies": {
"ava": "^1.4.1",
"tsd": "^0.7.2",
"xo": "^0.24.0"
"tsd": "^0.11.0",
"xo": "^0.26.1"
}
}
12 changes: 2 additions & 10 deletions readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,12 @@

> Pluralize a word

## Install

```
$ npm install plur
```


## Usage

```js
Expand All @@ -28,10 +26,9 @@ plur('cactus', 2);
//=> 'cacti'
```


## API

### plur(word, [plural], count)
### plur(word, plural?, count)

#### word

Expand All @@ -41,7 +38,7 @@ Word to pluralize.

#### plural

Type: `string`<br>
Type: `string`\
Default:

- Irregular nouns will use this [list](https://github.com/sindresorhus/irregular-plurals/blob/master/irregular-plurals.json).
Expand All @@ -60,8 +57,3 @@ This option is only for extreme edge-cases. You probably won't need it.
Type: `number`

Count to determine whether to use singular or plural.


## License

MIT © [Sindre Sorhus](https://sindresorhus.com)

0 comments on commit 498b2fb

Please sign in to comment.