This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| function performanceTest(testFunction, iterations = 1000) { | |
| var sum = 0; | |
| var start = performance.now(); | |
| for (var i = 0; i < iterations; i++) { | |
| testFunction(); | |
| } | |
| var time=performance.now() - start; | |
| console.log(time); | |
| return time; | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| module.exports = function(grunt) { | |
| // Groc task to generate documentation. | |
| grunt.registerTask('groc', 'groc processor.', function() { | |
| var groc = require('groc'); | |
| var done = this.async(); | |
| var opts = grunt.config.get('groc'); | |
| var clis = []; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| function DisplayMyName() { | |
| var myName = arguments.callee.toString(); | |
| myName = myName.substr('function '.length); | |
| myName = myName.substr(0, myName.indexOf('(')); | |
| alert(myName); | |
| } |