gimmie
The stupid iterator.
Getting Started
Install the module with: npm install gimmie
Documentation
gimmie( Any... ): Function
Accepts any number of values of any type and returns a function that yields each given value in turn when invoked multiple times.
var gimmie = ; var next = ; console; // 3 console; // 5 console; // 7 console; // undefined
gimmie( Function... ): Function
Accepts any number of functions and returns a function which masquerades as each given function in turn when invoked multiple times. Useful for mocking methods or injecting assertions in tests.
var $ = ; var assert = ; var gimmie = ; var origAjax = $ajax; $ajax = ; $; // pass $; // fail
Contributing
In lieu of a formal styleguide, take care to maintain the existing coding style. Add unit tests for any new or changed functionality. Lint and test your code using Grunt.
Release History
- 0.1.0: Initial release.
License
Copyright (c) 2013 Shannon Moeller. Licensed under the MIT license.