Coder Social home page Coder Social logo

node-funargs's Introduction

NODE-FUNARGS

ction arguments for Node.js.

Installation

  $ npm install funargs

Usage

  var fun = require('funargs');

  // A function...

  function funnier_args() {
    var args = fun(arguments); // =D

    // Return some fun!

    return [
      Array.isArray(args),
      args,
      args.booleans(),
      args.strings(),
      args.numbers(),
      args.objects(),
      args.arrays(),
      args.functions()
    ];
  }

  // ...and a call.

  funnier_args("Why", null, "must", ["arguments", "be"], 1, {hell: "of"}, "a...", function() { return "pain"; }, true);

Test

Suite:

  $ make test

Examples:

  $ make example

References

License

Released under the MIT license.
Copyright © Jonas Grimfelt

node-funargs's People

Contributors

grimen avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar

node-funargs's Issues

Array.prototype

Hello there,

I'm building a software using the node-document-storage module which depends on funargs.
I'd like to know why you're adding values to Array.prototype chain since there are a lot of other npm modules still looping:

for (var i in arr) {...}

without checking

arr.hasOwnProperty(i)

Can you please refacture the line
https://github.com/grimen/node-funargs/blob/master/lib/index.js#L14
to something more encapsulated.

Thank you

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.