UNPKG

kulfon

Version:

Kulfon is a modern static site generator written in JavaScript.

31 lines (23 loc) 637 B
const axios = require('axios'); function print(text) { process.stdout.write(text); } function println(text) { process.stdout.write(text + '\n'); } function profile(func, funcName) { return val => { print('Compiling ... '); const start = new Date(); const returnVal = func(val); const end = new Date(); let duration = end.getTime() - start.getTime(); println(`${funcName} took ${duration} ms to execute`); return returnVal; }; } async function main() {} main(); //var profiledMax = profile(Math.sqrt, 'Math.max'); //const r = profiledMax(835935984950392294958293588294958393); //console.log(r);