Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/hugojosefson/one-more-function
Tacks one more function onto the end of an existing function
https://github.com/hugojosefson/one-more-function
Last synced: 29 days ago
JSON representation
Tacks one more function onto the end of an existing function
- Host: GitHub
- URL: https://github.com/hugojosefson/one-more-function
- Owner: hugojosefson
- Created: 2014-05-08T22:34:59.000Z (over 10 years ago)
- Default Branch: develop
- Last Pushed: 2014-05-08T23:26:04.000Z (over 10 years ago)
- Last Synced: 2024-11-11T17:48:08.479Z (about 2 months ago)
- Language: JavaScript
- Homepage: https://github.com/hugojosefson/one-more-function#readme
- Size: 152 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# 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