Skip to content

Commit

Permalink
run verb to generate readme
Browse files Browse the repository at this point in the history
  • Loading branch information
jonschlinkert committed Jan 29, 2018
1 parent a30f50a commit ca743ce
Show file tree
Hide file tree
Showing 2 changed files with 37 additions and 12 deletions.
17 changes: 15 additions & 2 deletions .verb.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,13 +45,26 @@ isNumber([]) //=> 'false'
isNumber(function () {}) //=> 'false'
isNumber(Infinity) //=> 'false'
isNumber(NaN) //=> 'false'
isNumber(new Array('abc')) //=> 'false'
isNumber(new Array(2)) //=> 'false'
isNumber(new Buffer('abc')) //=> 'false'
isNumber(null) //=> 'false'
isNumber(undefined) //=> 'false'
isNumber({abc: 'abc'}) //=> 'false'
```

## Why is this needed?

This library provides a fast, simple way of checking whether a value is a number, whether defined as a string or number by the user.

In JavaScript, can easily test for a number by doing `typeof value === 'number'`. But sometimes that's not enough. For example, `typeof NaN` returns `number`, and there are many use cases where it's possible or necessary for a numerical value to be defined as a string (I personally use this library to check for numbers when parsing a string. Clearly, this is a case where it's not possible for the value to be defined as a number).

## Release history

### 5.0.0

**Breaking changes**

- removed support for `instanceof Number` and `instanceof String`


[infinity]: http://en.wikipedia.org/wiki/Infinity
[gist]: https://gist.github.com/jonschlinkert/e30c70c713da325d0e81
32 changes: 22 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -59,14 +59,26 @@ isNumber([]) //=> 'false'
isNumber(function () {}) //=> 'false'
isNumber(Infinity) //=> 'false'
isNumber(NaN) //=> 'false'
isNumber(new Array('abc')) //=> 'false'
isNumber(new Array(2)) //=> 'false'
isNumber(new Buffer('abc')) //=> 'false'
isNumber(null) //=> 'false'
isNumber(undefined) //=> 'false'
isNumber({abc: 'abc'}) //=> 'false'
```

## Why is this needed?

This library provides a fast, simple way of checking whether a value is a number, whether defined as a string or number by the user.

In JavaScript, can easily test for a number by doing `typeof value === 'number'`. But sometimes that's not enough. For example, `typeof NaN` returns `number`, and there are many use cases where it's possible or necessary for a numerical value to be defined as a string (I personally use this library to check for numbers when parsing a string. Clearly, this is a case where it's not possible for the value to be defined as a number).

## Release history

### 5.0.0

**Breaking changes**

* removed support for `instanceof Number` and `instanceof String`

## About

<details>
Expand Down Expand Up @@ -104,32 +116,32 @@ $ npm install -g verbose/verb#dev verb-generate-readme && verb

You might also be interested in these projects:

* [even](https://www.npmjs.com/package/even): Get the even numbered items from an array. | [homepage](https://github.com/jonschlinkert/even "Get the even numbered items from an array.")
* [is-even](https://www.npmjs.com/package/is-even): Return true if the given number is even. | [homepage](https://github.com/jonschlinkert/is-even "Return true if the given number is even.")
* [is-odd](https://www.npmjs.com/package/is-odd): Returns true if the given number is odd. | [homepage](https://github.com/jonschlinkert/is-odd "Returns true if the given number is odd.")
* [is-plain-object](https://www.npmjs.com/package/is-plain-object): Returns true if an object was created by the `Object` constructor. | [homepage](https://github.com/jonschlinkert/is-plain-object "Returns true if an object was created by the `Object` constructor.")
* [is-primitive](https://www.npmjs.com/package/is-primitive): Returns `true` if the value is a primitive. | [homepage](https://github.com/jonschlinkert/is-primitive "Returns `true` if the value is a primitive. ")
* [isobject](https://www.npmjs.com/package/isobject): Returns true if the value is an object and not an array or null. | [homepage](https://github.com/jonschlinkert/isobject "Returns true if the value is an object and not an array or null.")
* [kind-of](https://www.npmjs.com/package/kind-of): Get the native type of a value. | [homepage](https://github.com/jonschlinkert/kind-of "Get the native type of a value.")
* [odd](https://www.npmjs.com/package/odd): Get the odd numbered items from an array. | [homepage](https://github.com/jonschlinkert/odd "Get the odd numbered items from an array.")

### Contributors

| **Commits** | **Contributor** |
| --- | --- |
| 38 | [jonschlinkert](https://github.com/jonschlinkert) |
| 5 | [charlike](https://github.com/charlike) |
| 42 | [jonschlinkert](https://github.com/jonschlinkert) |
| 5 | [charlike-old](https://github.com/charlike-old) |
| 1 | [realityking](https://github.com/realityking) |

### Author

**Jon Schlinkert**

* [linkedin/in/jonschlinkert](https://linkedin.com/in/jonschlinkert)
* [github/jonschlinkert](https://github.com/jonschlinkert)
* [twitter/jonschlinkert](https://twitter.com/jonschlinkert)

### License

Copyright © 2017, [Jon Schlinkert](https://github.com/jonschlinkert).
Copyright © 2018, [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 October 17, 2017._
_This file was generated by [verb-generate-readme](https://github.com/verbose/verb-generate-readme), v0.6.0, on January 28, 2018._

0 comments on commit ca743ce

Please sign in to comment.