Giter Club home page Giter Club logo

is-number-like's Introduction

is-number-like

Build Status js-standard-style npm version Coverage Status

var looksLikeNumber = isNumberLike(val)

Checks whether provided parameter looks like a number

  • val (any) - the value to check
  • returns (boolean) looksLikeNumber - true if val looks like a number, false otherwise
const isNumberLike = require('is-number-like')
isNumberLike('2') // true
isNumberLike('a') // false

is-number-like's People

Contributors

laggingreflex avatar sirlancelot avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

is-number-like's Issues

`const isNumber = require('lodash.isfinite')` breaking CI

In circle CI, I'm getting this error on deploying. I can find similar errors all over the results, thinking CI doesn't like ES6.

I don't know may be we need a Circle CI config file? like: https://github.com/ipfs/js-ipfs-api/blob/db5d73156f900a97a9f1323b5cfefd0f4fa49d45/circle.yml

gulp ci-test-sequence

/home/ubuntu/uq-tw-sp-app/node_modules/browser-sync/node_modules/portscanner/node_modules/is-number-like/lib/index.js:2
const isNumber = require('lodash.isfinite')
^^^^^
SyntaxError: Use of const in strict mode.
    at Module._compile (module.js:439:25)
    at Object.Module._extensions..js (module.js:474:10)
    at Module.load (module.js:356:32)
    at Function.Module._load (module.js:312:12)
    at Module.require (module.js:364:17)
    at require (module.js:380:17)
    at Object.<anonymous> (/home/ubuntu/uq-tw-sp-app/node_modules/browser-sync/node_modules/portscanner/lib/portscanner.js:4:20)
    at Module._compile (module.js:456:26)
    at Object.Module._extensions..js (module.js:474:10)
    at Module.load (module.js:356:32)
npm ERR! Test failed.  See above for more details.

npm test returned exit code 1](url)gulp ci-test-sequence


/home/ubuntu/uq-tw-sp-app/node_modules/browser-sync/node_modules/portscanner/node_modules/is-number-like/lib/index.js:2
const isNumber = require('lodash.isfinite')
^^^^^
SyntaxError: Use of const in strict mode.
    at Module._compile (module.js:439:25)
    at Object.Module._extensions..js (module.js:474:10)
    at Module.load (module.js:356:32)
    at Function.Module._load (module.js:312:12)
    at Module.require (module.js:364:17)
    at require (module.js:380:17)
    at Object.<anonymous> (/home/ubuntu/uq-tw-sp-app/node_modules/browser-sync/node_modules/portscanner/lib/portscanner.js:4:20)
    at Module._compile (module.js:456:26)
    at Object.Module._extensions..js (module.js:474:10)
    at Module.load (module.js:356:32)
npm ERR! Test failed.  See above for more details.

npm test returned exit code 1

Move or remove bubleify dependency

bubleify is listed in the production dependencies of this module. This seems to be causing unnecessary bloat when this module is depended upon by other packages.

At the very least, it should be moved to devDependencies but after looking a little deeper, this module doesn't appear to even use bubleify! Let's just remove it for now.

SyntaxError: Use of const in strict mode.

Using const isNumber = require('lodash.isfinite') in combination with 'use strict' in index.js breaks compatibility with Node.js v0.12.

My build fails because of that:

/home/travis/build/caiogondim/logdown.js/node_modules/browser-sync/node_modules/portscanner/node_modules/is-number-like/lib/index.js:2
const isNumber = require('lodash.isfinite')
^^^^^
SyntaxError: Use of const in strict mode.
at exports.runInThisContext (vm.js:73:16)
at Module._compile (module.js:443:25)
at Object.Module._extensions..js (module.js:478:10)
at Module.load (module.js:355:32)
at Function.Module._load (module.js:310:12)
at Module.require (module.js:365:17)
at require (module.js:384:17)
at Object. (/home/travis/build/caiogondim/logdown.js/node_modules/browser-sync/node_modules/portscanner/lib/portscanner.js:4:20)
at Module._compile (module.js:460:26)
at Object.Module._extensions..js (module.js:478:10)

Log: https://travis-ci.org/caiogondim/logdown.js/jobs/183316473

The result is that our logger module logdown.js is not compatible with Node.js v0.12 and below anymore. ๐Ÿ˜ข

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.