Skip to content

Commit

Permalink
run update and lint-deps
Browse files Browse the repository at this point in the history
  • Loading branch information
jonschlinkert committed Oct 17, 2017
1 parent db0d5e3 commit 823142f
Show file tree
Hide file tree
Showing 8 changed files with 44 additions and 41 deletions.
9 changes: 5 additions & 4 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -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
insert_final_newline = false
5 changes: 0 additions & 5 deletions .eslintrc.json
Original file line number Diff line number Diff line change
@@ -1,9 +1,4 @@
{
"ecmaFeatures": {
"modules": true,
"experimentalObjectRestSpread": true
},

"env": {
"browser": false,
"es6": true,
Expand Down
10 changes: 9 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -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
12 changes: 7 additions & 5 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -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'
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -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
Expand Down
5 changes: 3 additions & 2 deletions index.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
/*!
* 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';
Expand All @@ -11,6 +11,7 @@ module.exports = function isNumber(num) {
var type = typeof num;

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' && !(num instanceof Number)) {
return false;
Expand Down
18 changes: 7 additions & 11 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
"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@sellside.com> (http://twitter.com/jonschlinkert)"
"Jon Schlinkert (http://twitter.com/jonschlinkert)",
"tunnckoCore (https://i.am.charlike.online)"
],
"repository": "jonschlinkert/is-number",
"bugs": {
Expand All @@ -24,10 +24,10 @@
"test": "mocha"
},
"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",
Expand Down Expand Up @@ -71,10 +71,6 @@
],
"lint": {
"reflinks": true
},
"reflinks": [
"verb",
"verb-generate-readme"
]
}
}
}
24 changes: 12 additions & 12 deletions test.js
Original file line number Diff line number Diff line change
@@ -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('./');

Expand Down Expand Up @@ -122,9 +122,9 @@ var shouldFail = [
+'abc',
+/foo/,
+[1, 2, 4],
+function () {},
+function() {},
+function(){},
+function() {},
+function() {},
+Infinity,
+Math.sin,
+NaN,
Expand All @@ -145,9 +145,9 @@ var shouldFail = [
[],
Boolean(true),
false,
function () {},
function() {},
function(){},
function() {},
function() {},
Infinity,
Math.sin,
NaN,
Expand All @@ -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);
});
});
Expand Down

0 comments on commit 823142f

Please sign in to comment.