0.1.0 • Published 10 years ago

one-more-function v0.1.0

Weekly downloads
2
License
MIT
Repository
github
Last release
10 years ago

one-more-function

Tacks one more function onto the end of an existing function.

Useful for adding another listener to for example window.onresize.

Example

Given:

    window.onresize = function () {
        console.log('onresize 1');
    };

You can add another one:

    window.onresize = oneMoreFunction(window.onresize, function () {
        console.log('onresize 2');
    });

When you resize the browser window,

Then you get:

    onresize 1
    onresize 2

License

MIT