0.5.10 • Published 9 years ago

lodash-get-arguments v0.5.10

Weekly downloads
2
License
GNU 3
Repository
github
Last release
9 years ago

Lodash getArguments

Lodash mixin which assigns arbitrary arguments to named keys which correspond to named predicates in an object.

Usage

function myFunction() {
  var a = _.getArguments(arguments, {
    name: function (b) {
      return typeof b === 'string';
    },
    node: function (b) {
      return !!b && typeof b === 'object' && !!b.nodeType;
    },
    callback: function (b) {
      return typeof b === 'function';
    }
  });
}
myFunction(myCallback, 'Sean', document.querySelector('div'));
// → { name: 'Sean', node: document.querySelector('div'), callback: myCallback }

Not all arguments supplied

myFunction(myCallback, document.querySelector('div'));
// → { name: false, node: document.querySelector('div'), callback: myCallback }
0.5.10

9 years ago

0.5.9

9 years ago

0.5.8

9 years ago

0.5.7

9 years ago

0.5.6

9 years ago

0.5.5

9 years ago

0.5.4

9 years ago

0.5.3

9 years ago

0.5.2

9 years ago

0.5.1

9 years ago

0.5.0

9 years ago