docs(changelog test): i test how to automate ChangeLog
This commit is contained in:
21
node_modules/longest/LICENSE
generated
vendored
Normal file
21
node_modules/longest/LICENSE
generated
vendored
Normal file
@@ -0,0 +1,21 @@
|
||||
The MIT License (MIT)
|
||||
|
||||
Copyright (c) 2014-2017, Jon Schlinkert
|
||||
|
||||
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.
|
79
node_modules/longest/README.md
generated
vendored
Normal file
79
node_modules/longest/README.md
generated
vendored
Normal file
@@ -0,0 +1,79 @@
|
||||
# longest [](https://www.npmjs.com/package/longest) [](https://npmjs.org/package/longest) [](https://npmjs.org/package/longest) [](https://travis-ci.org/jonschlinkert/longest)
|
||||
|
||||
> Get the longest item in an array.
|
||||
|
||||
## Install
|
||||
|
||||
Install with [npm](https://www.npmjs.com/):
|
||||
|
||||
```sh
|
||||
$ npm install --save longest
|
||||
```
|
||||
|
||||
## Install
|
||||
|
||||
Install with [bower](https://bower.io/)
|
||||
|
||||
```sh
|
||||
$ bower install longest --save
|
||||
```
|
||||
|
||||
## Usage
|
||||
|
||||
```js
|
||||
var longest = require('longest');
|
||||
longest(['a', 'abcde', 'abc']);
|
||||
//=> 'abcde'
|
||||
|
||||
longest(['a', 'abcde', 'abc']).length;
|
||||
//=> 5
|
||||
```
|
||||
|
||||
## About
|
||||
|
||||
### Contributing
|
||||
|
||||
Pull requests and stars are always welcome. For bugs and feature requests, [please create an issue](../../issues/new).
|
||||
|
||||
### Contributors
|
||||
|
||||
| **Commits** | **Contributor** |
|
||||
| --- | --- |
|
||||
| 25 | [jonschlinkert](https://github.com/jonschlinkert) |
|
||||
| 4 | [shinnn](https://github.com/shinnn) |
|
||||
| 1 | [kevva](https://github.com/kevva) |
|
||||
| 1 | [kemitchell](https://github.com/kemitchell) |
|
||||
|
||||
### Building docs
|
||||
|
||||
_(This project's readme.md is generated by [verb](https://github.com/verbose/verb-generate-readme), please don't edit the readme directly. Any changes to the readme must be made in the [.verb.md](.verb.md) readme template.)_
|
||||
|
||||
To generate the readme, run the following command:
|
||||
|
||||
```sh
|
||||
$ npm install -g verbose/verb#dev verb-generate-readme && verb
|
||||
```
|
||||
|
||||
### Running tests
|
||||
|
||||
Running and reviewing unit tests is a great way to get familiarized with a library and its API. You can install dependencies and run tests with the following command:
|
||||
|
||||
```sh
|
||||
$ npm install && npm test
|
||||
```
|
||||
|
||||
### Author
|
||||
|
||||
**Jon Schlinkert**
|
||||
|
||||
* [github/jonschlinkert](https://github.com/jonschlinkert)
|
||||
* [twitter/jonschlinkert](https://twitter.com/jonschlinkert)
|
||||
|
||||
### License
|
||||
|
||||
Copyright © 2017, [Jon Schlinkert](https://github.com/jonschlinkert).
|
||||
Released under the [MIT License](LICENSE).
|
||||
|
||||
***
|
||||
|
||||
_This file was generated by [verb-generate-readme](https://github.com/verbose/verb-generate-readme), v0.6.0, on May 26, 2017._
|
49
node_modules/longest/index.js
generated
vendored
Normal file
49
node_modules/longest/index.js
generated
vendored
Normal file
@@ -0,0 +1,49 @@
|
||||
/*!
|
||||
* longest <https://github.com/jonschlinkert/longest>
|
||||
*
|
||||
* Copyright (c) 2014-2017, Jon Schlinkert.
|
||||
* Released under the MIT License.
|
||||
*/
|
||||
|
||||
'use strict';
|
||||
|
||||
module.exports = function(arr) {
|
||||
if (!Array.isArray(arr)) {
|
||||
throw new TypeError('expected an array');
|
||||
}
|
||||
|
||||
var len = arr.length;
|
||||
if (len === 0) {
|
||||
return undefined;
|
||||
}
|
||||
|
||||
var val = arr[0];
|
||||
if (typeof val === 'number') {
|
||||
val = String(val);
|
||||
}
|
||||
|
||||
var longest = val.length;
|
||||
var idx = 0;
|
||||
|
||||
while (++idx < len) {
|
||||
var ele = arr[idx];
|
||||
if (ele == null) {
|
||||
continue;
|
||||
}
|
||||
|
||||
if (typeof ele === 'number') {
|
||||
ele = String(ele);
|
||||
}
|
||||
|
||||
var elen = ele.length;
|
||||
if (typeof elen !== 'number') {
|
||||
continue;
|
||||
}
|
||||
|
||||
if (elen > longest) {
|
||||
longest = elen;
|
||||
val = ele;
|
||||
}
|
||||
}
|
||||
return val;
|
||||
};
|
53
node_modules/longest/package.json
generated
vendored
Normal file
53
node_modules/longest/package.json
generated
vendored
Normal file
@@ -0,0 +1,53 @@
|
||||
{
|
||||
"name": "longest",
|
||||
"description": "Get the longest item in an array.",
|
||||
"version": "2.0.1",
|
||||
"homepage": "https://github.com/jonschlinkert/longest",
|
||||
"author": "Jon Schlinkert (https://github.com/jonschlinkert)",
|
||||
"contributors": [
|
||||
"Jon Schlinkert (http://twitter.com/jonschlinkert)",
|
||||
"Kevin Mårtensson (https://github.com/kevva)",
|
||||
"Kyle Mitchell (https://kemitchell.com)",
|
||||
"Shinnosuke Watanabe (https://shinnn.github.io)"
|
||||
],
|
||||
"repository": "jonschlinkert/longest",
|
||||
"bugs": {
|
||||
"url": "https://github.com/jonschlinkert/longest/issues"
|
||||
},
|
||||
"license": "MIT",
|
||||
"files": [
|
||||
"index.js"
|
||||
],
|
||||
"main": "index.js",
|
||||
"engines": {
|
||||
"node": ">=0.10.0"
|
||||
},
|
||||
"scripts": {
|
||||
"test": "mocha"
|
||||
},
|
||||
"devDependencies": {
|
||||
"gulp-format-md": "^0.1.12",
|
||||
"mocha": "^3.3.0"
|
||||
},
|
||||
"keywords": [
|
||||
"array",
|
||||
"element",
|
||||
"item",
|
||||
"length",
|
||||
"long",
|
||||
"longest"
|
||||
],
|
||||
"verb": {
|
||||
"toc": false,
|
||||
"layout": "default",
|
||||
"tasks": [
|
||||
"readme"
|
||||
],
|
||||
"plugins": [
|
||||
"gulp-format-md"
|
||||
],
|
||||
"lint": {
|
||||
"reflinks": true
|
||||
}
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user