1.1.0 • Published 7 years ago

speedtest v1.1.0

Weekly downloads
137
License
MIT
Repository
github
Last release
7 years ago

Speed Test

An embeddable speed test powered by SamKnows.

Installation

$ npm install --save speedtest

Usage

var initSpeedTest = require('speedtest');

var speedTest = initSpeedTest({
  el: '#speedtest',
  width: 800,
  height: 370
});

The speed test will adjust to fit in the space given to it - even small ones. If a width and height are not specified in the options, it will attempt to use the width and height of the specified element.

There are a few other options, too:

  • primary: The colour of the needle.
  • secondary: The colour of the button and gauge.
  • lang: Hard code a different language. Generally not needed - defaults to browser language.

The speed test emits an event when a speed test is complete, containing data about the test:

speedTest.on('complete', function (results) {
  console.log(results);
});

License

Released under the MIT license.

1.1.0

7 years ago

1.0.0

7 years ago

0.1.0

10 years ago