1.1.11 • Published 3 years ago

bighook v1.1.11

Weekly downloads
-
License
MIT
Repository
github
Last release
3 years ago

bighook

Easily hook on to the beginning or end of function calls

Installation

npm i bighook

Example

const Bighook = require('bighook');

let val1;
let val2;
const setVal1 = () => {
  val1 = 'Hello world!';
};

const hook = new Bighook(setVal1);

hook
  .before(() => {
    val2 = 'foo';
  })
  .after(() => {
    val1 = 'bar';
  });

hook.function()();
console.log(val1, val2); // "bar foo"

Docs

The docs can be found here

1.1.11

3 years ago

1.1.10

3 years ago

1.1.9

3 years ago

1.1.8

3 years ago

1.1.7

3 years ago

1.1.6

3 years ago

1.1.5

3 years ago

1.1.4

3 years ago

1.1.3

3 years ago

1.1.2

3 years ago

1.1.1

3 years ago

1.1.0

3 years ago

1.0.2

3 years ago

1.0.1

3 years ago

1.0.0

3 years ago