Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import * as util from 'util';
- const log = (function() {
- return function(msg: string) {
- return function(v: any) {
- console.log(msg, " => ",v);
- };
- }
- })();
- const logl = (function() {
- return function(msg: string) {
- return function(v: any) {
- console.log(msg, " => ", util.inspect(v, true, 10, true));
- };
- }
- })();
- const proLog = (function() {
- return function(msg: string) {
- return function(v: any) {
- v.then(log(msg));
- }
- }
- }
- )();
- export {log, proLog, logl}
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement