Socket
Socket
Sign inDemoInstall

benchmarked

Package Overview
Dependencies
Maintainers
1
Versions
17
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

benchmarked - npm Package Compare versions

Comparing version 0.1.1 to 0.1.2

19

index.js

@@ -8,2 +8,3 @@ 'use strict';

var read = require('file-reader');
var hasValue = require('has-value');
var forOwn = require('for-own');

@@ -104,3 +105,3 @@ var Benchmark = require('benchmark');

onStart: function () {
console.log(chalk.gray('\n#%s: %s'), ++i, name, lead);
console.log(chalk.gray('#%s: %s'), ++i, name, lead);
},

@@ -113,4 +114,2 @@ onComplete: function () {

forOwn(add, function (fn, fnName) {
benchmark

@@ -124,6 +123,12 @@ .add(fnName, {

onComplete: function () {
if (options.expected) {
console.log(' expected: [' + chalk.bold(fn.apply(null, args)) + ']');
if (options.result) {
var res = fn.apply(null, args);
var msg = chalk.bold('%j');
if (!hasValue(res)) {
msg = chalk.red('%j');
}
console.log(chalk.gray(' result: ') + msg, res);
} else {
cursor.write('\n');
}
cursor.write('\n');
},

@@ -137,3 +142,3 @@ fn: function () {

if (options.sample) {
console.log('> ' + fnName + ':\n %j', fn(options.sample));
console.log('> ' + fnName + ':\n %j', fn.apply(null, options.sample));
}

@@ -140,0 +145,0 @@ });

{
"name": "benchmarked",
"description": "Easily generate benchmarks from a glob of files.",
"version": "0.1.1",
"version": "0.1.2",
"homepage": "https://github.com/jonschlinkert/benchmarked",

@@ -42,4 +42,5 @@ "author": {

"file-reader": "^0.1.0",
"for-own": "^0.1.2"
"for-own": "^0.1.2",
"has-value": "^0.1.0"
}
}

@@ -105,2 +105,2 @@ # benchmarked [![NPM version](https://badge.fury.io/js/benchmarked.svg)](http://badge.fury.io/js/benchmarked)

_This file was generated by [verb-cli](https://github.com/assemble/verb-cli) on October 17, 2014._
_This file was generated by [verb-cli](https://github.com/assemble/verb-cli) on October 20, 2014._
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc