[Pkg-javascript-commits] [node-is-number] 02/05: New upstream version 4.0.0

Julien Puydt julien.puydt at laposte.net
Fri Nov 24 21:16:22 UTC 2017


This is an automated email from the git hooks/post-receive script.

jpuydt-guest pushed a commit to branch master
in repository node-is-number.

commit 852d623cfe1670e9566fce8a640e42627c887507
Author: Julien Puydt <julien.puydt at laposte.net>
Date:   Fri Nov 24 22:14:01 2017 +0100

    New upstream version 4.0.0
---
 .editorconfig  |  9 +++++----
 .eslintrc.json |  5 -----
 .gitignore     | 10 ++++++++-
 .travis.yml    | 12 ++++++-----
 LICENSE        |  2 +-
 README.md      | 64 ++++++++++++++++++++++++++++++++++++++--------------------
 index.js       | 13 ++++++------
 package.json   | 25 +++++++++--------------
 test.js        | 24 +++++++++++-----------
 9 files changed, 91 insertions(+), 73 deletions(-)

diff --git a/.editorconfig b/.editorconfig
index 818e072..449f0da 100644
--- a/.editorconfig
+++ b/.editorconfig
@@ -1,13 +1,14 @@
+# http://editorconfig.org/
 root = true
 
 [*]
-indent_style = space
-end_of_line = lf
 charset = utf-8
+end_of_line = lf
 indent_size = 2
-trim_trailing_whitespace = true
+indent_style = space
 insert_final_newline = true
+trim_trailing_whitespace = true
 
 [{**/{actual,fixtures,expected,templates}/**,*.md}]
 trim_trailing_whitespace = false
-insert_final_newline = false
\ No newline at end of file
+insert_final_newline = false
diff --git a/.eslintrc.json b/.eslintrc.json
index 948dbdb..61e8895 100644
--- a/.eslintrc.json
+++ b/.eslintrc.json
@@ -1,9 +1,4 @@
 {
-  "ecmaFeatures": {
-    "modules": true,
-    "experimentalObjectRestSpread": true
-  },
-
   "env": {
     "browser": false,
     "es6": true,
diff --git a/.gitignore b/.gitignore
index 7988154..4bf0a60 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,21 +1,29 @@
 # always ignore files
 *.DS_Store
+.idea
 *.sublime-*
 
 # test related, or directories generated by tests
 test/actual
 actual
 coverage
+.nyc*
 
 # npm
 node_modules
 npm-debug.log
 
+# yarn
+yarn.lock
+yarn-error.log
+
 # misc
 _gh_pages
-benchmark
+_draft
+_drafts
 bower_components
 vendor
 temp
 tmp
 TODO.md
+package-lock.json
\ No newline at end of file
diff --git a/.travis.yml b/.travis.yml
index 04a029e..67decb2 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -1,12 +1,14 @@
 sudo: false
+os:
+  - linux
+  - osx
 language: node_js
 node_js:
   - node
+  - '8'
+  - '7'
   - '6'
   - '5'
+  - '4'
   - '0.12'
-matrix:
-  fast_finish: true
-  allow_failures:
-    - node_js: '4'
-    - node_js: '0.12'
+  - '0.10'
diff --git a/LICENSE b/LICENSE
index 842218c..3f2eca1 100644
--- a/LICENSE
+++ b/LICENSE
@@ -1,6 +1,6 @@
 The MIT License (MIT)
 
-Copyright (c) 2014-2016, Jon Schlinkert
+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
diff --git a/README.md b/README.md
index 281165d..6436992 100644
--- a/README.md
+++ b/README.md
@@ -1,7 +1,9 @@
-# is-number [![NPM version](https://img.shields.io/npm/v/is-number.svg?style=flat)](https://www.npmjs.com/package/is-number) [![NPM downloads](https://img.shields.io/npm/dm/is-number.svg?style=flat)](https://npmjs.org/package/is-number) [![Build Status](https://img.shields.io/travis/jonschlinkert/is-number.svg?style=flat)](https://travis-ci.org/jonschlinkert/is-number)
+# is-number [![NPM version](https://img.shields.io/npm/v/is-number.svg?style=flat)](https://www.npmjs.com/package/is-number) [![NPM monthly downloads](https://img.shields.io/npm/dm/is-number.svg?style=flat)](https://npmjs.org/package/is-number) [![NPM total downloads](https://img.shields.io/npm/dt/is-number.svg?style=flat)](https://npmjs.org/package/is-number) [![Linux Build Status](https://img.shields.io/travis/jonschlinkert/is-number.svg?style=flat&label=Travis)](https://travis-ci.org/ [...]
 
 > Returns true if the value is a number. comprehensive tests.
 
+Please consider following this project's author, [Jon Schlinkert](https://github.com/jonschlinkert), and consider starring the project to show your :heart: and support.
+
 ## Install
 
 Install with [npm](https://www.npmjs.com/):
@@ -67,49 +69,67 @@ isNumber({abc: 'abc'})      //=> 'false'
 
 ## About
 
-### Related 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-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. ")
-* [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.")
-
-### Contributing
+<details>
+<summary><strong>Contributing</strong></summary>
 
 Pull requests and stars are always welcome. For bugs and feature requests, [please create an issue](../../issues/new).
 
-### Building docs
+</details>
 
-_(This document was generated by [verb-generate-readme](https://github.com/verbose/verb-generate-readme) (a [verb](https://github.com/verbose/verb) generator), please don't edit the readme directly. Any changes to the readme must be made in [.verb.md](.verb.md).)_
+<details>
+<summary><strong>Running Tests</strong></summary>
 
-To generate the readme and API documentation with [verb](https://github.com/verbose/verb):
+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 -g verb verb-generate-readme && verb
+$ npm install && npm test
 ```
 
-### Running tests
+</details>
 
-Install dev dependencies:
+<details>
+<summary><strong>Building docs</strong></summary>
+
+_(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 -d && npm test
+$ npm install -g verbose/verb#dev verb-generate-readme && verb
 ```
 
+</details>
+
+### Related projects
+
+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-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. ")
+* [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) |
+
 ### Author
 
 **Jon Schlinkert**
 
 * [github/jonschlinkert](https://github.com/jonschlinkert)
-* [twitter/jonschlinkert](http://twitter.com/jonschlinkert)
+* [twitter/jonschlinkert](https://twitter.com/jonschlinkert)
 
 ### License
 
-Copyright © 2016, [Jon Schlinkert](https://github.com/jonschlinkert).
-Released under the [MIT license](https://github.com/jonschlinkert/is-number/blob/master/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.1.30, on September 10, 2016._
\ No newline at end of file
+_This file was generated by [verb-generate-readme](https://github.com/verbose/verb-generate-readme), v0.6.0, on October 17, 2017._
\ No newline at end of file
diff --git a/index.js b/index.js
index 7a2a45b..5221f40 100644
--- a/index.js
+++ b/index.js
@@ -1,20 +1,19 @@
 /*!
  * is-number <https://github.com/jonschlinkert/is-number>
  *
- * Copyright (c) 2014-2015, Jon Schlinkert.
- * Licensed under the MIT License.
+ * Copyright (c) 2014-2017, Jon Schlinkert.
+ * Released under the MIT License.
  */
 
 'use strict';
 
-var typeOf = require('kind-of');
-
 module.exports = function isNumber(num) {
-  var type = typeOf(num);
+  var type = typeof num;
 
-  if (type === 'string') {
+  if (type === 'string' || num instanceof String) {
+    // an empty string would be coerced to true with the below logic
     if (!num.trim()) return false;
-  } else if (type !== 'number') {
+  } else if (type !== 'number' && !(num instanceof Number)) {
     return false;
   }
 
diff --git a/package.json b/package.json
index 8c1f9ab..c8a7af1 100644
--- a/package.json
+++ b/package.json
@@ -1,12 +1,12 @@
 {
   "name": "is-number",
   "description": "Returns true if the value is a number. comprehensive tests.",
-  "version": "3.0.0",
+  "version": "4.0.0",
   "homepage": "https://github.com/jonschlinkert/is-number",
   "author": "Jon Schlinkert (https://github.com/jonschlinkert)",
   "contributors": [
-    "Charlike Mike Reagent (http://www.tunnckocore.tk)",
-    "Jon Schlinkert <jon.schlinkert at sellside.com> (http://twitter.com/jonschlinkert)"
+    "Jon Schlinkert (http://twitter.com/jonschlinkert)",
+    "tunnckoCore (https://i.am.charlike.online)"
   ],
   "repository": "jonschlinkert/is-number",
   "bugs": {
@@ -23,14 +23,11 @@
   "scripts": {
     "test": "mocha"
   },
-  "dependencies": {
-    "kind-of": "^3.0.2"
-  },
   "devDependencies": {
-    "benchmarked": "^0.2.5",
-    "chalk": "^1.1.3",
-    "gulp-format-md": "^0.1.10",
-    "mocha": "^3.0.2"
+    "benchmarked": "^2.0.0",
+    "chalk": "^2.1.0",
+    "gulp-format-md": "^1.0.0",
+    "mocha": "^3.0.1"
   },
   "keywords": [
     "check",
@@ -74,10 +71,6 @@
     ],
     "lint": {
       "reflinks": true
-    },
-    "reflinks": [
-      "verb",
-      "verb-generate-readme"
-    ]
+    }
   }
-}
\ No newline at end of file
+}
diff --git a/test.js b/test.js
index 3cbbc56..8946fe6 100644
--- a/test.js
+++ b/test.js
@@ -1,13 +1,13 @@
 /*!
  * is-number <https://github.com/jonschlinkert/is-number>
  *
- * Copyright (c) 2014-2015, Jon Schlinkert.
+ * Copyright (c) 2014-2017, Jon Schlinkert.
  * Licensed under the MIT License.
  */
 
 'use strict';
 
-/* deps: mocha */
+require('mocha');
 var assert = require('assert');
 var isNumber = require('./');
 
@@ -122,9 +122,9 @@ var shouldFail = [
   +'abc',
   +/foo/,
   +[1, 2, 4],
-  +function () {},
   +function() {},
-  +function(){},
+  +function() {},
+  +function() {},
   +Infinity,
   +Math.sin,
   +NaN,
@@ -145,9 +145,9 @@ var shouldFail = [
   [],
   Boolean(true),
   false,
-  function () {},
   function() {},
-  function(){},
+  function() {},
+  function() {},
   Infinity,
   Math.sin,
   NaN,
@@ -169,17 +169,17 @@ var shouldFail = [
   {},
 ];
 
-describe('is a number', function () {
-  shouldPass.forEach(function (num) {
-    it('"' + JSON.stringify(num) + '" should be a number', function () {
+describe('is a number', function() {
+  shouldPass.forEach(function(num) {
+    it('"' + JSON.stringify(num) + '" should be a number', function() {
       assert.equal(isNumber(num), true);
     });
   });
 });
 
-describe('is not a number', function () {
-  shouldFail.forEach(function (num) {
-    it('"' + JSON.stringify(num) + '" should not be a number', function () {
+describe('is not a number', function() {
+  shouldFail.forEach(function(num) {
+    it('"' + JSON.stringify(num) + '" should not be a number', function() {
       assert.equal(isNumber(num), false);
     });
   });

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-javascript/node-is-number.git



More information about the Pkg-javascript-commits mailing list