Aop for next.
npm install -S @jswork/next-aopimport '@jswork/next-aop';
console.log = nx.aop(console.log, {
before: function (oldConsole) {
oldConsole('=--before--=');
},
after: function (oldConsole) {
oldConsole('=--after--=');
},
});
// test:
console.log('---abc---');
// =--before--=
// ---abc---
// =--after--=Code released under the MIT license.