diff --git a/README.md b/README.md
index b3e5cb87..f9343d5f 100644
--- a/README.md
+++ b/README.md
@@ -19,14 +19,9 @@ A [robust](https://mathiasbynens.be/notes/javascript-benchmarking "Bulletproof J
## Installation
-Benchmark.js’ only hard dependency is [lodash](https://lodash.com/).
-Include [platform.js](https://mths.be/platform) to populate [Benchmark.platform](https://benchmarkjs.com/docs#platform).
-
In a browser:
```html
-
-
```
@@ -35,9 +30,7 @@ In an AMD loader:
```js
require({
'paths': {
- 'benchmark': 'path/to/benchmark',
- 'lodash': 'path/to/lodash',
- 'platform': 'path/to/platform'
+ 'benchmark': 'path/to/benchmark'
}
},
['benchmark'], function(Benchmark) {/*…*/});
diff --git a/benchmark.js b/benchmark.js
index 8861707f..7e65655f 100644
--- a/benchmark.js
+++ b/benchmark.js
@@ -50,7 +50,7 @@
var contextProps = [
'Array', 'Date', 'Function', 'Math', 'Object', 'RegExp', 'String',
'clearTimeout', 'chrome', 'chromium', 'document', 'navigator',
- 'platform', 'process', 'runtime', 'setTimeout'
+ 'process', 'runtime', 'setTimeout'
];
/** Used to avoid hz of Infinity. */
@@ -875,16 +875,9 @@
try {
var result;
if (freeExports && freeRequire) {
- switch (id) {
- case 'platform':
- result = require('platform');
- break;
- default:
- /** Used to avoid inclusion in Browserified bundles. */
- // eg: microtime
- result = freeRequire(id);
- break;
- }
+ /** Used to avoid inclusion in Browserified bundles. */
+ // eg: microtime
+ result = freeRequire(id);
}
} catch (e) { }
return result || null;
@@ -2578,28 +2571,6 @@
'onStart': undefined
},
- /**
- * Platform object with properties describing things like browser name,
- * version, and operating system. See [`platform.js`](https://mths.be/platform).
- *
- * @static
- * @memberOf Benchmark
- * @type Object
- */
- 'platform': context.platform || req('platform') || ({
- 'description': context.navigator && context.navigator.userAgent || null,
- 'layout': null,
- 'product': null,
- 'name': null,
- 'manufacturer': null,
- 'os': null,
- 'prerelease': null,
- 'version': null,
- 'toString': function () {
- return this.description || '';
- }
- }),
-
/**
* The semantic version number.
*
@@ -3111,10 +3082,8 @@
// Some AMD build optimizers, like r.js, check for condition patterns like the following:
if (typeof define == 'function' && typeof define.amd == 'object' && define.amd) {
// Define as an anonymous module so, through path mapping, it can be aliased.
- define(['platform'], function (platform) {
- return runInContext({
- 'platform': platform
- });
+ define('benchmark', function () {
+ return runInContext();
});
}
else {
diff --git a/doc/README.md b/doc/README.md
index aba356e0..fbe98544 100644
--- a/doc/README.md
+++ b/doc/README.md
@@ -69,7 +69,6 @@
* `Benchmark.options.onError`
* `Benchmark.options.onReset`
* `Benchmark.options.onStart`
-* `Benchmark.platform`
* `Benchmark.support`
* `Benchmark.support.browser`
* `Benchmark.version`
@@ -117,8 +116,8 @@
The Benchmark constructor.
-Note: The Benchmark constructor exposes a handful of lodash methods to
-make working with arrays, collections, and objects easier. The lodash
+Note: The Benchmark constructor exposes a handful of lodash-like methods to
+make working with arrays, collections, and objects easier. The lodash-like
methods are:
[`each/forEach`](https://lodash.com/docs#forEach), [`forOwn`](https://lodash.com/docs#forOwn),
[`has`](https://lodash.com/docs#has), [`indexOf`](https://lodash.com/docs#indexOf),
@@ -1132,18 +1131,6 @@ An event listener called when the benchmark starts running.
-
Benchmark.platform
Benchmark.support