diff --git a/README.md b/README.md index 4b8234d..5e596a2 100644 --- a/README.md +++ b/README.md @@ -13,13 +13,12 @@ A browser detector. Because sometimes, there is no other way, and not even good The library is made to help to detect what browser your user has and gives you a convenient API to filter the users somehow depending on their browsers. -**Changes of version 2.0** +### ⚠️ Version 2.0 breaking changes ⚠️ -The version 2.0 has drastically changed API. All available methods can be found in the `docs` folder from now on and on a webpage soon. +Version 2.0 has drastically changed the API. All available methods are on the [docs page](https://lancedikson.github.io/bowser/docs). _For legacy code, check out the [1.x](https://github.com/lancedikson/bowser/tree/v1.x) branch and install it through `npm install bowser@1.9.4`._ - # Use cases First of all, require the library. This is a UMD Module, so it will work for AMD, TypeScript, ES6, and CommonJS module systems. diff --git a/docs/Bowser.html b/docs/Bowser.html index 601880c..21c58c5 100644 --- a/docs/Bowser.html +++ b/docs/Bowser.html @@ -26,7 +26,7 @@
@@ -572,7 +572,7 @@ const result = parser.getResult();
diff --git a/docs/Parser.html b/docs/Parser.html index a82d141..5921b4b 100644 --- a/docs/Parser.html +++ b/docs/Parser.html @@ -26,7 +26,7 @@
@@ -687,6 +687,112 @@ like Parser#parseBrowser or getEngineName() → {String} + + + + + + +
+ + +
Source:
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + +
+

Get engines's name

+
+ + + + + + + + + + + + + + + + + + + + + + + +
Returns:
+ + +
+

Engines's name or an empty string

+
+ + + +
+
+ Type +
+
+ +String + + +
+
+ + + + + + + + +

getOS() → {Object}

@@ -1356,7 +1462,7 @@ like Parser#parseBrowser or Source:
@@ -1564,7 +1670,7 @@ like Parser#parseBrowser or Source:
@@ -1716,7 +1822,7 @@ the OS called "anything" or the platform called "anything"Source:
@@ -1902,7 +2008,7 @@ the OS called "anything" or the platform called "anything"Source:
@@ -2211,7 +2317,7 @@ the OS called "anything" or the platform called "anything"Source:
@@ -2382,7 +2488,7 @@ Returns undefined when the browser is no described in the checkTree
Source:
@@ -2687,7 +2793,7 @@ Returns undefined when the browser is no described in the checkTree
- Documentation generated by JSDoc 3.5.5 on Sat Jan 19 2019 15:43:45 GMT+0200 (EET) using the docdash theme. + Documentation generated by JSDoc 3.5.5 on Wed Feb 13 2019 19:42:10 GMT-0800 (Pacific Standard Time) using the docdash theme.
diff --git a/docs/bowser.js.html b/docs/bowser.js.html index 36c757e..b3a4f3f 100644 --- a/docs/bowser.js.html +++ b/docs/bowser.js.html @@ -26,7 +26,7 @@
@@ -105,7 +105,7 @@ export default Bowser;
- Documentation generated by JSDoc 3.5.5 on Sat Jan 19 2019 15:43:45 GMT+0200 (EET) using the docdash theme. + Documentation generated by JSDoc 3.5.5 on Wed Feb 13 2019 19:42:10 GMT-0800 (Pacific Standard Time) using the docdash theme.
diff --git a/docs/global.html b/docs/global.html index 98d163a..8a2650f 100644 --- a/docs/global.html +++ b/docs/global.html @@ -26,7 +26,7 @@
@@ -766,7 +766,7 @@ like "iPhone" or "Kindle Fire HD 7"
- Documentation generated by JSDoc 3.5.5 on Sat Jan 19 2019 15:43:45 GMT+0200 (EET) using the docdash theme. + Documentation generated by JSDoc 3.5.5 on Wed Feb 13 2019 19:42:10 GMT-0800 (Pacific Standard Time) using the docdash theme.
diff --git a/docs/index.html b/docs/index.html index 0ec5acb..cf1673b 100644 --- a/docs/index.html +++ b/docs/index.html @@ -26,7 +26,7 @@
@@ -51,7 +51,7 @@

Bowser

A browser detector. Because sometimes, there is no other way, and not even good modern browsers always provide good feature detection mechanisms.

-

Build Status Greenkeeper badge

+

Build Status Greenkeeper badgeCoverage Status

Contents

Overview

The library is made to help to detect what browser your user has and gives you a convenient API to filter the users somehow depending on their browsers.

-

Please, note that this is an alpha version. Check out the 1.x branch for a stable version.

-

Changes of version 2.0 -The upcoming 2.0 version has drastically changed API. All available methods can be found in the docs folder from now on and on a webpage soon.

-

Use cases

First of all, require the library. This is a UMD Module, so it will work for AMD, Typescript and CommonJS module systems.

+

Changes of version 2.0

+

The version 2.0 has drastically changed API. All available methods can be found in the docs folder from now on and on a webpage soon.

+

For legacy code, check out the 1.x branch and install it through npm install bowser@1.9.4.

+

Use cases

First of all, require the library. This is a UMD Module, so it will work for AMD, TypeScript, ES6, and CommonJS module systems.

const Bowser = require("bowser"); // CommonJS
 
-import * as Bowser from "bowser" // Typescript

By default, the exported version is the ES5 transpiled version, which do not include any polyfills.

+import * as Bowser from "bowser"; // TypeScript + +import Bowser from "bowser"; // ES6 (and TypeScript with --esModuleInterop enabled)

By default, the exported version is the ES5 transpiled version, which do not include any polyfills.

In case you don't use your own babel-polyfill you may need to have pre-built bundle with all needed polyfills. So, for you it's suitable to require bowser like this: require('bowser/bundled'). As the result, you get a ES5 version of bowser with babel-polyfill bundled together.

You may need to use the source files, so they will be available in the package as well.

Browser props detection

Often we need to pick users' browser properties such as the name, the version, the rendering engine and so on. Here is an example how to do it with Bowser:

-
const browser = bowser.getParser(window.navigator.userAgent);
+
const browser = Bowser.getParser(window.navigator.userAgent);
 
 console.log(`The current browser name is "${browser.getBrowserName()}"`);
 // The current browser name is "Internet Explorer"

or

const impression = new Impression();
 
-const browser = bowser.getParser(window.navigator.userAgent);
+const browser = Bowser.getParser(window.navigator.userAgent);
 const browserInfo = browser.getBrowser();
 impression.brName = browserInfo.name;
 impression.brVer = browserInfo.version;

or

-
const browser = bowser.getParser(window.navigator.userAgent);
+
const browser = Bowser.getParser(window.navigator.userAgent);
 impression.userTechData = browser.parse();
 console.log(impression.userTechData);
 
@@ -105,7 +107,7 @@ console.log(impression.userTechData);
   }
 }

Filtering browsers

You could want to filter some particular browsers to provide any special support for them or make any workarounds. It could look like this:

-
const browser = bowser.getParser(window.navigator.userAgent);
+
const browser = Bowser.getParser(window.navigator.userAgent);
 const isValidBrowser = browser.satisfies({
   // declare browsers per OS
   windows: {
@@ -135,12 +137,6 @@ const isValidBrowser = browser.satisfies({
 });

Settings for any particular OS or platform has more priority and redefines settings of standalone browsers. Thus, you can define OS or platform specific rules and they will have more priority in the end.

More of API and possibilities you will find in the docs folder.

-

Contributing

If you'd like to contribute a change to bowser, modify the files in src/, then run the following (you'll need node + npm installed):

-
$ npm install #build
-$ npm test #run tests
-$ npm run lint #check lint rules

Adding tests

See the list in test/acceptance/useragentstrings.yml with example user agents and their expected bowser object.

-

Whenever you add support for new browsers or notice a bug / mismatch, please update the list and -check if all tests are still passing.

Similar Projects

  • Kong - A C# port of Bowser.
@@ -159,7 +155,7 @@ check if all tests are still passing.


- Documentation generated by JSDoc 3.5.5 on Sat Jan 19 2019 15:43:45 GMT+0200 (EET) using the docdash theme. + Documentation generated by JSDoc 3.5.5 on Wed Feb 13 2019 19:42:10 GMT-0800 (Pacific Standard Time) using the docdash theme.
diff --git a/docs/parser.js.html b/docs/parser.js.html index 0646f5a..793aa17 100644 --- a/docs/parser.js.html +++ b/docs/parser.js.html @@ -26,7 +26,7 @@
@@ -315,6 +315,19 @@ class Parser { return this.parseEngine(); } + /** + * Get engines's name + * @return {String} Engines's name or an empty string + * + * @public + */ + getEngineName(toLowerCase) { + if (toLowerCase) { + return String(this.getEngine().name).toLowerCase() || ''; + } + return this.getEngine().name || ''; + } + /** * Get parsed platform * @return {{}} @@ -480,6 +493,10 @@ class Parser { return this.getPlatformType(true) === String(platformType).toLowerCase(); } + isEngine(engineName) { + return this.getEngineName(true) === String(engineName).toLowerCase(); + } + /** * Is anything? Check if the browser is called "anything", * the OS called "anything" or the platform called "anything" @@ -515,7 +532,7 @@ export default Parser;
- Documentation generated by JSDoc 3.5.5 on Sat Jan 19 2019 15:43:45 GMT+0200 (EET) using the docdash theme. + Documentation generated by JSDoc 3.5.5 on Wed Feb 13 2019 19:42:10 GMT-0800 (Pacific Standard Time) using the docdash theme.
diff --git a/docs/utils.js.html b/docs/utils.js.html index 0ae24cb..425f4fd 100644 --- a/docs/utils.js.html +++ b/docs/utils.js.html @@ -26,7 +26,7 @@
@@ -247,7 +247,7 @@ module.exports = Utils;
- Documentation generated by JSDoc 3.5.5 on Sat Jan 19 2019 15:43:45 GMT+0200 (EET) using the docdash theme. + Documentation generated by JSDoc 3.5.5 on Wed Feb 13 2019 19:42:10 GMT-0800 (Pacific Standard Time) using the docdash theme.
diff --git a/package-lock.json b/package-lock.json index 1a95c37..4a11a78 100644 --- a/package-lock.json +++ b/package-lock.json @@ -93,7 +93,8 @@ "version": "0.3.2", "resolved": "https://registry.npmjs.org/array-unique/-/array-unique-0.3.2.tgz", "integrity": "sha1-qJS3XUvE9s1nnvMkSp/Y9Gri1Cg=", - "dev": true + "dev": true, + "optional": true }, "braces": { "version": "2.3.2", @@ -345,7 +346,8 @@ "version": "2.1.1", "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-2.1.1.tgz", "integrity": "sha1-w7M6te42DYbg5ijwRorn7yfWVN8=", - "dev": true + "dev": true, + "optional": true }, "aproba": { "version": "1.2.0", @@ -810,7 +812,8 @@ "version": "5.1.2", "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==", - "dev": true + "dev": true, + "optional": true }, "safer-buffer": { "version": "2.1.2", @@ -874,6 +877,7 @@ "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz", "integrity": "sha1-ajhfuIU9lS1f8F0Oiq+UJ43GPc8=", "dev": true, + "optional": true, "requires": { "ansi-regex": "^2.0.0" } @@ -922,13 +926,15 @@ "version": "1.0.2", "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", "integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=", - "dev": true + "dev": true, + "optional": true }, "yallist": { "version": "3.0.3", "resolved": "https://registry.npmjs.org/yallist/-/yallist-3.0.3.tgz", "integrity": "sha512-S+Zk8DEWE6oKpV+vI3qWkaK+jSbIK86pCwe2IF/xwIpQ8jEuxpw9NyaGjmp9+BoJv5FV2piqCDcoCtStppiq2A==", - "dev": true + "dev": true, + "optional": true } } }, @@ -5107,7 +5113,8 @@ "version": "2.1.1", "resolved": false, "integrity": "sha1-w7M6te42DYbg5ijwRorn7yfWVN8=", - "dev": true + "dev": true, + "optional": true }, "aproba": { "version": "1.2.0", @@ -5572,7 +5579,8 @@ "version": "5.1.1", "resolved": false, "integrity": "sha512-kKvNJn6Mm93gAczWVJg7wH+wGYWNrDHdWvpUmHyEsgCtIwwo3bqPtV4tR5tuPaUhTOo/kvhVwd8XwwOllGYkbg==", - "dev": true + "dev": true, + "optional": true }, "safer-buffer": { "version": "2.1.2", @@ -5636,6 +5644,7 @@ "resolved": false, "integrity": "sha1-ajhfuIU9lS1f8F0Oiq+UJ43GPc8=", "dev": true, + "optional": true, "requires": { "ansi-regex": "^2.0.0" } @@ -5684,13 +5693,15 @@ "version": "1.0.2", "resolved": false, "integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=", - "dev": true + "dev": true, + "optional": true }, "yallist": { "version": "3.0.2", "resolved": false, "integrity": "sha1-hFK0u36Dx8GI2AQcGoN8dz1ti7k=", - "dev": true + "dev": true, + "optional": true } } }, @@ -6245,7 +6256,8 @@ "version": "0.3.2", "resolved": "https://registry.npmjs.org/array-unique/-/array-unique-0.3.2.tgz", "integrity": "sha1-qJS3XUvE9s1nnvMkSp/Y9Gri1Cg=", - "dev": true + "dev": true, + "optional": true }, "async-each": { "version": "1.0.1", @@ -6511,7 +6523,8 @@ "version": "2.1.1", "resolved": false, "integrity": "sha1-w7M6te42DYbg5ijwRorn7yfWVN8=", - "dev": true + "dev": true, + "optional": true }, "aproba": { "version": "1.2.0", @@ -6976,7 +6989,8 @@ "version": "5.1.1", "resolved": false, "integrity": "sha512-kKvNJn6Mm93gAczWVJg7wH+wGYWNrDHdWvpUmHyEsgCtIwwo3bqPtV4tR5tuPaUhTOo/kvhVwd8XwwOllGYkbg==", - "dev": true + "dev": true, + "optional": true }, "safer-buffer": { "version": "2.1.2", @@ -7040,6 +7054,7 @@ "resolved": false, "integrity": "sha1-ajhfuIU9lS1f8F0Oiq+UJ43GPc8=", "dev": true, + "optional": true, "requires": { "ansi-regex": "^2.0.0" } @@ -7088,13 +7103,15 @@ "version": "1.0.2", "resolved": false, "integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=", - "dev": true + "dev": true, + "optional": true }, "yallist": { "version": "3.0.2", "resolved": false, "integrity": "sha1-hFK0u36Dx8GI2AQcGoN8dz1ti7k=", - "dev": true + "dev": true, + "optional": true } } }, @@ -7145,7 +7162,8 @@ "version": "1.1.6", "resolved": "https://registry.npmjs.org/is-buffer/-/is-buffer-1.1.6.tgz", "integrity": "sha512-NcdALwpXkTm5Zvvbk7owOUSvVvBKDgKP5/ewfXEznmQFfs4ZRmanOeKBTjRVjka3QFoN6XJ+9F3USqfHqTaU5w==", - "dev": true + "dev": true, + "optional": true }, "is-data-descriptor": { "version": "1.0.0", @@ -7173,7 +7191,8 @@ "version": "0.1.1", "resolved": "https://registry.npmjs.org/is-extendable/-/is-extendable-0.1.1.tgz", "integrity": "sha1-YrEQ4omkcUGOPsNqYX1HLjAd/Ik=", - "dev": true + "dev": true, + "optional": true }, "is-extglob": { "version": "2.1.1", @@ -7225,7 +7244,8 @@ "version": "6.0.2", "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.2.tgz", "integrity": "sha512-s5kLOcnH0XqDO+FvuaLX8DDjZ18CGFk7VygH40QoKPUQhW4e2rvM0rwUq0t8IQDOwYSeLK01U90OjzBTme2QqA==", - "dev": true + "dev": true, + "optional": true }, "micromatch": { "version": "3.1.10", @@ -9162,6 +9182,12 @@ "minimalistic-crypto-utils": "^1.0.0" } }, + "email-addresses": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/email-addresses/-/email-addresses-3.0.3.tgz", + "integrity": "sha512-kUlSC06PVvvjlMRpNIl3kR1NRXLEe86VQ7N0bQeaCZb2g+InShCeHQp/JvyYNTugMnRN2NvJhHlc3q12MWbbpg==", + "dev": true + }, "emittery": { "version": "0.4.1", "resolved": "https://registry.npmjs.org/emittery/-/emittery-0.4.1.tgz", @@ -10315,6 +10341,33 @@ } } }, + "filename-reserved-regex": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/filename-reserved-regex/-/filename-reserved-regex-1.0.0.tgz", + "integrity": "sha1-5hz4BfDeHJhFZ9A4bcXfUO5a9+Q=", + "dev": true + }, + "filenamify": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/filenamify/-/filenamify-1.2.1.tgz", + "integrity": "sha1-qfL/0RxQO+0wABUCknI3jx8TZaU=", + "dev": true, + "requires": { + "filename-reserved-regex": "^1.0.0", + "strip-outer": "^1.0.0", + "trim-repeated": "^1.0.0" + } + }, + "filenamify-url": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/filenamify-url/-/filenamify-url-1.0.0.tgz", + "integrity": "sha1-syvYExnvWGO3MHi+1Q9GpPeXX1A=", + "dev": true, + "requires": { + "filenamify": "^1.0.0", + "humanize-url": "^1.0.0" + } + }, "fill-range": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-4.0.0.tgz", @@ -10597,6 +10650,17 @@ "readable-stream": "^2.0.0" } }, + "fs-extra": { + "version": "7.0.1", + "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-7.0.1.tgz", + "integrity": "sha512-YJDaCJZEnBmcbw13fvdAM9AwNOJwOzrE4pqMqBq5nFiEqXUqHwlK4B+3pUw6JNvfSPtX05xFHtYy/1ni01eGCw==", + "dev": true, + "requires": { + "graceful-fs": "^4.1.2", + "jsonfile": "^4.0.0", + "universalify": "^0.1.0" + } + }, "fs-readdir-recursive": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/fs-readdir-recursive/-/fs-readdir-recursive-1.1.0.tgz", @@ -10641,7 +10705,8 @@ "ansi-regex": { "version": "2.1.1", "bundled": true, - "dev": true + "dev": true, + "optional": true }, "aproba": { "version": "1.2.0", @@ -11056,7 +11121,8 @@ "safe-buffer": { "version": "5.1.2", "bundled": true, - "dev": true + "dev": true, + "optional": true }, "safer-buffer": { "version": "2.1.2", @@ -11112,6 +11178,7 @@ "version": "3.0.1", "bundled": true, "dev": true, + "optional": true, "requires": { "ansi-regex": "^2.0.0" } @@ -11155,12 +11222,14 @@ "wrappy": { "version": "1.0.2", "bundled": true, - "dev": true + "dev": true, + "optional": true }, "yallist": { "version": "3.0.3", "bundled": true, - "dev": true + "dev": true, + "optional": true } } }, @@ -11286,6 +11355,58 @@ "assert-plus": "^1.0.0" } }, + "gh-pages": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/gh-pages/-/gh-pages-2.0.1.tgz", + "integrity": "sha512-uFlk3bukljeiWKQ2XvPfjcSi/ou7IfoDf2p+Fj672saLAr8bnOdFVqI/JSgrSgInKpCg5BksxEwGUl++dbg8Dg==", + "dev": true, + "requires": { + "async": "^2.6.1", + "commander": "^2.18.0", + "email-addresses": "^3.0.1", + "filenamify-url": "^1.0.0", + "fs-extra": "^7.0.0", + "globby": "^6.1.0", + "graceful-fs": "^4.1.11", + "rimraf": "^2.6.2" + }, + "dependencies": { + "async": { + "version": "2.6.2", + "resolved": "https://registry.npmjs.org/async/-/async-2.6.2.tgz", + "integrity": "sha512-H1qVYh1MYhEEFLsP97cVKqCGo7KfCyTt6uEWqsTBr9SO84oK9Uwbyd/yCW+6rKJLHksBNUVWZDAjfS+Ccx0Bbg==", + "dev": true, + "requires": { + "lodash": "^4.17.11" + } + }, + "commander": { + "version": "2.19.0", + "resolved": "https://registry.npmjs.org/commander/-/commander-2.19.0.tgz", + "integrity": "sha512-6tvAOO+D6OENvRAh524Dh9jcfKTYDQAqvqezbCW82xj5X0pSrcpxtvRKHLG0yBY6SD7PSDrJaj+0AiOcKVd1Xg==", + "dev": true + }, + "globby": { + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/globby/-/globby-6.1.0.tgz", + "integrity": "sha1-9abXDoOV4hyFj7BInWTfAkJNUGw=", + "dev": true, + "requires": { + "array-union": "^1.0.1", + "glob": "^7.0.3", + "object-assign": "^4.0.1", + "pify": "^2.0.0", + "pinkie-promise": "^2.0.0" + } + }, + "lodash": { + "version": "4.17.11", + "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.11.tgz", + "integrity": "sha512-cQKh8igo5QUhZ7lg38DYWAxMvjSAKG0A8wGSVimP07SIUEK2UO+arSRKbRZWtelMtN5V0Hkwh5ryOto/SshYIg==", + "dev": true + } + } + }, "glob": { "version": "7.1.2", "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.2.tgz", @@ -11659,6 +11780,16 @@ "integrity": "sha1-7AbBDgo0wPL68Zn3/X/Hj//QPHM=", "dev": true }, + "humanize-url": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/humanize-url/-/humanize-url-1.0.1.tgz", + "integrity": "sha1-9KuZ4NKIF0yk4eUEB8VfuuRk7/8=", + "dev": true, + "requires": { + "normalize-url": "^1.0.0", + "strip-url-auth": "^1.0.0" + } + }, "ieee754": { "version": "1.1.12", "resolved": "https://registry.npmjs.org/ieee754/-/ieee754-1.1.12.tgz", @@ -12322,6 +12453,15 @@ "integrity": "sha1-Epai1Y/UXxmg9s4B1lcB4sc1tus=", "dev": true }, + "jsonfile": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-4.0.0.tgz", + "integrity": "sha1-h3Gq4HmbZAdrdmQPygWPnBDjPss=", + "dev": true, + "requires": { + "graceful-fs": "^4.1.6" + } + }, "jsprim": { "version": "1.4.1", "resolved": "https://registry.npmjs.org/jsprim/-/jsprim-1.4.1.tgz", @@ -13320,6 +13460,18 @@ "remove-trailing-separator": "^1.0.1" } }, + "normalize-url": { + "version": "1.9.1", + "resolved": "https://registry.npmjs.org/normalize-url/-/normalize-url-1.9.1.tgz", + "integrity": "sha1-LMDWazHqIwNkWENuNiDYWVTGbDw=", + "dev": true, + "requires": { + "object-assign": "^4.0.1", + "prepend-http": "^1.0.0", + "query-string": "^4.1.0", + "sort-keys": "^1.0.0" + } + }, "npm-run-path": { "version": "2.0.2", "resolved": "https://registry.npmjs.org/npm-run-path/-/npm-run-path-2.0.2.tgz", @@ -15221,6 +15373,16 @@ "integrity": "sha512-eRzhrN1WSINYCDCbrz796z37LOe3m5tmW7RQf6oBntukAG1nmovJvhnwHHRMAfeoItc1m2Hk02WER2aQ/iqs+A==", "dev": true }, + "query-string": { + "version": "4.3.4", + "resolved": "https://registry.npmjs.org/query-string/-/query-string-4.3.4.tgz", + "integrity": "sha1-u7aTucqRXCMlFbIosaArYJBD2+s=", + "dev": true, + "requires": { + "object-assign": "^4.1.0", + "strict-uri-encode": "^1.0.0" + } + }, "querystring": { "version": "0.2.0", "resolved": "https://registry.npmjs.org/querystring/-/querystring-0.2.0.tgz", @@ -16227,6 +16389,15 @@ } } }, + "sort-keys": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/sort-keys/-/sort-keys-1.1.2.tgz", + "integrity": "sha1-RBttTTRnmPG05J6JIK37oOVD+a0=", + "dev": true, + "requires": { + "is-plain-obj": "^1.0.0" + } + }, "source-list-map": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/source-list-map/-/source-list-map-2.0.1.tgz", @@ -16473,6 +16644,12 @@ "integrity": "sha1-1cdSgl5TZ+eG944Y5EXqIjoVWVI=", "dev": true }, + "strict-uri-encode": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/strict-uri-encode/-/strict-uri-encode-1.1.0.tgz", + "integrity": "sha1-J5siXfHVgrH1TmWt3UNS4Y+qBxM=", + "dev": true + }, "string-width": { "version": "2.1.1", "resolved": "https://registry.npmjs.org/string-width/-/string-width-2.1.1.tgz", @@ -16559,6 +16736,21 @@ "integrity": "sha1-PFMZQukIwml8DsNEhYwobHygpgo=", "dev": true }, + "strip-outer": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/strip-outer/-/strip-outer-1.0.1.tgz", + "integrity": "sha512-k55yxKHwaXnpYGsOzg4Vl8+tDrWylxDEpknGjhTiZB8dFRU5rTo9CAzeycivxV3s+zlTKwrs6WxMxR95n26kwg==", + "dev": true, + "requires": { + "escape-string-regexp": "^1.0.2" + } + }, + "strip-url-auth": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/strip-url-auth/-/strip-url-auth-1.0.1.tgz", + "integrity": "sha1-IrD6OkE4WzO+PzMVUbu4N/oM164=", + "dev": true + }, "styled_string": { "version": "0.0.1", "resolved": "https://registry.npmjs.org/styled_string/-/styled_string-0.0.1.tgz", @@ -17274,6 +17466,15 @@ "integrity": "sha1-n5up2e+odkw4dpi8v+sshI8RrbM=", "dev": true }, + "trim-repeated": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/trim-repeated/-/trim-repeated-1.0.0.tgz", + "integrity": "sha1-42RqLqTokTEr9+rObPsFOAvAHCE=", + "dev": true, + "requires": { + "escape-string-regexp": "^1.0.2" + } + }, "trim-right": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/trim-right/-/trim-right-1.0.1.tgz", @@ -17469,6 +17670,12 @@ "uid2": "0.0.3" } }, + "universalify": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/universalify/-/universalify-0.1.2.tgz", + "integrity": "sha512-rBJeI5CXAlmy1pV+617WB9J63U6XcazHHF2f2dbJix4XzpUF0RS3Zbj0FGIOCAva5P/d/GBOYaACQ1w+0azUkg==", + "dev": true + }, "unpipe": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/unpipe/-/unpipe-1.0.0.tgz", diff --git a/package.json b/package.json index 91d261e..a06e922 100644 --- a/package.json +++ b/package.json @@ -42,6 +42,7 @@ "eslint-config-airbnb-base": "^13.1.0", "eslint-plugin-ava": "^5.1.0", "eslint-plugin-import": "^2.14.0", + "gh-pages": "^2.0.1", "jsdoc": "^3.5.5", "nyc": "^13.2.0", "sinon": "^6.1.5", @@ -63,6 +64,7 @@ }, "scripts": { "build": "webpack --config webpack.config.js", + "deploy": "jsdoc -c jsdoc.json && gh-pages --dist docs --dest docs", "prepublishOnly": "npm run build", "lint": "eslint ./src", "testem": "testem",