Skip to content
Pipez is a microlibrary for creating event handlers with pre and post executing functions
JavaScript
Find file
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.
README.md
index.html
pipez.js

README.md

Pipez

Pipez is a microlibrary for creating event handlers with pre and post executing functions

Example

This:

    <script src="pipez.js"></script>
    <div id="test">
        Test div
    </div>    
    <script>
        var pipe = new Pipez(function(evt){ console.log('the event'); });
        pipe.after(function(evt){ console.log('after'); })
            .before(function(evt){ console.log('before'); });
        document.getElementById('test').addEventListener('click',pipe.handler)
    </script>

Outputs "before", "the event", "after" when the div is clicked

Something went wrong with that request. Please try again.