New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

probe.gl

Package Overview
Dependencies
Maintainers
1
Versions
91
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

probe.gl - npm Package Compare versions

Comparing version 0.0.1 to 0.0.2

dist-es6/utils/log-to-dom.js

5

CHANGELOG.md
CHANGELOG
v0.0.2
- Async benchmarking, improved DOM logging
v0.0.1

@@ -7,2 +10,2 @@ - `Bench` and `Log` classes added.

v0.0.0
- probe.gl is now open source. We'll keep it in 0.x version for a while until the API is stable.
- probe.gl is now open source. We'll keep it in 0.x version for a while until the API is stable.

105

dist-es6/bench.js

@@ -15,2 +15,4 @@ var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();

var _ref = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
_ref$timeouts = _ref.timeouts,
timeouts = _ref$timeouts === undefined ? true : _ref$timeouts,
_ref$log = _ref.log,

@@ -22,3 +24,4 @@ log = _ref$log === undefined ? console.log.bind(console) : _ref$log;

this.log = log;
this.timer = null;
this.timeouts = timeouts;
this.tests = {};
this.results = {};

@@ -38,3 +41,31 @@ autobind(this);

value: function run() {
return this;
if (this.timeouts) {
return this._runAsyncTests();
}
var _iteratorNormalCompletion = true;
var _didIteratorError = false;
var _iteratorError = undefined;
try {
for (var _iterator = this.tests[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) {
var bench = _step.value;
bench();
}
} catch (err) {
_didIteratorError = true;
_iteratorError = err;
} finally {
try {
if (!_iteratorNormalCompletion && _iterator.return) {
_iterator.return();
}
} finally {
if (_didIteratorError) {
throw _iteratorError;
}
}
}
return Promise.resolve(true);
}

@@ -44,5 +75,10 @@ }, {

value: function group(id) {
this.log('');
this.log('### ' + id);
return this;
var _this = this;
var bench = function bench() {
_this.log('');
_this.log('' + id);
};
return this._addTest(id, bench);
}

@@ -52,2 +88,4 @@ }, {

value: function add(id, func1, func2, opts) {
var _this2 = this;
var _ref2 = {},

@@ -67,14 +105,55 @@ _ref2$context = _ref2.context,

var testArgs = initFunc && initFunc();
var bench = function bench() {
var testArgs = initFunc && initFunc();
var _runTest = runTest({ testFunc: testFunc, testArgs: testArgs, context: context }),
time = _runTest.time,
iterationsPerSecond = _runTest.iterationsPerSecond;
var _runTest = runTest({ testFunc: testFunc, testArgs: testArgs, context: context }),
time = _runTest.time,
iterationsPerSecond = _runTest.iterationsPerSecond;
this.log(id + ': ' + formatSI(iterationsPerSecond) + ' iterations/s (' + time.toFixed(2) + 's)');
_this2.log('\u251C\u2500 ' + id + ': ' + formatSI(iterationsPerSecond) + ' iterations/s (' + time.toFixed(2) + 's)');
_this2.results[id] = iterationsPerSecond;
};
this.results[id] = iterationsPerSecond;
return this._addTest(id, bench);
}
}, {
key: '_addTest',
value: function _addTest(id, bench) {
assert(!this.tests[id], 'tests need unique id strings');
this.tests[id] = bench;
return this;
}
}, {
key: '_runAsyncTests',
value: function _runAsyncTests() {
var _this3 = this;
var promise = Promise.resolve(true);
var _loop = function _loop(id) {
var bench = _this3.tests[id];
promise = promise.then(function () {
return _this3._runAsyncTest(bench);
});
};
for (var id in this.tests) {
_loop(id);
}
return promise;
}
}, {
key: '_runAsyncTest',
value: function _runAsyncTest(bench) {
return new Promise(function (resolve) {
/* global setTimeout */
setTimeout(function () {
try {
bench();
} finally {
resolve(true);
}
}, 100); // small timeout to let system cool...
});
}
}]);

@@ -127,2 +206,2 @@

}
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi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DogaXRlcmF0aW9ucyAqIDEwMDAgLyBlbGFwc2VkTWlsbGlzXG4gIH07XG59XG4iXX0=

@@ -9,2 +9,8 @@ export { default as Log } from './log';

global.Probe = Probe;
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uL3NyYy9pbmRleC5qcyJdLCJuYW1lcyI6WyJkZWZhdWx0IiwiTG9nIiwiUHJvYmUiLCJCZW5jaCIsImdsb2JhbCJdLCJtYXBwaW5ncyI6IkFBQUEsU0FBUUEsV0FBV0MsR0FBbkIsUUFBNkIsT0FBN0I7QUFDQSxTQUFRRCxXQUFXRSxLQUFuQixRQUErQixTQUEvQjtBQUNBLFNBQVFGLFdBQVdHLEtBQW5CLFFBQStCLFNBQS9COztBQUVBO0FBQ0EsT0FBT0QsS0FBUCxNQUFrQixTQUFsQjtBQUNBLFNBQVFFLE1BQVIsUUFBcUIsaUJBQXJCO0FBQ0FBLE9BQU9GLEtBQVAsR0FBZUEsS0FBZiIsImZpbGUiOiJpbmRleC5qcyIsInNvdXJjZXNDb250ZW50IjpbImV4cG9ydCB7ZGVmYXVsdCBhcyBMb2d9IGZyb20gJy4vbG9nJztcbmV4cG9ydCB7ZGVmYXVsdCBhcyBQcm9iZX0gZnJvbSAnLi9wcm9iZSc7XG5leHBvcnQge2RlZmF1bHQgYXMgQmVuY2h9IGZyb20gJy4vYmVuY2gnO1xuXG4vLyBNYWtlIFByb2JlIGF2YWlsYWJsZSBhcyBnbG9iYWwgdmFyaWFibGUgZm9yIGRlYnVnZ2luZyBwdXJwb3Nlc1xuaW1wb3J0IFByb2JlIGZyb20gJy4vcHJvYmUnO1xuaW1wb3J0IHtnbG9iYWx9IGZyb20gJy4vdXRpbHMvZ2xvYmFscyc7XG5nbG9iYWwuUHJvYmUgPSBQcm9iZTtcbiJdfQ==
// experimental exports
import { logToDOM } from './utils/log-to-dom';
export var experimental = {
logToDOM: logToDOM
};
//# sourceMappingURL=data:application/json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nLi91dGlscy9sb2ctdG8tZG9tJztcbmV4cG9ydCBjb25zdCBleHBlcmltZW50YWwgPSB7XG4gIGxvZ1RvRE9NXG59O1xuIl19

@@ -1,3 +0,1 @@

var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; };
// Copyright (c) 2017 Uber Technologies, Inc.

@@ -26,9 +24,11 @@ //

/* global navigator, window, process */
import { isBrowser, window } from '../globals';
export default isBrowser;
export var isMobile = typeof window.orientation !== 'undefined';
// Simple browser detection
function detectBrowser() {
/* global process */
var isNode = (typeof process === 'undefined' ? 'undefined' : _typeof(process)) === 'object' && String(process) === '[object process]' && !process.browser;
if (isNode) {
if (!isBrowser) {
return 'Node';

@@ -38,5 +38,5 @@ }

/* global navigator */
var _navigator = navigator,
userAgent = _navigator.userAgent;
var navigator_ = typeof navigator !== 'undefined' ? navigator : {};
var userAgent = navigator_.userAgent || '';
var appVersion = navigator_.appVersion || '';
if (userAgent.indexOf('Chrome') > -1) {

@@ -52,3 +52,3 @@ return 'Chrome';

if (userAgent.indexOf('MSIE') > -1) {
return navigator.appVersion.indexOf('Trident') > -1 ? 'IE11' : 'Edge';
return appVersion.indexOf('Trident') > -1 ? 'IE11' : 'Edge';
}

@@ -59,8 +59,2 @@ return 'Unknown';

export var BROWSER = detectBrowser();
export var isBrowser = BROWSER !== 'Node';
export var isMobile = typeof window !== 'undefined' && typeof window.orientation !== 'undefined';
export default isBrowser;
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy91dGlscy9icm93c2VyLmpzIl0sIm5hbWVzIjpbImRldGVjdEJyb3dzZXIiLCJpc05vZGUiLCJwcm9jZXNzIiwiU3RyaW5nIiwiYnJvd3NlciIsIm5hdmlnYXRvciIsInVzZXJBZ2VudCIsImluZGV4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JykgPiAtMSA/ICdJRTExJyA6ICdFZGdlJztcbiAgfVxuICByZXR1cm4gJ1Vua25vd24nO1xufVxuXG5leHBvcnQgY29uc3QgQlJPV1NFUiA9IGRldGVjdEJyb3dzZXIoKTtcbiJdfQ==

@@ -16,5 +16,3 @@ var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; };

var isNode = !isBrowser;
export { window_ as window, document_ as document, global_ as global, process_ as process, isBrowser, isNode };
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy91dGlscy9nbG9iYWxzLmpzIl0sIm5hbWVzIjpbIndpbmRvd18iLCJ3aW5kb3ciLCJnbG9iYWwiLCJkb2N1bWVudF8iLCJkb2N1bWVudCIsImdsb2JhbF8iLCJwcm9jZXNzXyIsInByb2Nlc3MiLCJpc0Jyb3dzZXIiLCJTdHJpbmciLCJicm93c2VyIiwiaXNOb2RlIl0sIm1hcHBpbmdzIjoiOztBQUFBOztBQUVBO0FBQ0EsSUFBTUEsVUFBVSxPQUFPQyxNQUFQLEtBQWtCLFdBQWxCLEdBQWdDQSxNQUFoQyxHQUF5Q0MsTUFBekQ7QUFDQSxJQUFNQyxZQUFZLE9BQU9DLFFBQVAsS0FBb0IsV0FBcEIsR0FBa0NBLFFBQWxDLEdBQTZDLEVBQS9EOztBQUVBO0FBQ0EsSUFBTUMsVUFBVSxPQUFPSCxNQUFQLEtBQWtCLFdBQWxCLEdBQWdDQSxNQUFoQyxHQUF5Q0QsTUFBekQ7QUFDQSxJQUFNSyxXQUFXLFFBQU9DLE9BQVAseUNBQU9BLE9BQVAsT0FBbUIsUUFBbkIsR0FBOEJBLE9BQTlCLEdBQXdDLEVBQXpEOztBQUVBO0FBQ0EsSUFBTUMsWUFDSixRQUFPRCxPQUFQLH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1xuXG5jb25zdCBpc05vZGUgPSAhaXNCcm93c2VyO1xuXG5leHBvcnQge1xuICB3aW5kb3dfIGFzIHdpbmRvdyxcbiAgZG9jdW1lbnRfIGFzIGRvY3VtZW50LFxuICBnbG9iYWxfIGFzIGdsb2JhbCxcbiAgcHJvY2Vzc18gYXMgcHJvY2VzcyxcbiAgaXNCcm93c2VyLFxuICBpc05vZGVcbn07XG4iXX0=
export { window_ as window, document_ as document, global_ as global, process_ as process, isBrowser };
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy91dGlscy9nbG9iYWxzLmpzIl0sIm5hbWVzIjpbIndpbmRvd18iLCJ3aW5kb3ciLCJnbG9iYWwiLCJkb2N1bWVudF8iLCJkb2N1bWVudCIsImdsb2JhbF8iLCJwcm9jZXNzXyIsInByb2Nlc3MiLCJpc0Jyb3dzZXIiLCJTdHJpbmciLCJicm93c2VyIl0sIm1hcHBpbmdzIjoiOztBQUFBOztBQUVBO0FBQ0EsSUFBTUEsVUFBVSxPQUFPQyxNQUFQLEtBQWtCLFdBQWxCLEdBQWdDQSxNQUFoQyxHQUF5Q0MsTUFBekQ7QUFDQSxJQUFNQyxZQUFZLE9BQU9DLFFBQVAsS0FBb0IsV0FBcEIsR0FBa0NBLFFBQWxDLEdBQTZDLEVBQS9EOztBQUVBO0FBQ0EsSUFBTUMsVUFBVSxPQUFPSCxNQUFQLEtBQWtCLFdBQWxCLEdBQWdDQSxNQUFoQyxHQUF5Q0QsTUFBekQ7QUFDQSxJQUFNSyxXQUFXLFFBQU9DLE9BQVAseUNBQU9BLE9BQVAsT0FBbUIsUUFBbkIsR0FBOEJBLE9BQTlCLEdBQXdDLEVBQXpEOztBQUVBO0FBQ0EsSUFBTUMsWUFDSixRQUFPRCxPQUFQLHlDQUFPQSxPQUFQLE9BQW1CLFFBQW5CLElBQ0FFLE9BQU9GLE9BQVAsTUFBb0Isa0JBRHBCLElBR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NzXyBhcyBwcm9jZXNzLFxuICBpc0Jyb3dzZXJcbn07XG4iXX0=

@@ -28,2 +28,4 @@ 'use strict';

var _ref = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
_ref$timeouts = _ref.timeouts,
timeouts = _ref$timeouts === undefined ? true : _ref$timeouts,
_ref$log = _ref.log,

@@ -35,3 +37,4 @@ log = _ref$log === undefined ? console.log.bind(console) : _ref$log;

this.log = log;
this.timer = null;
this.timeouts = timeouts;
this.tests = {};
this.results = {};

@@ -51,3 +54,31 @@ (0, _autobind.autobind)(this);

value: function run() {
return this;
if (this.timeouts) {
return this._runAsyncTests();
}
var _iteratorNormalCompletion = true;
var _didIteratorError = false;
var _iteratorError = undefined;
try {
for (var _iterator = this.tests[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) {
var bench = _step.value;
bench();
}
} catch (err) {
_didIteratorError = true;
_iteratorError = err;
} finally {
try {
if (!_iteratorNormalCompletion && _iterator.return) {
_iterator.return();
}
} finally {
if (_didIteratorError) {
throw _iteratorError;
}
}
}
return Promise.resolve(true);
}

@@ -57,5 +88,10 @@ }, {

value: function group(id) {
this.log('');
this.log('### ' + id);
return this;
var _this = this;
var bench = function bench() {
_this.log('');
_this.log('' + id);
};
return this._addTest(id, bench);
}

@@ -65,2 +101,4 @@ }, {

value: function add(id, func1, func2, opts) {
var _this2 = this;
var _ref2 = {},

@@ -80,14 +118,55 @@ _ref2$context = _ref2.context,

var testArgs = initFunc && initFunc();
var bench = function bench() {
var testArgs = initFunc && initFunc();
var _runTest = runTest({ testFunc: testFunc, testArgs: testArgs, context: context }),
time = _runTest.time,
iterationsPerSecond = _runTest.iterationsPerSecond;
var _runTest = runTest({ testFunc: testFunc, testArgs: testArgs, context: context }),
time = _runTest.time,
iterationsPerSecond = _runTest.iterationsPerSecond;
this.log(id + ': ' + (0, _formatters.formatSI)(iterationsPerSecond) + ' iterations/s (' + time.toFixed(2) + 's)');
_this2.log('\u251C\u2500 ' + id + ': ' + (0, _formatters.formatSI)(iterationsPerSecond) + ' iterations/s (' + time.toFixed(2) + 's)');
_this2.results[id] = iterationsPerSecond;
};
this.results[id] = iterationsPerSecond;
return this._addTest(id, bench);
}
}, {
key: '_addTest',
value: function _addTest(id, bench) {
(0, _assert2.default)(!this.tests[id], 'tests need unique id strings');
this.tests[id] = bench;
return this;
}
}, {
key: '_runAsyncTests',
value: function _runAsyncTests() {
var _this3 = this;
var promise = Promise.resolve(true);
var _loop = function _loop(id) {
var bench = _this3.tests[id];
promise = promise.then(function () {
return _this3._runAsyncTest(bench);
});
};
for (var id in this.tests) {
_loop(id);
}
return promise;
}
}, {
key: '_runAsyncTest',
value: function _runAsyncTest(bench) {
return new Promise(function (resolve) {
/* global setTimeout */
setTimeout(function () {
try {
bench();
} finally {
resolve(true);
}
}, 100); // small timeout to let system cool...
});
}
}]);

@@ -140,2 +219,2 @@

}
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uL3NyYy9iZW5jaC5qcyJdLCJuYW1lcyI6WyJCZW5jaCIsImxvZyIsImNvbnNvbGUiLCJiaW5kIiwidGltZXIiLCJyZXN1bHRzIiwiT2JqZWN0Iiwic2VhbCIsImlkIiwiZnVuYzEiLCJmdW5jMiIsIm9wdHMiLCJhZGQiLCJjb250ZXh0IiwiaW5pdEZ1bmMiLCJ0ZXN0RnVuYyIsInRlc3RBcmdzIiwicnVuVGVzdCIsInRpbWUiLCJpdGVyYXRpb25zUGVyU2Vjb25kIiwidG9GaXhlZCIsInJ1blRlc3RPbmNlIiwiaXRlcmF0aW9ucyIsImkiLCJjYWxsIiwiZWxhcHNlZE1pbGxpcyIsIkRhdGUiXSwibWFwcGluZ3MiOiI7Ozs7OztxakJBQUE7QUFDQTs7QUFHQTs7O0FBRkE7O0FBQ0E7O0FBRUE7Ozs7Ozs7O0lBRXFCQSxLO0FBQ25CLG1CQUFvRDtBQU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TAwbXNcbiAgd2hpbGUgKGVsYXBzZWRNaWxsaXMgPCAxMDApIHtcbiAgICBpdGVyYXRpb25zICo9IDEwO1xuICAgIGNvbnN0IHRpbWVyID0gbmV3IERhdGUoKTtcbiAgICBydW5UZXN0T25jZSh7dGVzdEZ1bmMsIHRlc3RBcmdzLCBjb250ZXh0LCBpdGVyYXRpb25zfSk7XG4gICAgZWxhcHNlZE1pbGxpcyA9IG5ldyBEYXRlKCkgLSB0aW1lcjtcbiAgfVxuXG4gIHJldHVybiB7XG4gICAgdGltZTogZWxhcHNlZE1pbGxpcyAvIDEwMDAsXG4gICAgaXRlcmF0aW9ucyxcbiAgICBpdGVyYXRpb25zUGVyU2Vjb25kOiBpdGVyYXRpb25zICogMTAwMCAvIGVsYXBzZWRNaWxsaXNcbiAgfTtcbn1cbiJdfQ==

@@ -6,3 +6,3 @@ 'use strict';

});
exports.Bench = exports.Probe = exports.Log = undefined;
exports.experimental = exports.Bench = exports.Probe = exports.Log = undefined;

@@ -40,2 +40,4 @@ var _log = require('./log');

var _logToDom = require('./utils/log-to-dom');
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }

@@ -47,2 +49,7 @@

_globals.global.Probe = _probe2.default;
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uL3NyYy9pbmRleC5qcyJdLCJuYW1lcyI6WyJkZWZhdWx0IiwiUHJvYmUiXSwibWFwcGluZ3MiOiI7Ozs7Ozs7Ozs7Ozt3Q0FBUUEsTzs7Ozs7Ozs7OzBDQUNBQSxPOzs7Ozs7Ozs7MENBQ0FBLE87Ozs7OztBQUlSOzs7O0FBRkE7OztBQUdBLGdCQUFPQyxLQUFQIiwiZmlsZSI6ImluZGV4LmpzIiwic291cmNlc0NvbnRlbnQiOlsiZXhwb3J0IHtkZWZhdWx0IGFzIExvZ30gZnJvbSAnLi9sb2cnO1xuZXhwb3J0IHtkZWZhdWx0IGFzIFByb2JlfSBmcm9tICcuL3Byb2JlJztcbmV4cG9ydCB7ZGVmYXVsdCBhcyBCZW5jaH0gZnJvbSAnLi9iZW5jaCc7XG5cbi8vIE1ha2UgUHJvYmUgYXZhaWxhYmxlIGFzIGdsb2JhbCB2YXJpYWJsZSBmb3IgZGVidWdnaW5nIHB1cnBvc2VzXG5pbXBvcnQgUHJvYmUgZnJvbSAnLi9wcm9iZSc7XG5pbXBvcnQge2dsb2JhbH0gZnJvbSAnLi91dGlscy9nbG9iYWxzJztcbmdsb2JhbC5Qcm9iZSA9IFByb2JlO1xuIl19
// experimental exports
var experimental = exports.experimental = {
logToDOM: _logToDom.logToDOM
};
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uL3NyYy9pbmRleC5qcyJdLCJuYW1lcyI6WyJkZWZhdWx0IiwiUHJvYmUiLCJleHBlcmltZW50YWwiLCJsb2dUb0RPTSJdLCJtYXBwaW5ncyI6Ijs7Ozs7Ozs7Ozs7O3dDQUFRQSxPOzs7Ozs7Ozs7MENBQ0FBLE87Ozs7Ozs7OzswQ0FDQUEsTzs7Ozs7O0FBSVI7O0FBSUE7Ozs7QUFOQTs7O0FBR0EsZ0JBQU9DLEtBQVA7O0FBRUE7QUFFTyxJQUFNQyxzQ0FBZTtBQUMxQkM7QUFEMEIsQ0FBckIiLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VzQ29udGVudCI6WyJleHBvcnQge2RlZmF1bHQgYXMgTG9nfSBmcm9tICcuL2xvZyc7XG5leHBvcnQge2RlZmF1bHQgYXMgUHJvYmV9IGZyb20gJy4vcHJvYmUnO1xuZXhwb3J0IHtkZWZhdWx0IGFzIEJlbmNofSBmcm9tICcuL2JlbmNoJztcblxuLy8gTWFrZSBQcm9iZSBhdmFpbGFibGUgYXMgZ2xvYmFsIHZhcmlhYmxlIGZvciBkZWJ1Z2dpbmcgcHVycG9zZXNcbmltcG9ydCBQcm9iZSBmcm9tICcuL3Byb2JlJztcbmltcG9ydCB7Z2xvYmFsfSBmcm9tICcuL3V0aWxzL2dsb2JhbHMnO1xuZ2xvYmFsLlByb2JlID0gUHJvYmU7XG5cbi8vIGV4cGVyaW1lbnRhbCBleHBvcnRzXG5pbXBvcnQge2xvZ1RvRE9NfSBmcm9tICcuL3V0aWxzL2xvZy10by1kb20nO1xuZXhwb3J0IGNvbnN0IGV4cGVyaW1lbnRhbCA9IHtcbiAgbG9nVG9ET01cbn07XG4iXX0=

@@ -6,6 +6,7 @@ 'use strict';

});
exports.BROWSER = exports.isMobile = undefined;
var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; };
var _globals = require('../globals');
// Copyright (c) 2017 Uber Technologies, Inc.
exports.default = _globals.isBrowser; // Copyright (c) 2017 Uber Technologies, Inc.
//

@@ -33,9 +34,7 @@ // Permission is hereby granted, free of charge, to any person obtaining a copy

/* global navigator, window, process */
var isMobile = exports.isMobile = typeof _globals.window.orientation !== 'undefined';
// Simple browser detection
function detectBrowser() {
/* global process */
var isNode = (typeof process === 'undefined' ? 'undefined' : _typeof(process)) === 'object' && String(process) === '[object process]' && !process.browser;
if (isNode) {
if (!_globals.isBrowser) {
return 'Node';

@@ -45,5 +44,5 @@ }

/* global navigator */
var _navigator = navigator,
userAgent = _navigator.userAgent;
var navigator_ = typeof navigator !== 'undefined' ? navigator : {};
var userAgent = navigator_.userAgent || '';
var appVersion = navigator_.appVersion || '';
if (userAgent.indexOf('Chrome') > -1) {

@@ -59,3 +58,3 @@ return 'Chrome';

if (userAgent.indexOf('MSIE') > -1) {
return navigator.appVersion.indexOf('Trident') > -1 ? 'IE11' : 'Edge';
return appVersion.indexOf('Trident') > -1 ? 'IE11' : 'Edge';
}

@@ -66,8 +65,2 @@ return 'Unknown';

var BROWSER = exports.BROWSER = detectBrowser();
var isBrowser = exports.isBrowser = BROWSER !== 'Node';
var isMobile = exports.isMobile = typeof window !== 'undefined' && typeof window.orientation !== 'undefined';
exports.default = isBrowser;
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy91dGlscy9icm93c2VyLmpzIl0sIm5hbWVzIjpbImRldGVjdEJyb3dzZXIiLCJpc05vZGUiLCJwcm9jZXNzIiwiU3RyaW5nIiwiYnJvd3NlciIsIm5hdmlnYXRvciIsInVzZXJBZ2VudCIsImluZGV4T2YiLCJhcHBWZXJzaW9uIiwiQlJPV1NFUiIsImlzQnJvd3NlciIsImlzTW9iaWxlIiwid2luZG93Iiwib3JpZW50YXRpb24iXSwibWFwcGluZ3MiOiI7Ozs7Ozs7O0FBQUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7O0FBRUE7QUFDQTs7QUFFQTs7QUFFQTtBQUNBLFNBQVNBLGFBQVQsR0FBeUI7QUFDdkI7QUFDQSxNQUFNQyxTQUNKLFFBQU9DLE9BQVAseUNBQU9BLE9BQVAsT0FBbUIsUUFBbkIsSUFDQUMsT0FBT0QsT0FBUCxNQUFvQixrQkFEcEIsSUFFQSxDQUFDQSxRQUFRRSxPQUhYO0FBSUEsTUFBSUgsTUFBSixFQUFZO0FBQ1YsV0FBTyxNQUFQO0FBQ0Q7O0FBRUQ7QUFWdUIsbUJBV0hJLFNBWEc7QUFBQSxNQVdoQkMsU0FYZ0IsY0FXaEJBLFNBWGdCOztBQVl2QixNQUFJQSxVQUFVQyxPQUFWLENBQWtCLFFBQWxCLElBQThCLENBQUMsQ0FBbkMsRUFBc0M7QUFDcEMsV0FBTyxRQUFQO0FBQ0Q7QUFDRCxNQUFJRCxVQUFVQyxPQUFWLENBQWtCLF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ICh1c2VyQWdlbnQuaW5kZXhPZignU2FmYXJpJykgPiAtMSkge1xuICAgIHJldHVybiAnU2FmYXJpJztcbiAgfVxuICBpZiAodXNlckFnZW50LmluZGV4T2YoJ01TSUUnKSA+IC0xKSB7XG4gICAgcmV0dXJuIGFwcFZlcnNpb24uaW5kZXhPZignVHJpZGVudCcpID4gLTEgPyAnSUUxMScgOiAnRWRnZSc7XG4gIH1cbiAgcmV0dXJuICdVbmtub3duJztcbn1cblxuZXhwb3J0IGNvbnN0IEJST1dTRVIgPSBkZXRlY3RCcm93c2VyKCk7XG4iXX0=

@@ -22,4 +22,2 @@ 'use strict';

var isNode = !isBrowser;
exports.window = window_;

@@ -30,3 +28,2 @@ exports.document = document_;

exports.isBrowser = isBrowser;
exports.isNode = isNode;
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy91dGlscy9nbG9iYWxzLmpzIl0sIm5hbWVzIjpbIndpbmRvd18iLCJ3aW5kb3ciLCJnbG9iYWwiLCJkb2N1bWVudF8iLCJkb2N1bWVudCIsImdsb2JhbF8iLCJwcm9jZXNzXyIsInByb2Nlc3MiLCJpc0Jyb3dzZXIiLCJTdHJpbmciLCJicm93c2VyIiwiaXNOb2RlIl0sIm1hcHBpbmdzIjoiOzs7Ozs7OztBQUFBOztBQUVBO0FBQ0EsSUFBTUEsVUFBVSxPQUFPQyxNQUFQLEtBQWtCLFdBQWxCLEdBQWdDQSxNQUFoQyxHQUF5Q0MsTUFBekQ7QUFDQSxJQUFNQyxZQUFZLE9BQU9DLFFBQVAsS0FBb0IsV0FBcEIsR0FBa0NBLFFBQWxDLEdBQTZDLEVBQS9EOztBQUVBO0FBQ0EsSUFBTUMsVUFBVSxPQUFPSCxNQUFQLEtBQWtCLFdBQWxCLEdBQWdDQSxNQUFoQyxHQUF5Q0QsTUFBekQ7QUFDQSxJQUFNSyxXQUFXLFFBQU9DLE9BQVAseUNBQU9B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RvY3VtZW50XyBhcyBkb2N1bWVudCxcbiAgZ2xvYmFsXyBhcyBnbG9iYWwsXG4gIHByb2Nlc3NfIGFzIHByb2Nlc3MsXG4gIGlzQnJvd3NlclxufTtcbiJdfQ==

@@ -5,3 +5,3 @@ {

"license": "MIT",
"version": "0.0.1",
"version": "0.0.2",
"keywords": [

@@ -56,3 +56,2 @@ "javascript",

"babel-preset-es2015": "^6.4.3",
"benchmark": "^2.1.3",
"coveralls": "^2.13.0",

@@ -65,3 +64,2 @@ "eslint": "^3.0.0",

"pre-commit": "^1.2.2",
"raw-loader": "^0.5.1",
"reify": "^0.4.4",

@@ -72,3 +70,2 @@ "source-map-loader": "^0.2.1",

"tape-catch": "^1.0.4",
"transform-loader": "^0.2.3",
"uglify-js": "^2.6.1",

@@ -75,0 +72,0 @@ "webpack": "^2.4.0",

@@ -9,5 +9,9 @@ /* eslint-disable no-console */

export default class Bench {
constructor({log = console.log.bind(console)} = {}) {
constructor({
timeouts = true,
log = console.log.bind(console)
} = {}) {
this.log = log;
this.timer = null;
this.timeouts = timeouts;
this.tests = {};
this.results = {};

@@ -24,9 +28,18 @@ autobind(this);

run() {
return this;
if (this.timeouts) {
return this._runAsyncTests();
}
for (const bench of this.tests) {
bench();
}
return Promise.resolve(true);
}
group(id) {
this.log('');
this.log(`### ${id}`);
return this;
const bench = () => {
this.log('');
this.log(`${id}`);
};
return this._addTest(id, bench);
}

@@ -46,10 +59,39 @@

const testArgs = initFunc && initFunc();
const {time, iterationsPerSecond} = runTest({testFunc, testArgs, context});
this.log(`${id}: ${formatSI(iterationsPerSecond)} iterations/s (${time.toFixed(2)}s)`);
const bench = () => {
const testArgs = initFunc && initFunc();
const {time, iterationsPerSecond} = runTest({testFunc, testArgs, context});
this.log(`├─ ${id}: ${formatSI(iterationsPerSecond)} iterations/s (${time.toFixed(2)}s)`);
this.results[id] = iterationsPerSecond;
};
this.results[id] = iterationsPerSecond;
return this._addTest(id, bench);
}
_addTest(id, bench) {
assert(!this.tests[id], 'tests need unique id strings');
this.tests[id] = bench;
return this;
}
_runAsyncTests() {
let promise = Promise.resolve(true);
for (const id in this.tests) {
const bench = this.tests[id];
promise = promise.then(() => this._runAsyncTest(bench));
}
return promise;
}
_runAsyncTest(bench) {
return new Promise(resolve => {
/* global setTimeout */
setTimeout(() => {
try {
bench();
} finally {
resolve(true);
}
}, 100); // small timeout to let system cool...
});
}
}

@@ -56,0 +98,0 @@

@@ -9,1 +9,7 @@ export {default as Log} from './log';

global.Probe = Probe;
// experimental exports
import {logToDOM} from './utils/log-to-dom';
export const experimental = {
logToDOM
};

@@ -24,12 +24,11 @@ // Copyright (c) 2017 Uber Technologies, Inc.

/* global navigator, window, process */
import {isBrowser, window} from '../globals';
export default isBrowser;
export const isMobile = typeof window.orientation !== 'undefined';
// Simple browser detection
function detectBrowser() {
/* global process */
const isNode =
typeof process === 'object' &&
String(process) === '[object process]' &&
!process.browser;
if (isNode) {
if (!isBrowser) {
return 'Node';

@@ -39,3 +38,5 @@ }

/* global navigator */
const {userAgent} = navigator;
const navigator_ = typeof navigator !== 'undefined' ? navigator : {};
const userAgent = navigator_.userAgent || '';
const appVersion = navigator_.appVersion || '';
if (userAgent.indexOf('Chrome') > -1) {

@@ -51,3 +52,3 @@ return 'Chrome';

if (userAgent.indexOf('MSIE') > -1) {
return navigator.appVersion.indexOf('Trident') > -1 ? 'IE11' : 'Edge';
return appVersion.indexOf('Trident') > -1 ? 'IE11' : 'Edge';
}

@@ -58,9 +59,1 @@ return 'Unknown';

export const BROWSER = detectBrowser();
export const isBrowser = BROWSER !== 'Node';
export const isMobile =
typeof window !== 'undefined' &&
typeof window.orientation !== 'undefined';
export default isBrowser;

@@ -17,4 +17,2 @@ /* global process, global, window, document */

const isNode = !isBrowser;
export {

@@ -25,4 +23,3 @@ window_ as window,

process_ as process,
isBrowser,
isNode
isBrowser
};
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