GithubHelp home page GithubHelp logo

stdarg / is2 Goto Github PK

View Code? Open in Web Editor NEW
10.0 10.0 4.0 204 KB

A type-checking module for node.js to test values and types. Does not throw exceptions.

License: MIT License

JavaScript 100.00%

is2's People

Contributors

dependabot[bot] avatar iameddiedean avatar panjiangyi avatar snyk-bot avatar stdarg avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

is2's Issues

Support AsyncFunction

is.fun(() => {}) //true
is.fun(async () => {}) //false

Because toString.call(async () => {}) === '[object AsyncFunction] '

I don't know how you want to handle this, an async function is a function, so you could just return true, or you may want to distinguish between an async function and a non-async function.

is it possible to not depend on compiled modules?

Hi Edmond.

See junosuarez/objectid#8

If that isn't fixed, I wonder if its possible to rework this to not depend on compiled modules?

Its great to have a good quality set of checks on types and not have to write them ourselves, but getting a binary dep just for is2.positiveInt() isn't worth it for us.

It looks like your only use of objectid is to call isValid(), would you take a PR to inline https://github.com/jden/objectid/blob/master/index.js#L7-L10 rather than having to depend on objectid, and through it, the old, compiled, version of bson?

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.