0.5.10 • Published 10 years ago

lodash-get-arguments v0.5.10

Weekly downloads
2
License
GNU 3
Repository
github
Last release
10 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

10 years ago

0.5.9

10 years ago

0.5.8

10 years ago

0.5.7

10 years ago

0.5.6

10 years ago

0.5.5

10 years ago

0.5.4

10 years ago

0.5.3

10 years ago

0.5.2

10 years ago

0.5.1

10 years ago

0.5.0

10 years ago