Skip to content

wwalser/lazify-proxy

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

LazifyProxy

New version of Lazify library using ESHarmony Proxies. Makes things lazy. Mostly useless because only Firefox supports Proxies. Experiments seem good.

Getting Started

For Node:

//Create a lazy version of a function that returns functions
var lazify = require('Lazify.js');
var lazyThing = lazify(thing);
lazyThing()()();
//nothing has occurred yet
lazyThing.exec()
//thing()()() is executed

//Create a lazy version of a jQuery like object. Note that with Proxies you don't
//need to tell lazify about the thing your making lazy. It just works.
var lazyQuery = lazify($);
lazyQuery('#any.selector').appendTo('#another.query');
//nothing has occurred yet
lazyQuery.exec();
//$('#any.selector').appendTo('#another.query') is executed

For Browser: Download the production version or the development version.

Same API, in a browser, you can figure it out.

Documentation

Code is the documentation for now.

Examples

(Coming soon)

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. From the cli:

npm install
grunt

Release History

(Nothing yet)

License

Copyright (c) 2013 Wesley Walser
Licensed under the MIT license. Let me know if this is a problem.

About

Makes things lazy using ES Harmony Direct Proxy API.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published