Skip to content

Commit

Permalink
Merge pull request #7 from humanamburu/feat/ondevtools
Browse files Browse the repository at this point in the history
Add onDevtools function
  • Loading branch information
Uladzimir Halushka authored Mar 25, 2019
2 parents 218ce68 + 5eaa488 commit 5e602da
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -142,3 +142,17 @@ export function isES6available() {
return false;
}
}

/**
* Invoke cb each time when devtools opened
*/

export function onDevtools(cb) {
const test = /./;

test.toString = function() {
cb();
}

console.log('%s', test);
}

0 comments on commit 5e602da

Please sign in to comment.