├── .babelrc ├── .editorconfig ├── .gitignore ├── .hound.yml ├── .jshintrc ├── .npmignore ├── .travis.yml ├── README.md ├── bower.json ├── chromatism ├── adapt.png ├── blend.png ├── brightness.png ├── complementary.png ├── contrast.png ├── contrastRatio.png ├── fade.png ├── greyscale.png ├── hue.png ├── invert.png ├── invertLightness.png ├── mid.png ├── rainbow.png ├── saturation.png ├── sepia.png ├── shade.png ├── tetrad.png └── triad.png ├── index.d.ts ├── package-lock.json ├── package.json ├── rollup.config.js ├── src ├── constants │ ├── illuminants.js │ └── transforms.js ├── conversions │ ├── XYZ.js │ ├── cielab.js │ ├── cielch.js │ ├── cieluv.js │ ├── cmyk.js │ ├── csshsl.js │ ├── cssrgb.js │ ├── hex.js │ ├── hsl.js │ ├── hsluv.js │ ├── hsv.js │ ├── index.js │ ├── lms.js │ ├── rgb.js │ ├── xyY.js │ └── yiq.js ├── helpers │ ├── bounded-rgb.js │ ├── bounded.js │ ├── convert-to-type.js │ ├── cube-root.js │ ├── determine-type.js │ ├── get-illuminant.js │ ├── get-transform.js │ ├── matrix-multiply.js │ ├── negative-modulo.js │ ├── slope-mod.js │ ├── test-color-type.js │ ├── to-degree.js │ └── to-radian.js └── operations │ ├── adapt.js │ ├── adjacent.js │ ├── brightness.js │ ├── complementary.js │ ├── contrast.js │ ├── contrastRatio.js │ ├── convert.js │ ├── difference.js │ ├── fade.js │ ├── greyscale.js │ ├── hue.js │ ├── index.js │ ├── invert.js │ ├── invertLightness.js │ ├── mid.js │ ├── multiply.js │ ├── saturation.js │ ├── sepia.js │ ├── shade.js │ ├── temperature.js │ ├── tetrad.js │ ├── triad.js │ ├── uniformComplementary.js │ ├── uniformTetrad.js │ └── uniformTriad.js ├── test ├── .eslintrc.js ├── consts.js ├── rounding.js └── test.js └── yarn.lock /.babelrc: -------------------------------------------------------------------------------- 1 | { 2 | "env": { 3 | "development": { 4 | "presets": [ 5 | ["env", { 6 | "modules": false 7 | }] 8 | ], 9 | "plugins": [ 10 | "external-helpers" 11 | ] 12 | }, 13 | "test": { 14 | "presets": [ 15 | "env" 16 | ] 17 | } 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /.editorconfig: -------------------------------------------------------------------------------- 1 | root = true 2 | 3 | [*] 4 | charset = utf-8 5 | end_of_line = LF 6 | trim_trailing_whitespace = true 7 | insert_final_newline = true 8 | indent_style = space 9 | indent_size = 2 10 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | node_modules 2 | npm-debug.log 3 | mytest.js 4 | dist/* 5 | -------------------------------------------------------------------------------- /.hound.yml: -------------------------------------------------------------------------------- 1 | jshint: 2 | config_file: .jshintrc 3 | -------------------------------------------------------------------------------- /.jshintrc: -------------------------------------------------------------------------------- 1 | { 2 | "esversion": 6 3 | } 4 | -------------------------------------------------------------------------------- /.npmignore: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/graypegg/chromatism/a4d8069245e73da226638c83cdfc688ed10f50af/.npmignore -------------------------------------------------------------------------------- /.travis.yml: -------------------------------------------------------------------------------- 1 | language: node_js 2 | node_js: 3 | - "4" 4 | - "6" 5 | - "8" 6 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Chromatism :rainbow: 2 | 3 | A simple set of utility functions for colours. 4 | 5 | [![NPM](https://nodei.co/npm/chromatism.png?compact=true)](https://nodei.co/npm/chromatism/) 6 | 7 | **Awesome resources for colour stuff.** 8 | - [Bruce Lindbloom](http://www.brucelindbloom.com/) 9 | - [Colormine](http://colormine.org/) 10 | - [EasyRGB](http://www.easyrgb.com/en/math.php) 11 | 12 | ## Table of Contents 13 | - [Chromatism](#chromatism-rainbow) 14 | * [Table of Contents](#table-of-contents) 15 | * [Contributing](#contributing) 16 | * [Installation](#installation) 17 | - [CommonJS](#commonjs) 18 | - [ES Modules](#es-modules) 19 | - [Browser without bundling](#browser-without-bundling) 20 | * [Functions](#functions) 21 | + [Colour Transformations](#currency_exchange-colour-transformations) 22 | - [Convert colour types](#convert-colour-types) 23 | - [Generate a complementary colour](#generate-a-complementary-colour) 24 | - [Generate an array of triad colours](#generate-an-array-of-triad-colours) 25 | - [Generate an array of tetrad colours](#generate-an-array-of-tetrad-colours) 26 | - [Find the mid point between two colours](#find-the-mid-point-between-two-colours) 27 | - [Invert a colour](#invert-a-colour) 28 | - [Invert a grey colour](#invert-a-grey-colour) 29 | - [Blend two colours (Multiply)](#blend-two-colours-multiply) 30 | - [Generate an array of adjacent hue-shifted colours (rainbow effect)](#generate-an-array-of-adjacent-hue-shifted-colours-rainbow-effect) 31 | - [Generate an array of the fade between two colours](#generate-an-array-of-the-fade-between-two-colours) 32 | - [Generate a new shade of a colour](#generate-a-new-shade-of-a-colour) 33 | - [Generate a new saturation of a colour](#generate-a-new-saturation-of-a-colour) 34 | - [Change colour's brightness](#change-colours-brightness) 35 | - [Shift the hue of a colour](#shift-the-hue-of-a-colour) 36 | - [Shift the contrast of a colour](#shift-the-contrast-of-a-colour) 37 | - [Greyscale version of the colour](#greyscale-version-of-the-colour) 38 | - [Sepia version of the colour](#sepia-version-of-the-colour) 39 | - [Determine accessible colour for foreground text](#determine-accessible-colour-for-foreground-text) 40 | - [Chromatic Adaptation (White point)](#chromatic-adaptation-white-point) 41 | + [Colour Metering Functions](#1234-colour-metering-functions) 42 | - [Colour Difference](#colour-difference) 43 | - [Colour Temperature](#colour-temperature) 44 | * [Constants](#constants) 45 | * [Scales + Colour Spaces](#scales--colour-spaces) 46 | * [Colour Modes](#colour-modes) 47 | 48 | ## Contributing 49 | First off, thanks so much for helping out! Colour modes + functions contributing info will be added soon. 50 | 51 | *Note:* The type definitions file (/index.d.ts) must be updated as part of your pull request. (If you're not familiar with typescript, I can update it for ya.) It contains definitions for colour modes AND colour functions. (Special thanks to @bdoss on GitHub for adding the inital TS definitions!) 52 | 53 | ## Installation 54 | 55 | ```bash 56 | $ npm install --save chromatism 57 | ``` 58 | 59 | #### CommonJS 60 | ```javascript 61 | var chromatism = require('chromatism'); 62 | ``` 63 | 64 | #### ES Modules 65 | ```javascript 66 | import * as chromatism from 'chromatism'; 67 | ``` 68 | 69 | **ES Module also exports all functions individually, allowing for tree-shaking and smaller bundles** 70 | 71 | ```javascript 72 | import { brightness } from 'chromatism'; 73 | ``` 74 | 75 | #### Browser without bundling 76 | ```html 77 | 78 | ``` 79 | 80 | 81 | ## Functions 82 | All functions can take any colour type. **You can even mix colour types** if a function takes more than one. [A list of colour types are available here](#colour-modes). Return values are also not bound by the function. Any functions that return colours, return a colour object, which contains getters for each colour type. If you take the return value of one of these functions and get `returnValue.hex` for example, you will get the hexadecimal equivalent value. 83 | 84 | In previous versions (Pre. v2.x), you could chain functions. This functionality has been removed to save space on the bundle. 85 | 86 | :warning: **_Note:_** The following examples return different types of values, (*hex*, *rgb*, *hsl*, etc) but you can use any of the available colour modes as seen in the colour modes table at the [bottom of this README.](#colour-modes) 87 | 88 | ### :currency_exchange: Colour Transformations 89 | The following functions return a Colour Object, which contains getters to get a return value of any colour mode. See [Colour Mode](#Colour Modes) table for a list of all the available colour modes. 90 | 91 | #### Convert colour types 92 | ```javascript 93 | var newColour = chromatism.convert( colour ).hex; 94 | ``` 95 | 96 | Value can be any colour in any of the supported colour modes. [(See chart at bottom of README)](#colour-modes) **This is an identity operation**, as it just returns an object containing all of the available colour modes of the result. 97 | 98 | All colour modes supported can be converted to any other. This does however mean that some conversions will have intermediate values, which can cause small inconsistencies, especially when changing colour spaces. The path for each conversion is optimised as much as possible to avoid loss of colour information. 99 | 100 | --- 101 | 102 | #### Generate a complementary colour 103 | ```javascript 104 | var newColour = chromatism.complementary( colour ).rgb; 105 | ``` 106 | 107 | There is also a `uniform` version of this function. When using the uniform version, the output colours will have the same apparent lightness as the source colour, which normally means they'll look nicer together. (There is a performance trade-off however.) 108 | 109 | ```javascript 110 | var newColour = chromatism.uniformComplementary( colour ).rgb; 111 | ``` 112 | 113 | ![Complementary](chromatism/complementary.png) 114 | 115 | --- 116 | 117 | #### Generate an array of triad colours 118 | ```javascript 119 | var newColour = chromatism.triad( colour ).hsl; 120 | ``` 121 | 122 | There is also a `uniform` version of this function. When using the uniform version, the output colours will have the same apparent lightness as the source colour, which normally means they'll look nicer together. (There is a performance trade-off however.) 123 | 124 | ```javascript 125 | var newColour = chromatism.uniformTriad( colour ).rgb; 126 | ``` 127 | 128 | ![Triad](chromatism/triad.png) 129 | 130 | --- 131 | 132 | #### Generate an array of tetrad colours 133 | ```javascript 134 | var newColour = chromatism.tetrad( colour ).cmyk; 135 | ``` 136 | 137 | There is also a `uniform` version of this function. When using the uniform version, the output colours will have the same apparent lightness as the source colour, which normally means they'll look nicer together. (There is a performance trade-off however.) 138 | 139 | ```javascript 140 | var newColour = chromatism.uniformTetrad( colour ).rgb; 141 | ``` 142 | 143 | ![Tetrad](chromatism/tetrad.png) 144 | 145 | --- 146 | 147 | #### Find the mid point between two colours 148 | ```javascript 149 | var newColour = chromatism.mid( colourOne, colourTwo ).cssrgb; 150 | ``` 151 | 152 | ![Mid](chromatism/mid.png) 153 | 154 | --- 155 | 156 | #### Invert a colour 157 | ```javascript 158 | var newColour = chromatism.invert( colour ).hex; 159 | ``` 160 | 161 | ![Invert](chromatism/invert.png) 162 | 163 | --- 164 | 165 | #### Invert a grey colour 166 | ```javascript 167 | var newColour = chromatism.invertLightness( colour ).hsl; 168 | ``` 169 | 170 | ![Invert Lightness](chromatism/invertLightness.png) 171 | 172 | --- 173 | 174 | #### Blend two colours (Multiply) 175 | ```javascript 176 | var newColour = chromatism.multiply( colourOne, colourTwo ).hsv; 177 | ``` 178 | 179 | ![Blend](chromatism/blend.png) 180 | 181 | --- 182 | 183 | #### Generate an array of adjacent hue-shifted colours (rainbow effect) 184 | ```javascript 185 | var newColour = chromatism.adjacent( degrees, sections, colour ).cmyk; 186 | ``` 187 | 188 | ![Rainbow](chromatism/rainbow.png) 189 | 190 | Shift should be in degrees. It can be either positive and negative. 191 | 192 | --- 193 | 194 | #### Generate an array of the fade between two colours 195 | ```javascript 196 | var newColour = chromatism.fade( amount, colourFrom, colourTo ).hsl; 197 | ``` 198 | 199 | ![Fade](chromatism/fade.png) 200 | 201 | --- 202 | 203 | #### Generate a new shade of a colour 204 | ```javascript 205 | var newColour = chromatism.shade( percent, colour ).csshsl; 206 | ``` 207 | 208 | ![Shade](chromatism/shade.png) 209 | 210 | Percent should be a number between -100 and 100. 211 | 212 | --- 213 | 214 | #### Generate a new saturation of a colour 215 | ```javascript 216 | var newColour = chromatism.saturation( percent, colour ).hex; 217 | ``` 218 | 219 | ![Saturation](chromatism/saturation.png) 220 | 221 | Percent should be a number between -100 and 100. 222 | 223 | --- 224 | 225 | #### Change colour's brightness 226 | ```javascript 227 | var newColour = chromatism.brightness( percent, colour ).hsl; 228 | ``` 229 | 230 | ![Brightness](chromatism/brightness.png) 231 | 232 | This essentially acts as a sum of [saturation](#generate-a-new-saturation-of-a-colour) and [shade](#generate-a-new-shade-of-a-colour), and thus does not adjust luminosity. Brightness works for 99% of most scenarios though. 233 | 234 | Percent should be a number between -100 and 100. 235 | 236 | --- 237 | 238 | #### Shift the hue of a colour 239 | ```javascript 240 | var newColour = chromatism.hue( degrees, colour ).hex; 241 | ``` 242 | 243 | ![Hue](chromatism/hue.png) 244 | 245 | Hue shift is measured in degrees, using the HSL colour model. 246 | 247 | --- 248 | 249 | #### Shift the contrast of a colour 250 | ```javascript 251 | var newColour = chromatism.contrast( contrastCoeff, colour ).hsl; 252 | ``` 253 | 254 | ![Contrast](chromatism/contrast.png) 255 | 256 | Contrast coefficient is supplied in decimal form! You'll normally use a value between 0 and 4. 257 | 258 | Imagine increasing the contrast *(shift > 1)* as making lighter colours lighter, and darker colours darker. Decreasing *(shift < 1)* makes all colours more similar. 259 | 260 | --- 261 | 262 | #### Greyscale version of the colour 263 | ```javascript 264 | var newColour = chromatism.greyscale( colour ).cmyk; 265 | ``` 266 | 267 | ![Greyscale](chromatism/greyscale.png) 268 | 269 | --- 270 | 271 | #### Sepia version of the colour 272 | ```javascript 273 | var newColour = chromatism.sepia( colour ).hsv; 274 | ``` 275 | 276 | ![Sepia](chromatism/sepia.png) 277 | 278 | --- 279 | 280 | #### Determine accessible colour for foreground text 281 | ```javascript 282 | var newColour = chromatism.contrastRatio( colour ).rgb; 283 | ``` 284 | 285 | ![Contrast Ratio](chromatism/contrastRatio.png) 286 | 287 | Use this function to determine the colour of text needed create a high contrast between text and a solid background of the supplied colour. Made according to the [W3C Standard on Web Accessibility](http://www.w3.org/TR/UNDERSTANDING-WCAG20/visual-audio-contrast-contrast.html) 288 | 289 | --- 290 | 291 | #### Chromatic Adaptation (White point) 292 | ```javascript 293 | var newColour = chromatism.adapt( colour, illuminant, [source illuminant] ).XYZ; 294 | ``` 295 | 296 | ![Illuminant Adaptation](chromatism/adapt.png) 297 | 298 | Shifts the Illuminant (white-point) on the supplied colour. Supply an illuminant label as a capital-letter string in the illuminant attribute. (e.g. `"D65"`, `"F2"`) [A full list is available at the bottom of this README.](#supported-values) Most standard white-points are supported. (Most colours in Chromatism are assumed to be illuminated by D65, so you can leave off the `source illuminant` property normally, it defaults to `CIE 2° D65`.) 299 | 300 | --- 301 | 302 | ### :1234: Colour Metering Functions 303 | These functions do not return a colour, but instead return some aspect or measure of the colour(s). 304 | 305 | #### Colour Difference 306 | ```javascript 307 | var diff = chromatism.difference( colourOne, colourTwo, [luminance weight], [chroma weight] ); 308 | ``` 309 | Returns a measure of how different the two supplied colours are. Luminance and Chroma weight are equal to *l* and *c* in the [CMC l:c](http://www.brucelindbloom.com/index.html?Eqn_DeltaE_CMC.html) Delta-E equation. By default they are both set to 1. (Thus testing imperceptibility) 310 | 311 | #### Colour Temperature 312 | ```javascript 313 | var diff = chromatism.temperature( colour ); 314 | ``` 315 | Returns the [correlated colour temperature](https://en.wikipedia.org/wiki/Color_temperature) of the supplied colour in Kelvin. (A higher number indicates a blue-er colour; a lower number indicates a red-er colour.) This should only be used when working with colours that could actually be emitted by a black-body radiator (think glowing stuff, such as tungsten in incandescent lightbulbs), [as colour temperature is only an approximation of the colour to a narrow strip of the XYZ gamut.](https://en.wikipedia.org/wiki/Color_temperature#/media/File:PlanckianLocus.png) (Note the thin line in the middle of this chart.) 316 | 317 | Colour temperature is calculated via [McCamy's CCT fomula. ](ttp://onlinelibrary.wiley.com/doi/10.1002/col.5080170211/abstract;jsessionid=D127570AD1D0FEF9A18424F5C0E987C5.f02t04)(DOI: 10.1002/col.5080170211) **Which may mean that colours temperatures beyond 6500K (CIE Illuminant D65) are not entirely accurate** 318 | 319 | ## Supported Values 320 | 321 | | Reference | Values | Description | 322 | | --------- | ------ | ----------- | 323 | | Illuminants | `"A"`, `"B"`, `"C"`, `"D50"`, `"D55"`, `"D65"`, `"D75"`, `"E"`, `"F2"`, `"F7"`, `"F11"` | Standard CIE illuminants in XYZ format 324 | 325 | ## Scales + Colour Spaces 326 | | Mode | Scale | Colour Space | 327 | | --------------------- | --------------------------------- | ------------ | 328 | | `.hex` | #000000 - #FFFFFF | sRGB | 329 | | `.rgb` | (r, g, b) 0 - 255 | sRGB | 330 | | `.cssrgb` | (r, g, b) 0 - 255 | sRGB | 331 | | `.hsl` | (h) 0 - 359, (s, l) 0 - 100 | sRGB | 332 | | `.csshsl` | (h) 0 - 359, (s, l) 0 - 100 | sRGB | 333 | | `.hsv` | (h) 0 - 359, (s, v) 0 - 100 | sRGB | 334 | | `.cmyk` | (c, m, y, k) 0 - 1 | CMYK | 335 | | `.yiq` | (y, i, q) 0 - 1 | YUV | 336 | | `.XYZ` | (Y) 0 - 100, (X, Z) derived | XYZ | 337 | | `.xyY` | (Y) 0 - 100, (x, y) 0 - 1 | XYZ | 338 | | `.lms` | (⍴, γ, β) 0 - 1 | XYZ | 339 | | `.cielab` (L\*a\*b\*) | (L) 0 - 100, (a, b) -128 - 128 | CIELAB | 340 | | `.cieluv` (L\*u\*v\*) | (L) 0 - 100, (u, v) -128 - 128 | CIELUV | 341 | | `.cielch` (L\*C\*h\*) | (L) 0 - 100, (C, h) -128 - 128 | CIELCh | 342 | | `.hsluv` | (hu) 0 - 359, (s, l) 0 - 10 | CIELCh | 343 | 344 | ## Colour Modes 345 | 346 | | Mode | Example Syntax | 347 | | --------------------- | ------------------------------------------------- | 348 | | `.hex` | `"#FFC837"` | 349 | | `.rgb` | `{ r:255, g: 200, b: 55 }` | 350 | | `.cssrgb` | `"rgb(255,200,55)"` | 351 | | `.hsl` | `{ h: 44, s: 100, l: 61 }` | 352 | | `.csshsl` | `"hsl(44,100,61)"` | 353 | | `.hsv` | `{h: 44, s: 78, v: 100}` | 354 | | `.cmyk` | `{c: 0.5, m: 1, y: 0.2, k: 0.45}` | 355 | | `.yiq` | `{ y: 0.132, i: 0.0222, q: 0.195 }` | 356 | | `.XYZ` | `{ X: 41.24, Y: 21.26, Z: 1.93 }` | 357 | | `.xyY` | `{ x: 0.64, y: 0.33, Y: 21.26 }` | 358 | | `.lms` | `{ rho: 42.266, gamma: 5.561, beta: 2.135 }` | 359 | | `.cielab` (L\*a\*b\*) | `{ L: 53.23, a: 80.11, b: 67.22 }` | 360 | | `.cieluv` (L\*u\*v\*) | `{ L: 53.23, u: 175.05, v: 37.75 }` | 361 | | `.cielch` (L\*C\*h\*) | `{ L: 53.23, C: 179.08, h: 12.17 }` | 362 | | `.hsluv` | `{ hu: 12.17, s: 99.99, l: 53.23 }` | 363 | 364 | :warning: **A note about CIELUV + CIELCH**: Conversion to CIELUV (and by extension, CIELCH) requires defining the illuminant, which can skew results slightly. By default, Chromatism assumes all colours are illuminated by `CIE D65`, which means that you may get differing chrominance values (±~10) if you are comparing against a CIELUV/CIELCH colour illuminated by anything other than D65. 365 | 366 | All functions return an object containing all modes of the result. (In getters, so don't worry, Chromatism doesn't calculate *all* the versions of the result when you use a function!) 367 | 368 | For example, if you need a string containing the hex code for the colour result, simply use `.hex`: 369 | 370 | ```javascript 371 | var newColour = chromatism.invert("#5300FF").hex 372 | ``` 373 | -------------------------------------------------------------------------------- /bower.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "chromatism", 3 | "description": "A simple set of utility functions for colours.", 4 | "main": "dist/chromatism.min.js", 5 | "authors": [ 6 | "Toish " 7 | ], 8 | "license": "ISC", 9 | "keywords": [ 10 | "color", 11 | "colour", 12 | "utility", 13 | "hue", 14 | "chroma", 15 | "CMYK", 16 | "RGB", 17 | "HSL" 18 | ], 19 | "homepage": "https://github.com/toish/chromatism", 20 | "moduleType": [ 21 | "globals" 22 | ], 23 | "ignore": [ 24 | "**/.*", 25 | "node_modules", 26 | "bower_components", 27 | "test", 28 | "tests" 29 | ] 30 | } 31 | -------------------------------------------------------------------------------- /chromatism/adapt.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/graypegg/chromatism/a4d8069245e73da226638c83cdfc688ed10f50af/chromatism/adapt.png -------------------------------------------------------------------------------- /chromatism/blend.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/graypegg/chromatism/a4d8069245e73da226638c83cdfc688ed10f50af/chromatism/blend.png -------------------------------------------------------------------------------- /chromatism/brightness.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/graypegg/chromatism/a4d8069245e73da226638c83cdfc688ed10f50af/chromatism/brightness.png -------------------------------------------------------------------------------- /chromatism/complementary.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/graypegg/chromatism/a4d8069245e73da226638c83cdfc688ed10f50af/chromatism/complementary.png -------------------------------------------------------------------------------- /chromatism/contrast.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/graypegg/chromatism/a4d8069245e73da226638c83cdfc688ed10f50af/chromatism/contrast.png -------------------------------------------------------------------------------- /chromatism/contrastRatio.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/graypegg/chromatism/a4d8069245e73da226638c83cdfc688ed10f50af/chromatism/contrastRatio.png -------------------------------------------------------------------------------- /chromatism/fade.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/graypegg/chromatism/a4d8069245e73da226638c83cdfc688ed10f50af/chromatism/fade.png -------------------------------------------------------------------------------- /chromatism/greyscale.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/graypegg/chromatism/a4d8069245e73da226638c83cdfc688ed10f50af/chromatism/greyscale.png -------------------------------------------------------------------------------- /chromatism/hue.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/graypegg/chromatism/a4d8069245e73da226638c83cdfc688ed10f50af/chromatism/hue.png -------------------------------------------------------------------------------- /chromatism/invert.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/graypegg/chromatism/a4d8069245e73da226638c83cdfc688ed10f50af/chromatism/invert.png -------------------------------------------------------------------------------- /chromatism/invertLightness.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/graypegg/chromatism/a4d8069245e73da226638c83cdfc688ed10f50af/chromatism/invertLightness.png -------------------------------------------------------------------------------- /chromatism/mid.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/graypegg/chromatism/a4d8069245e73da226638c83cdfc688ed10f50af/chromatism/mid.png -------------------------------------------------------------------------------- /chromatism/rainbow.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/graypegg/chromatism/a4d8069245e73da226638c83cdfc688ed10f50af/chromatism/rainbow.png -------------------------------------------------------------------------------- /chromatism/saturation.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/graypegg/chromatism/a4d8069245e73da226638c83cdfc688ed10f50af/chromatism/saturation.png -------------------------------------------------------------------------------- /chromatism/sepia.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/graypegg/chromatism/a4d8069245e73da226638c83cdfc688ed10f50af/chromatism/sepia.png -------------------------------------------------------------------------------- /chromatism/shade.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/graypegg/chromatism/a4d8069245e73da226638c83cdfc688ed10f50af/chromatism/shade.png -------------------------------------------------------------------------------- /chromatism/tetrad.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/graypegg/chromatism/a4d8069245e73da226638c83cdfc688ed10f50af/chromatism/tetrad.png -------------------------------------------------------------------------------- /chromatism/triad.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/graypegg/chromatism/a4d8069245e73da226638c83cdfc688ed10f50af/chromatism/triad.png -------------------------------------------------------------------------------- /index.d.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * Types for all available colour modes. 3 | */ 4 | export namespace ColourModes { 5 | /** 6 | * Hexadecimal Color String 7 | * @example 8 | * "#FFC837" 9 | */ 10 | export type HEX = string; 11 | 12 | /** 13 | * RGB Color Object 14 | * @example 15 | * { r:255, g: 200, b: 55 } 16 | */ 17 | export type RGB = { r: number; g: number; b: number; }; 18 | 19 | /** 20 | * CSS RGB Color String 21 | * @example 22 | * "rgb(255,200,55)" 23 | */ 24 | export type CSSRGB = string; 25 | 26 | /** 27 | * HSL Color Object 28 | * @example 29 | * { h: 44, s: 100, l: 61 } 30 | */ 31 | export type HSL = { h: number; s: number; l: number; }; 32 | 33 | /** 34 | * CSS HSL Color String 35 | * @example 36 | * "hsl(44,100,61)" 37 | */ 38 | export type CSSHSL = { h: number; s: number; l: number; }; 39 | 40 | /** 41 | * HSV Color Object 42 | * @example 43 | * { h: 44, s: 78, v: 100 } 44 | */ 45 | export type HSV = { h: number; s: number; v: number; }; 46 | 47 | /** 48 | * CMYK Color Object 49 | * @example 50 | * { c: 0.5, m: 1, y: 0.2, k: 0.45 } 51 | */ 52 | export type CMYK = { c: number; m: number; y: number; k: number; }; 53 | 54 | /** 55 | * YIQ Color Object 56 | * @example 57 | * { y: 0.132, i: 0.0222, q: 0.195 } 58 | */ 59 | export type YIQ = { y: number; i: number; q: number; }; 60 | 61 | /** 62 | * XYZ Color Object 63 | * @example 64 | * { X: 41.24, Y: 21.26, Z: 1.93 } 65 | */ 66 | export type XYZ = { X: number; Y: number; Z: number; }; 67 | 68 | /** 69 | * xyY Color Object 70 | * @example 71 | * { x: 0.64, y: 0.33, Y: 21.26 } 72 | */ 73 | export type XYY = { x: number; y: number; Y: number; }; 74 | 75 | /** 76 | * LMS Color Object 77 | * @example 78 | * { rho: 42.266, gamma: 5.561, beta: 2.135 } 79 | */ 80 | export type LMS = { rho: number; gamma: number; beta: number; }; 81 | 82 | /** 83 | * CIELAB (L*a*b*) Color Object 84 | * @example 85 | * { L: 53.23, a: 80.11, b: 67.22 } 86 | */ 87 | export type CIELAB = { L: number; a: number; b: number; }; 88 | 89 | /** 90 | * CIELUV (L*u*v*) Color Object 91 | * @example 92 | * { L: 53.23, u: 175.05, v: 37.75 } 93 | */ 94 | export type CIELUV = { L: number; u: number; v: number; }; 95 | 96 | /** 97 | * CIELCH (L*C*h*) Color Object 98 | * @example 99 | * { L: 53.23, C: 179.08, h: 12.17 } 100 | */ 101 | export type CIELCH = { L: number; C: number; h: number; }; 102 | 103 | /** 104 | * HSLuv Color Object 105 | * @example 106 | * { L: 53.23, C: 179.08, h: 12.17 } 107 | */ 108 | export type HSLUV = { hu: number; s: number; l: number; }; 109 | 110 | /** 111 | * Represents all available color modes. 112 | */ 113 | export type Any = ( 114 | HEX | RGB | CSSRGB | HSL | CSSHSL | 115 | HSV | CMYK | YIQ | XYZ | XYY | LMS | 116 | CIELAB | CIELUV | CIELCH | HSLUV 117 | ); 118 | } 119 | 120 | /** 121 | * All functions return an object containing all modes of the result. 122 | */ 123 | export type ColourObject = { 124 | hex: ColourModes.HEX; 125 | rgb: ColourModes.RGB; 126 | cssrgb: ColourModes.CSSRGB; 127 | hsl: ColourModes.HSL; 128 | csshsl: ColourModes.CSSHSL; 129 | hsv: ColourModes.HSV; 130 | cmyk: ColourModes.CMYK; 131 | yiq: ColourModes.YIQ; 132 | XYZ: ColourModes.XYZ; 133 | xyY: ColourModes.XYY; 134 | lms: ColourModes.LMS; 135 | cielab: ColourModes.CIELAB; 136 | cieluv: ColourModes.CIELUV; 137 | cielch: ColourModes.CIELCH; 138 | hsluv: ColourModes.HSLUV; 139 | }; 140 | 141 | /** 142 | * Helper type for functions that return multiple colour values. 143 | */ 144 | export type ColourObjectArray = {[P in keyof ColourObject]: ColourObject[P][]}; 145 | 146 | /** 147 | * Performs colour transformations. 148 | * @param colour - Any supported colour mode. 149 | * @returns A colour object containing all available transforms. 150 | * @see {@link https://github.com/toish/chromatism/blob/master/README.md#currency_exchange-colour-transformations} 151 | */ 152 | export function convert(colour: ColourModes.Any): ColourObject; 153 | 154 | /** 155 | * Generate a complementary colour 156 | * @param colour - Any supported colour mode. 157 | * @returns The complementary colour. 158 | * @see {@link https://github.com/toish/chromatism/blob/master/README.md#generate-a-complementary-colour} 159 | */ 160 | export function complementary(colour: ColourModes.Any): ColourObject; 161 | 162 | /** 163 | * Generate an array of triad colours 164 | * @param colour - Any supported colour mode. 165 | * @returns Array of 3 colour objects. 166 | * @see {@link https://github.com/toish/chromatism/blob/master/README.md#generate-an-array-of-triad-colours} 167 | */ 168 | export function triad(colour: ColourModes.Any): ColourObjectArray; 169 | 170 | /** 171 | * Generate an array of tetrad colours 172 | * @param colour - Any supported colour mode. 173 | * @returns Array of 4 colour objects. 174 | * @see {@link https://github.com/toish/chromatism/blob/master/README.md#generate-an-array-of-tetrad-colours} 175 | */ 176 | export function tetrad(colour: ColourModes.Any): ColourObjectArray; 177 | 178 | /** 179 | * Generate a complementary colour with uniform lightness. 180 | * @param colour - Any supported colour mode. 181 | * @returns The complementary colour. 182 | * @see {@link https://github.com/toish/chromatism/blob/master/README.md#generate-a-complementary-colour} 183 | */ 184 | export function uniformComplementary(colour: ColourModes.Any): ColourObject; 185 | 186 | /** 187 | * Generate an array of triad colours with uniform lightness. 188 | * @param colour - Any supported colour mode. 189 | * @returns Array of 3 colour objects. 190 | * @see {@link https://github.com/toish/chromatism/blob/master/README.md#generate-an-array-of-triad-colours} 191 | */ 192 | export function uniformTriad(colour: ColourModes.Any): ColourObjectArray; 193 | 194 | /** 195 | * Generate an array of tetrad colours with uniform lightness. 196 | * @param colour - Any supported colour mode. 197 | * @returns Array of 4 colour objects. 198 | * @see {@link https://github.com/toish/chromatism/blob/master/README.md#generate-an-array-of-tetrad-colours} 199 | */ 200 | export function uniformTetrad(colour: ColourModes.Any): ColourObjectArray; 201 | 202 | /** 203 | * Find the mid point between two colours 204 | * [See more]{@link https://github.com/toish/chromatism/blob/master/README.md#find-the-mid-point-between-two-colours} 205 | * @param colourOne - Any supported colour mode. 206 | * @param colourTwo - Any supported colour mode. 207 | * @returns The mid point colour. 208 | */ 209 | export function mid(colourOne: ColourModes.Any, colourTwo: ColourModes.Any): ColourObject; 210 | 211 | /** 212 | * Invert a colour 213 | * @param colour - Any supported colour mode. 214 | * @see {@link https://github.com/toish/chromatism/blob/master/README.md#invert-a-colour} 215 | * @returns The inverted colour. 216 | */ 217 | export function invert(colour: ColourModes.Any): ColourObject; 218 | 219 | /** 220 | * Invert a grey colour 221 | * @param colour - Any supported colour mode. 222 | * @returns The inverted colour. 223 | * @see {@link https://github.com/toish/chromatism/blob/master/README.md#invert-a-grey-colour} 224 | */ 225 | export function invertLightness(colour: ColourModes.Any): ColourObject; 226 | 227 | /** 228 | * Blend two colours (Multiply) 229 | * @param colourOne - Any supported colour mode. 230 | * @param colourTwo - Any supported colour mode. 231 | * @returns The blended colour. 232 | * @see {@link https://github.com/toish/chromatism/blob/master/README.md#blend-two-colours-multiply} 233 | */ 234 | export function multiply(colourOne: ColourModes.Any, colourTwo: ColourModes.Any): ColourObject; 235 | 236 | /** 237 | * Generate an array of adjacent hue-shifted colours (rainbow effect) 238 | * @param degrees - The range of hue to include (in degrees, positive or negative) 239 | * @param sections - How many adjacent colours to return. 240 | * @param colour - Any supported colour mode. 241 | * @returns An array of adjacent huge-shifted colours. 242 | * @see {@link https://github.com/toish/chromatism/blob/master/README.md#generate-an-array-of-adjacent-hue-shifted-colours-rainbow-effect} 243 | */ 244 | export function adjacent(degrees: number, sections: number, colour: ColourModes.Any): ColourObjectArray; 245 | 246 | /** 247 | * Generate an array of the fade between two colours 248 | * @param amount - The number of fade colours to return. 249 | * @param colourFrom - Any supported colour mode. 250 | * @param colourTo - Any supported colour mode. 251 | * @returns An array containing the colour fade. 252 | * @see {@link https://github.com/toish/chromatism/blob/master/README.md#generate-an-array-of-the-fade-between-two-colours} 253 | */ 254 | export function fade(amount: number, colourFrom: ColourModes.Any, colourTo: ColourModes.Any): ColourObjectArray; 255 | 256 | /** 257 | * Generate a new shade of a colour 258 | * @param percent - A number between -100 and 100 259 | * @param colour - Any supported colour mode. 260 | * @returns The colour shade 261 | * @see {@link https://github.com/toish/chromatism/blob/master/README.md#generate-a-new-shade-of-a-colour} 262 | */ 263 | export function shade(percent: number, colour: ColourModes.Any): ColourObject; 264 | 265 | /** 266 | * Generate a new saturation of a colour 267 | * @param percent - A number between -100 and 100 268 | * @param colour - Any supported colour mode. 269 | * @returns The new saturation of colour. 270 | * @see {@link https://github.com/toish/chromatism/blob/master/README.md#generate-a-new-saturation-of-a-colour} 271 | */ 272 | export function saturation(percent: number, colour: ColourModes.Any): ColourObject; 273 | 274 | /** 275 | * Change colour's brightness 276 | * @param percent - A number between -100 and 100 277 | * @param colour - Any supported colour mode. 278 | * @returns The new colour. 279 | * @see {@link https://github.com/toish/chromatism/blob/master/README.md#change-colours-brightness} 280 | */ 281 | export function brightness(percent: number, colour: ColourModes.Any): ColourObject; 282 | 283 | /** 284 | * Shift the hue of a colour 285 | * @param degrees - The degree of hue to shift by (in degrees, positive or negative) 286 | * @param colour - Any supported colour mode. 287 | * @returns The new colour. 288 | * @see {@link https://github.com/toish/chromatism/blob/master/README.md#shift-the-hue-of-a-colour} 289 | */ 290 | export function hue(degrees: number, colour: ColourModes.Any): ColourObject; 291 | 292 | /** 293 | * Shift the contrast of a colour 294 | * @param contrastCoeff - A decimal value, normally between 0 and 4 295 | * @param colour - Any supported colour mode. 296 | * @returns The shifted contrast colour. 297 | * @see {@link https://github.com/toish/chromatism/blob/master/README.md#shift-the-contrast-of-a-colour} 298 | */ 299 | export function contrast(contrastCoeff: number, colour: ColourModes.Any): ColourObject; 300 | 301 | /** 302 | * Greyscale version of the colour 303 | * @param colour - Any supported colour mode. 304 | * @returns The greyscale colour 305 | * @see {@link https://github.com/toish/chromatism/blob/master/README.md#greyscale-version-of-the-colour} 306 | */ 307 | export function greyscale(colour: ColourModes.Any): ColourObject; 308 | 309 | /** 310 | * Sepia version of the colour 311 | * @param colour - Any supported colour mode. 312 | * @returns The sepia version of the colour 313 | * @see {@link https://github.com/toish/chromatism/blob/master/README.md#sepia-version-of-the-colour} 314 | */ 315 | export function sepia(colour: ColourModes.Any): ColourObject; 316 | 317 | /** 318 | * Determine accessible colour for foreground text 319 | * @param colour - Any supported colour mode. 320 | * @returns The accessible foreground colour 321 | * @see {@link https://github.com/toish/chromatism/blob/master/README.md#determine-accessible-colour-for-foreground-text} 322 | */ 323 | export function contrastRatio(colour: ColourModes.Any): ColourObject; 324 | 325 | /** 326 | * Chromatic Adaptation (White point) 327 | * @param colour - Any supported colour mode. 328 | * @param illuminantColour - A value from the {@ILLUMINANTS} constant 329 | * @param sourceIlluminant [{ColourModes.XYZ}] - optional, assumed D65 330 | * @returns The illuminant shifted colour 331 | * @see {@link https://github.com/toish/chromatism/blob/master/README.md#chromatic-adaptation-white-point} 332 | */ 333 | export function adapt(colour: ColourModes.Any, illuminantColour: ColourModes.Any, sourceIlluminant?: ColourModes.Any): ColourObject; 334 | 335 | /** 336 | * Colour Difference 337 | * @param colourOne - Any supported colour mode. 338 | * @param colourTwo - Any supported colour mode. 339 | * @param luminanceWeight [1] - optional 340 | * @param chromaWeight [1] - optional 341 | * @returns A measure of how different the two supplied colours are. 342 | * @see {@link https://github.com/toish/chromatism/blob/master/README.md#colour-difference} 343 | */ 344 | export function difference(colourOne: ColourModes.Any, colourTwo: ColourModes.Any, luminanceWeight?: number, chromaWeight?: number): number; 345 | 346 | /** 347 | * Colour Temperature 348 | * @param colour - Any supported colour mode. 349 | * @returns The correlated colour temperature of the supplied colour. 350 | * @see {@link https://github.com/toish/chromatism/blob/master/README.md#colour-temperature} 351 | */ 352 | export function temperature(colour: ColourModes.Any): number; 353 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "chromatism", 3 | "version": "3.0.0", 4 | "description": "A simple set of utility functions for colours.", 5 | "main": "dist/chromatism.umd.js", 6 | "module": "src/operations/index.js", 7 | "typings": "./index.d.ts", 8 | "repository": "toish/chromatism", 9 | "scripts": { 10 | "test": "BABEL_ENV=test mocha --compilers js:babel-core/register", 11 | "lint": "standard \"src/**/*.js\" \"test/**/*.js\"", 12 | "build": "rollup -c", 13 | "format": "standard --fix \"src/**/*.js\" \"test/**/*.js\"" 14 | }, 15 | "keywords": [ 16 | "color", 17 | "colour", 18 | "utility", 19 | "hue", 20 | "chroma", 21 | "CMYK", 22 | "RGB", 23 | "HSL" 24 | ], 25 | "author": "Toish ", 26 | "license": "ISC", 27 | "dependencies": {}, 28 | "devDependencies": { 29 | "babel-core": "6.25.0", 30 | "babel-plugin-external-helpers": "^6.22.0", 31 | "babel-preset-env": "^1.5.2", 32 | "mocha": "^3.2.0", 33 | "rollup": "^0.41.6", 34 | "rollup-plugin-babel": "^2.7.1", 35 | "rollup-plugin-commonjs": "^8.0.2", 36 | "rollup-plugin-node-resolve": "^3.0.0", 37 | "rollup-plugin-uglify": "^2.0.1", 38 | "standard": "10.0.2", 39 | "uglify-es": "3.0.19" 40 | }, 41 | "false": {}, 42 | "browserslist": [ 43 | "ie >= 9", 44 | "last 2 versions" 45 | ] 46 | } 47 | -------------------------------------------------------------------------------- /rollup.config.js: -------------------------------------------------------------------------------- 1 | import resolve from 'rollup-plugin-node-resolve' 2 | import commonjs from 'rollup-plugin-commonjs' 3 | import babel from 'rollup-plugin-babel' 4 | import uglify from 'rollup-plugin-uglify' 5 | import { minify } from 'uglify-es' 6 | 7 | const pkg = require('./package.json') 8 | 9 | export default { 10 | entry: pkg.module, 11 | moduleName: 'chromatism', 12 | plugins: [ 13 | commonjs(), 14 | resolve(), 15 | babel(), 16 | uglify({}, minify) 17 | ], 18 | targets: [ 19 | { dest: pkg.main, format: 'umd' }, 20 | ] 21 | } 22 | -------------------------------------------------------------------------------- /src/constants/illuminants.js: -------------------------------------------------------------------------------- 1 | export default { 2 | // From ASTM E308-01 3 | A: { X: 1.09850 * 100, Y: 1.00000 * 100, Z: 0.35585 * 100 }, 4 | 5 | // From Wyszecki & Stiles, p. 769 6 | B: { X: 0.99072 * 100, Y: 1.00000 * 100, Z: 0.85223 * 100 }, 7 | 8 | // From ASTM E308-01 9 | C: { X: 0.98074 * 100, Y: 1.00000 * 100, Z: 1.18232 * 100 }, 10 | 11 | // From ASTM E308-01 12 | D50: { X: 0.96422 * 100, Y: 1.00000 * 100, Z: 0.82521 * 100 }, 13 | 14 | // From ASTM E308-01 15 | D55: { X: 0.95682 * 100, Y: 1.00000 * 100, Z: 0.92149 * 100 }, 16 | 17 | // From ASTM E308-01 18 | D65: { X: 0.95047 * 100, Y: 1.00000 * 100, Z: 1.08883 * 100 }, 19 | 20 | // From ASTM E308-01 21 | D75: { X: 0.94972 * 100, Y: 1.00000 * 100, Z: 1.22638 * 100 }, 22 | 23 | // From ASTM E308-01 24 | E: { X: 1.00000 * 100, Y: 1.00000 * 100, Z: 1.00000 * 100 }, 25 | 26 | // From ASTM E308-01 27 | F2: { X: 0.99186 * 100, Y: 1.00000 * 100, Z: 0.67393 * 100 }, 28 | 29 | // From ASTM E308-01 30 | F7: { X: 0.95041 * 100, Y: 1.00000 * 100, Z: 1.08747 * 100 }, 31 | 32 | // From ASTM E308-01 33 | F11: { X: 1.00962 * 100, Y: 1.00000 * 100, Z: 0.64350 * 100 } 34 | } 35 | -------------------------------------------------------------------------------- /src/constants/transforms.js: -------------------------------------------------------------------------------- 1 | export default { 2 | BRADFORD: [ 3 | [ 0.8951000, 0.2664000, -0.1614000 ], 4 | [ -0.7502000, 1.7135000, 0.0367000 ], 5 | [ 0.0389000, -0.0685000, 1.0296000 ] 6 | ], 7 | INVERSE_BRADFORD: [ 8 | [ 0.9869929, -0.1470543, 0.1599627 ], 9 | [ 0.4323053, 0.5183603, 0.0492912 ], 10 | [ -0.0085287, 0.0400428, 0.9684867 ] 11 | ], 12 | SRGB_XYZ: [ 13 | [ 0.4124, 0.3576, 0.1805 ], 14 | [ 0.2126, 0.7152, 0.0722 ], 15 | [ 0.0193, 0.1192, 0.9505 ] 16 | ], 17 | INVERSE_SRGB_XYZ: [ 18 | [ 3.2406, -1.5372, -0.4986 ], 19 | [ -0.9689, 1.8758, 0.0415 ], 20 | [ 0.0557, -0.2040, 1.0570 ] 21 | ] 22 | } 23 | -------------------------------------------------------------------------------- /src/conversions/XYZ.js: -------------------------------------------------------------------------------- 1 | import getIlluminant from '../helpers/get-illuminant' 2 | import getTransform from '../helpers/get-transform' 3 | import boundedRgb from '../helpers/bounded-rgb' 4 | import cubeRoot from '../helpers/cube-root' 5 | 6 | const epsilon = 0.008856 7 | const kappa = 903.3 8 | const white = getIlluminant('D65') 9 | 10 | export default { 11 | rgb: value => { 12 | let normalized = [ value.X, value.Y, value.Z ].map((v) => v / 100) 13 | 14 | // Observer is 2° 15 | // Whitepoint is D65 16 | // sRGB standard stuff eh! 17 | // [ Shamelessly stolen off Wikipedia ] 18 | let M = getTransform('INVERSE_SRGB_XYZ') 19 | 20 | let linear = M.map((m) => { 21 | return normalized.reduce((acc, v, key) => { 22 | return (m[key] * v) + acc 23 | }, 0) 24 | }) 25 | 26 | let [ r, g, b ] = linear.map((C) => { 27 | if (C <= 0.0031308) { 28 | return C * 12.92 29 | } 30 | return 1.055 * Math.pow(C, 1 / 2.4) - 0.055 31 | }).map((o) => o * 255) 32 | 33 | return boundedRgb({ r, g, b }) 34 | }, 35 | 36 | lms: value => { 37 | let valueArray = [ value.X, value.Y, value.Z ].map((x) => x / 100) 38 | 39 | // Bradford Transformation 40 | let Mb = getTransform('BRADFORD') 41 | 42 | let resultArray = Mb.map((m) => { 43 | return valueArray.reduce((acc, v, key) => { 44 | return (m[key] * v) + acc 45 | }, 0) 46 | }) 47 | 48 | return { 49 | rho: resultArray[0], 50 | gamma: resultArray[1], 51 | beta: resultArray[2] 52 | } 53 | }, 54 | 55 | cielab: value => { 56 | const Xr = value.X / white.X 57 | const Yr = value.Y / white.Y 58 | const Zr = value.Z / white.Z 59 | 60 | const toF = (x) => x > epsilon ? cubeRoot(x) : (kappa * x + 16) / 116 61 | const Fx = toF(Xr) 62 | const Fy = toF(Yr) 63 | const Fz = toF(Zr) 64 | 65 | return { 66 | L: ((116 * Fy) - 16), 67 | a: 500 * (Fx - Fy), 68 | b: 200 * (Fy - Fz) 69 | } 70 | }, 71 | 72 | cieluv: value => { 73 | const yr = value.Y / white.Y 74 | 75 | const L = (yr > epsilon ? (116 * cubeRoot(yr)) - 16 : kappa * yr) 76 | 77 | const chromeCoordsU = (c) => (c.X * 4) / (c.X + (15 * c.Y) + (3 * c.Z)) 78 | const chromeCoordsV = (c) => (c.Y * 9) / (c.X + (15 * c.Y) + (3 * c.Z)) 79 | 80 | const u = 13 * L * (chromeCoordsU(value) - chromeCoordsU(white)) 81 | const v = 13 * L * (chromeCoordsV(value) - chromeCoordsV(white)) 82 | 83 | return { 84 | L, 85 | u, 86 | v 87 | } 88 | }, 89 | 90 | xyY: value => { 91 | const x = value.X / (value.X + value.Y + value.Z) 92 | const y = value.Y / (value.X + value.Y + value.Z) 93 | 94 | return { 95 | x, 96 | y, 97 | Y: value.Y 98 | } 99 | } 100 | } 101 | -------------------------------------------------------------------------------- /src/conversions/cielab.js: -------------------------------------------------------------------------------- 1 | import getIlluminant from '../helpers/get-illuminant' 2 | 3 | const epsilon = 0.008856 4 | const kappa = 903.3 5 | const white = getIlluminant('D65') 6 | const toR = f => Math.pow(f, 3) > epsilon ? Math.pow(f, 3) : ((116 * f) - 16) / kappa 7 | 8 | export default { 9 | XYZ: value => { 10 | const Fy = (value.L + 16) / 116 11 | const Fx = (value.a / 500) + Fy 12 | const Fz = Fy - (value.b / 200) 13 | 14 | const Xr = toR(Fx) 15 | const Zr = toR(Fz) 16 | const Yr = value.L > (kappa * epsilon) ? Math.pow(Fy, 3) : value.L / kappa 17 | 18 | return { 19 | X: Xr * white.X, 20 | Y: Yr * white.Y, 21 | Z: Zr * white.Z 22 | } 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /src/conversions/cielch.js: -------------------------------------------------------------------------------- 1 | import toRadian from '../helpers/to-radian' 2 | import getTransform from '../helpers/get-transform' 3 | 4 | export default { 5 | cieluv: value => { 6 | const h = toRadian(value.h) 7 | 8 | const u = value.C * Math.cos(h) 9 | const v = value.C * Math.sin(h) 10 | 11 | return { 12 | L: value.L, 13 | u, 14 | v 15 | } 16 | }, 17 | 18 | hsluv: value => { 19 | if (value.L > 99.9999999) { 20 | return { hu: value.h, s: 0, l: 100 } 21 | } 22 | if (value.L < 0.00000001) { 23 | return { hu: value.h, s: 0, l: 0 } 24 | } 25 | 26 | const epsilon = 0.008856 27 | const kappa = 903.3 28 | 29 | const s1 = (value.L + 16) / 1560896 30 | const s2 = s1 > epsilon ? s1 : value.L / kappa 31 | 32 | const m = getTransform('INVERSE_SRGB_XYZ') 33 | let rays = [] 34 | 35 | for (let c = 0; c < 3; c++) { 36 | let m1 = m[c][0] 37 | let m2 = m[c][1] 38 | let m3 = m[c][2] 39 | 40 | for (let t = 0; t < 2; t++) { 41 | let top1 = (284517 * m1 - 94839 * m3) * s2 42 | let top2 = (838422 * m3 + 769860 * m2 + 731718 * m1) * value.L * s2 - 769860 * t * value.L 43 | let bottom = (632260 * m3 - 126452 * m2) * s2 + 126452 * t 44 | 45 | rays.push({ 46 | m: top1 / bottom, 47 | b: top2 / bottom 48 | }) 49 | } 50 | } 51 | 52 | var min = Number.MAX_VALUE 53 | let hrad = toRadian(value.h) 54 | 55 | rays.forEach((ray) => { 56 | let length = ray.b / (Math.sin(hrad) - ray.m * Math.cos(hrad)) 57 | if (length >= 0) { 58 | min = Math.min(min, length) 59 | } 60 | }) 61 | 62 | let max = min 63 | 64 | return { 65 | hu: value.h, 66 | s: value.C / max * 100, 67 | l: value.L 68 | } 69 | } 70 | } 71 | -------------------------------------------------------------------------------- /src/conversions/cieluv.js: -------------------------------------------------------------------------------- 1 | import getIlluminant from '../helpers/get-illuminant' 2 | import toDegree from '../helpers/to-degree' 3 | 4 | export default { 5 | XYZ: value => { 6 | const epsilon = 0.008856 7 | const kappa = 903.3 8 | const white = getIlluminant('D65') 9 | 10 | const chromeCoordsU = (c) => (c.X * 4) / (c.X + (15 * c.Y) + (3 * c.Z)) 11 | const chromeCoordsV = (c) => (c.Y * 9) / (c.X + (15 * c.Y) + (3 * c.Z)) 12 | 13 | const u0 = chromeCoordsU(white) 14 | const v0 = chromeCoordsV(white) 15 | 16 | const a = (1 / 3) * (((52 * value.L) / (value.u + ((13 * value.L) * u0))) - 1) 17 | 18 | const Y = value.L > (kappa * epsilon) ? (Math.pow(((value.L + 16) / 116), 3)) : value.L / kappa 19 | 20 | const b = -5 * Y 21 | const d = Y * (((39 * value.L) / (value.v + ((13 * value.L) * v0))) - 5) 22 | 23 | const X = (d - b) / (a - (-1 / 3)) 24 | const Z = (X * a) + b 25 | 26 | return { 27 | X: X * 100, 28 | Y: Y * 100, 29 | Z: Z * 100 30 | } 31 | }, 32 | 33 | cielch: value => { 34 | const C = Math.sqrt(Math.pow(value.u, 2) + Math.pow(value.v, 2)) 35 | let h = Math.atan2(value.v, value.u) 36 | if (h < 0) { 37 | h += (2 * Math.PI) 38 | } 39 | h = toDegree(h) 40 | 41 | return { 42 | L: value.L, 43 | C, 44 | h 45 | } 46 | } 47 | } 48 | -------------------------------------------------------------------------------- /src/conversions/cmyk.js: -------------------------------------------------------------------------------- 1 | const rgb = value => { 2 | var r = 255 * (1 - value.c) * (1 - value.k) 3 | var g = 255 * (1 - value.m) * (1 - value.k) 4 | var b = 255 * (1 - value.y) * (1 - value.k) 5 | return { r: r, g: g, b: b } 6 | } 7 | 8 | export default { 9 | rgb, 10 | 11 | cssrgb: value => { 12 | const { r, g, b } = rgb(value) 13 | 14 | return 'rgb(' + Math.round(r) + ',' + Math.round(g) + ',' + Math.round(b) + ')' 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /src/conversions/csshsl.js: -------------------------------------------------------------------------------- 1 | export default { 2 | hsl: value => { 3 | const values = value 4 | .replace(/(hsl\(|\)|%|[\s]*)/g, '') 5 | .split(',') 6 | .map(value => parseInt(value, 10)) 7 | 8 | return { 9 | h: values[0], 10 | s: values[1], 11 | l: values[2] 12 | } 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /src/conversions/cssrgb.js: -------------------------------------------------------------------------------- 1 | export default { 2 | rgb: value => { 3 | const values = value 4 | .replace(/((rgb\(|\))|[\s]*)/g, '') 5 | .split(',') 6 | .map(value => parseInt(value, 10)) 7 | 8 | return { 9 | r: values[0], 10 | g: values[1], 11 | b: values[2] 12 | } 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /src/conversions/hex.js: -------------------------------------------------------------------------------- 1 | export default { 2 | rgb: value => { 3 | const values = value 4 | .replace('#', '') 5 | .match(/.{2}/g) 6 | .map(value => parseInt(value, 16)) 7 | 8 | return { 9 | r: values[0], 10 | g: values[1], 11 | b: values[2] 12 | } 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /src/conversions/hsl.js: -------------------------------------------------------------------------------- 1 | import negativeModulo from '../helpers/negative-modulo' 2 | 3 | export default { 4 | rgb: value => { 5 | if (value.s === 0) { 6 | var grey = (value.l / 100) * 255 7 | return { 8 | r: grey, 9 | g: grey, 10 | b: grey 11 | } 12 | } else { 13 | var tempOne, tempTwo, tempHue 14 | if (value.l >= 50) { 15 | tempOne = ((value.l / 100) + (value.s / 100)) - ((value.l / 100) * (value.s / 100)) 16 | } else { 17 | tempOne = (value.l / 100) * (1 + (value.s / 100)) 18 | } 19 | tempTwo = (2 * (value.l / 100)) - tempOne 20 | tempHue = value.h / 360 21 | var tempR = (tempHue + 0.333) % 1 22 | var tempG = tempHue 23 | var tempB = negativeModulo((tempHue - 0.333), 1) 24 | var r, g, b 25 | if ((6 * tempR) < 1) { 26 | r = tempTwo + ((tempOne - tempTwo) * 6 * tempR) 27 | } else if ((2 * tempR) < 1) { 28 | r = tempOne 29 | } else if ((3 * tempR) < 2) { 30 | r = tempTwo + ((tempOne - tempTwo) * ((0.666 - tempR) * 6)) 31 | } else { 32 | r = tempTwo 33 | } 34 | if ((6 * tempG) < 1) { 35 | g = tempTwo + ((tempOne - tempTwo) * 6 * tempG) 36 | } else if ((2 * tempG) < 1) { 37 | g = tempOne 38 | } else if ((3 * tempG) < 2) { 39 | g = tempTwo + ((tempOne - tempTwo) * ((0.666 - tempG) * 6)) 40 | } else { 41 | g = tempTwo 42 | } 43 | if ((6 * tempB) < 1) { 44 | b = tempTwo + ((tempOne - tempTwo) * 6 * tempB) 45 | } else if ((2 * tempB) < 1) { 46 | b = tempOne 47 | } else if ((3 * tempB) < 2) { 48 | b = tempTwo + ((tempOne - tempTwo) * ((0.666 - tempB) * 6)) 49 | } else { 50 | b = tempTwo 51 | } 52 | if (r < 0) { 53 | r = 0 54 | } 55 | if (g < 0) { 56 | g = 0 57 | } 58 | if (b < 0) { 59 | b = 0 60 | } 61 | return { 62 | r: r * 255, 63 | g: g * 255, 64 | b: b * 255 65 | } 66 | } 67 | }, 68 | 69 | csshsl: value => 'hsl(' + Math.round(value.h) + ',' + Math.round(value.s) + '%,' + Math.round(value.l) + '%)', 70 | 71 | hsv: value => { 72 | const normalized = Object.assign({}, value, { 73 | s: value.s / 100, 74 | l: value.l / 100 75 | }) 76 | var luminence = normalized.s * (normalized.l < 0.5 ? normalized.l : 1 - normalized.l) 77 | 78 | var h = normalized.h 79 | var s = (2 * luminence) / (normalized.l + luminence) 80 | var v = normalized.l + luminence 81 | 82 | return { h: h, s: s * 100, v: v * 100 } 83 | } 84 | } 85 | -------------------------------------------------------------------------------- /src/conversions/hsluv.js: -------------------------------------------------------------------------------- 1 | import getTransform from '../helpers/get-transform' 2 | import toRadian from '../helpers/to-radian' 3 | 4 | export default { 5 | cielch: value => { 6 | if (value.L > 99.9999999) { 7 | return { L: 100, C: 0, h: value.hu } 8 | } 9 | if (value.L < 0.00000001) { 10 | return { L: 0, C: 0, h: value.hu } 11 | } 12 | 13 | const epsilon = 0.008856 14 | const kappa = 903.3 15 | 16 | const s1 = (value.l + 16) / 1560896 17 | const s2 = s1 > epsilon ? s1 : value.l / kappa 18 | 19 | const m = getTransform('INVERSE_SRGB_XYZ') 20 | let rays = [] 21 | 22 | for (let c = 0; c < 3; c++) { 23 | let m1 = m[c][0] 24 | let m2 = m[c][1] 25 | let m3 = m[c][2] 26 | 27 | for (let t = 0; t < 2; t++) { 28 | let top1 = (284517 * m1 - 94839 * m3) * s2 29 | let top2 = (838422 * m3 + 769860 * m2 + 731718 * m1) * value.l * s2 - 769860 * t * value.l 30 | let bottom = (632260 * m3 - 126452 * m2) * s2 + 126452 * t 31 | 32 | rays.push({ 33 | m: top1 / bottom, 34 | b: top2 / bottom 35 | }) 36 | } 37 | } 38 | 39 | var min = Number.MAX_VALUE 40 | let hrad = toRadian(value.hu) 41 | 42 | rays.forEach((ray) => { 43 | let length = ray.b / (Math.sin(hrad) - ray.m * Math.cos(hrad)) 44 | if (length >= 0) { 45 | min = Math.min(min, length) 46 | } 47 | }) 48 | 49 | let max = min 50 | 51 | return { 52 | L: value.l, 53 | C: max / 100 * value.s, 54 | h: value.hu 55 | } 56 | } 57 | } 58 | -------------------------------------------------------------------------------- /src/conversions/hsv.js: -------------------------------------------------------------------------------- 1 | export default { 2 | hsl: value => { 3 | const normalized = Object.assign({}, value, { 4 | h: value.h / 360, 5 | s: value.s / 100, 6 | v: value.v / 100 7 | }) 8 | 9 | let h = normalized.h 10 | let s 11 | if ((2 - normalized.s) * normalized.v < 1) { 12 | s = normalized.s * normalized.v / ((2 - normalized.s) * normalized.v) 13 | } else { 14 | s = normalized.s * normalized.v / (2 - (2 - normalized.s) * normalized.v) 15 | } 16 | let l = ((2 - normalized.s) * normalized.v) / 2 17 | return { h: h * 360, s: s * 100, l: l * 100 } 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /src/conversions/index.js: -------------------------------------------------------------------------------- 1 | export { default as cielab } from './cielab' 2 | export { default as cielch } from './cielch' 3 | export { default as cieluv } from './cieluv' 4 | export { default as cmyk } from './cmyk' 5 | export { default as csshsl } from './csshsl' 6 | export { default as cssrgb } from './cssrgb' 7 | export { default as hex } from './hex' 8 | export { default as hsl } from './hsl' 9 | export { default as hsluv } from './hsluv' 10 | export { default as hsv } from './hsv' 11 | export { default as lms } from './lms' 12 | export { default as rgb } from './rgb' 13 | export { default as xyY } from './xyY' 14 | export { default as XYZ } from './XYZ' 15 | export { default as yiq } from './yiq' 16 | -------------------------------------------------------------------------------- /src/conversions/lms.js: -------------------------------------------------------------------------------- 1 | import getTransform from '../helpers/get-transform' 2 | 3 | export default { 4 | XYZ: value => { 5 | const valueArray = [ value.rho, value.gamma, value.beta ] 6 | 7 | // Inverse Bradford Transformation 8 | const Mbi = getTransform('INVERSE_BRADFORD') 9 | 10 | const resultArray = Mbi.map((m) => { 11 | return valueArray.reduce((acc, v, key) => { 12 | return (m[key] * v) + acc 13 | }, 0) 14 | }) 15 | 16 | return { 17 | X: resultArray[0] * 100, 18 | Y: resultArray[1] * 100, 19 | Z: resultArray[2] * 100 20 | } 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /src/conversions/rgb.js: -------------------------------------------------------------------------------- 1 | import getTransform from '../helpers/get-transform' 2 | import bounded from '../helpers/bounded' 3 | import fromXYZ from './XYZ' 4 | 5 | const { 6 | lms: fromXYZTolms, 7 | cielab: fromXYZTocielab, 8 | cieluv: fromXYZTocieluv, 9 | xyY: fromXYZToxyY 10 | } = fromXYZ 11 | 12 | const hsl = value => { 13 | var r = value['r'] / 255 14 | var g = value['g'] / 255 15 | var b = value['b'] / 255 16 | var rgbOrdered = [ r, g, b ].sort() 17 | var l = ((rgbOrdered[0] + rgbOrdered[2]) / 2) * 100 18 | var s, h 19 | if (rgbOrdered[0] === rgbOrdered[2]) { 20 | s = 0 21 | h = 0 22 | } else { 23 | if (l >= 50) { 24 | s = ((rgbOrdered[2] - rgbOrdered[0]) / ((2.0 - rgbOrdered[2]) - rgbOrdered[0])) * 100 25 | } else { 26 | s = ((rgbOrdered[2] - rgbOrdered[0]) / (rgbOrdered[2] + rgbOrdered[0])) * 100 27 | } 28 | if (rgbOrdered[2] === r) { 29 | h = ((g - b) / (rgbOrdered[2] - rgbOrdered[0])) * 60 30 | } else if (rgbOrdered[2] === g) { 31 | h = (2 + ((b - r) / (rgbOrdered[2] - rgbOrdered[0]))) * 60 32 | } else { 33 | h = (4 + ((r - g) / (rgbOrdered[2] - rgbOrdered[0]))) * 60 34 | } 35 | if (h < 0) { 36 | h += 360 37 | } else if (h > 360) { 38 | h = h % 360 39 | } 40 | } 41 | 42 | return { 43 | h: h, 44 | s: s, 45 | l: l 46 | } 47 | } 48 | 49 | const cieluv = value => fromXYZTocieluv(XYZ(value)) 50 | 51 | const XYZ = value => { 52 | let normalized = [ value.r, value.g, value.b ].map((v) => v / 255) 53 | 54 | let linear = normalized.map((V) => { 55 | if (V <= 0.04045) { 56 | return V / 12.92 57 | } 58 | return Math.pow(((V + 0.055) / 1.055), 2.4) 59 | }) 60 | 61 | // Observer is 2° 62 | // Whitepoint is D65 63 | // sRGB standard stuff eh! 64 | // [ Shamelessly stolen off Wikipedia ] 65 | let M = getTransform('SRGB_XYZ') 66 | 67 | let [ X, Y, Z ] = M.map((m) => { 68 | return linear.reduce((acc, v, key) => { 69 | return (m[key] * v) + acc 70 | }, 0) 71 | }).map((o) => o * 100) 72 | 73 | return { X, Y, Z } 74 | } 75 | 76 | export default { 77 | hex: value => { 78 | var r = Math.round(value['r']).toString(16) 79 | if (r.length === 1) { 80 | r = '0' + r 81 | } 82 | var g = Math.round(value['g']).toString(16) 83 | if (g.length === 1) { 84 | g = '0' + g 85 | } 86 | var b = Math.round(value['b']).toString(16) 87 | if (b.length === 1) { 88 | b = '0' + b 89 | } 90 | return '#' + r + g + b 91 | }, 92 | 93 | cssrgb: value => 'rgb(' + Math.round(value['r']) + ',' + Math.round(value['g']) + ',' + Math.round(value['b']) + ')', 94 | 95 | hsl, 96 | 97 | csshsl: value => { 98 | var { h, s, l } = hsl(value) 99 | return 'hsl(' + Math.round(h) + ',' + Math.round(s) + '%,' + Math.round(l) + '%)' 100 | }, 101 | 102 | cmyk: value => { 103 | var tempR = value['r'] / 255 104 | var tempG = value['g'] / 255 105 | var tempB = value['b'] / 255 106 | var k = 1 - (Math.max(tempR, tempG, tempB)) 107 | if (k !== 1) { 108 | return { 109 | c: ((1 - tempR) - k) / (1 - k), 110 | m: ((1 - tempG) - k) / (1 - k), 111 | y: ((1 - tempB) - k) / (1 - k), 112 | k 113 | } 114 | } else { 115 | return { 116 | c: 0, 117 | m: 0, 118 | y: 0, 119 | k 120 | } 121 | } 122 | }, 123 | 124 | yiq: value => { 125 | var y = (0.299 * (value.r / 255)) + (0.587 * (value.g / 255)) + (0.114 * (value.b / 255)) 126 | var i = (0.596 * (value.r / 255)) + (-0.274 * (value.g / 255)) + (-0.322 * (value.b / 255)) 127 | var q = (0.211 * (value.r / 255)) + (-0.523 * (value.g / 255)) + (0.312 * (value.b / 255)) 128 | /* YIQ is not a transformation of RGB, so it's pretty lossy */ 129 | i = bounded(i, [ -0.5957, 0.5957 ]) 130 | q = bounded(q, [ -0.5226, 0.5226 ]) 131 | return { y, i, q } 132 | }, 133 | 134 | XYZ, 135 | 136 | lms: value => fromXYZTolms(XYZ(value)), 137 | cielab: value => fromXYZTocielab(XYZ(value)), 138 | cieluv, 139 | xyY: value => fromXYZToxyY(XYZ(value)) 140 | 141 | } 142 | -------------------------------------------------------------------------------- /src/conversions/xyY.js: -------------------------------------------------------------------------------- 1 | export default { 2 | XYZ: value => { 3 | const { x, y, Y } = value 4 | const X = (Y / y) * x 5 | const Z = (Y / y) * ((1 - x) - y) 6 | 7 | return { 8 | X, 9 | Y, 10 | Z 11 | } 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /src/conversions/yiq.js: -------------------------------------------------------------------------------- 1 | import bounded from '../helpers/bounded' 2 | 3 | const bound = v => bounded(v, [ 0, 255 ]) 4 | 5 | export default { 6 | rgb: value => { 7 | const i = bounded(value.i, [ -0.5957, 0.5957 ]) 8 | const q = bounded(value.q, [ -0.5226, 0.5226 ]) 9 | 10 | const r = 255 * bound(value.y + (0.956 * i) + (0.621 * q)) 11 | const g = 255 * bound(value.y + (-0.272 * i) + (-0.647 * q)) 12 | const b = 255 * bound(value.y + (-1.106 * i) + (-1.703 * q)) 13 | 14 | return { r, g, b } 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /src/helpers/bounded-rgb.js: -------------------------------------------------------------------------------- 1 | import bounded from './bounded' 2 | 3 | const bounded255 = val => bounded(val, [ 0, 255 ]) 4 | 5 | export default function boundedRgb (rgb) { 6 | return { 7 | r: bounded255(rgb.r), 8 | g: bounded255(rgb.g), 9 | b: bounded255(rgb.b) 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /src/helpers/bounded.js: -------------------------------------------------------------------------------- 1 | export default function bounded (val, range) { 2 | if (val < range[0]) { 3 | val = range[0] 4 | } else if (val > range[1]) { 5 | val = range[1] 6 | } 7 | return val 8 | } 9 | -------------------------------------------------------------------------------- /src/helpers/convert-to-type.js: -------------------------------------------------------------------------------- 1 | import determineType from './determine-type' 2 | import * as conversions from '../conversions' 3 | 4 | const conversionSteps = { 5 | rgb: { 6 | default: 'XYZ', 7 | csshsl: 'hsl', 8 | hsv: 'hsl' 9 | }, 10 | hex: 'rgb', 11 | hsl: 'rgb', 12 | hsv: 'hsl', 13 | csshsl: 'hsl', 14 | cssrgb: 'rgb', 15 | cmyk: 'rgb', 16 | XYZ: { 17 | default: 'rgb', 18 | cielch: 'cieluv', 19 | hsluv: 'cieluv' 20 | }, 21 | xyY: 'XYZ', 22 | lms: 'XYZ', 23 | cieluv: { 24 | default: 'XYZ', 25 | hsluv: 'cielch' 26 | }, 27 | cielch: 'cieluv', 28 | cielab: 'XYZ', 29 | yiq: 'rgb', 30 | hsluv: 'cielch' 31 | } 32 | 33 | export default function convert (toType, value, currentType) { 34 | if (value === undefined) { 35 | throw new Error('No value provided') 36 | } 37 | 38 | const fromType = currentType || determineType(value) 39 | 40 | if (fromType === toType) { 41 | return value 42 | } 43 | 44 | if (conversions[fromType][toType]) { 45 | return convertNow(fromType, toType, value) 46 | } 47 | 48 | const possibleSteps = conversionSteps[fromType] 49 | const nextStepType = typeof possibleSteps === 'string' 50 | ? possibleSteps 51 | : (possibleSteps[toType] || possibleSteps.default) 52 | 53 | const convertedToNextStep = convertNow(fromType, nextStepType, value) 54 | return convert(toType, convertedToNextStep, nextStepType) 55 | } 56 | 57 | const convertNow = (fromType, toType, value) => conversions[fromType][toType](value) 58 | -------------------------------------------------------------------------------- /src/helpers/cube-root.js: -------------------------------------------------------------------------------- 1 | export default function cubeRoot (x) { 2 | if (!Math.cbrt) { 3 | var y = Math.pow(Math.abs(x), 1 / 3) 4 | return x < 0 ? -y : y 5 | } else { 6 | return Math.cbrt(x) 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /src/helpers/determine-type.js: -------------------------------------------------------------------------------- 1 | import colorTypeTests from './test-color-type' 2 | 3 | const types = Object.keys(colorTypeTests) 4 | 5 | export default function determineType (colour) { 6 | const type = types.find(type => colorTypeTests[type](colour)) 7 | 8 | if (!type) { 9 | throw new Error('No type found for color ' + colour) 10 | } 11 | 12 | return type 13 | } 14 | -------------------------------------------------------------------------------- /src/helpers/get-illuminant.js: -------------------------------------------------------------------------------- 1 | import ILLUMINANTS from '../constants/illuminants' 2 | 3 | export default function getIlluminant (ref) { 4 | return ILLUMINANTS[ref] 5 | } 6 | -------------------------------------------------------------------------------- /src/helpers/get-transform.js: -------------------------------------------------------------------------------- 1 | import TRANSFORMS from '../constants/transforms' 2 | 3 | export default function getTransform (ref) { 4 | return TRANSFORMS[ref] 5 | } 6 | -------------------------------------------------------------------------------- /src/helpers/matrix-multiply.js: -------------------------------------------------------------------------------- 1 | export default function matrixMultiply (a, b) { 2 | var result = [] 3 | for (let i = 0; i < a.length; i++) { 4 | result[i] = [] 5 | for (let j = 0; j < b[0].length; j++) { 6 | var sum = 0 7 | for (let k = 0; k < a[0].length; k++) { 8 | sum += a[i][k] * b[k][j] 9 | } 10 | result[i][j] = sum 11 | } 12 | } 13 | return result 14 | } 15 | -------------------------------------------------------------------------------- /src/helpers/negative-modulo.js: -------------------------------------------------------------------------------- 1 | export default function negativeModulo (n, m) { 2 | return ((n % m) + m) % m 3 | } 4 | -------------------------------------------------------------------------------- /src/helpers/slope-mod.js: -------------------------------------------------------------------------------- 1 | export default function slopeMod (n, m) { 2 | if (n > (m * 2)) { 3 | return slopeMod(n - (m * 2), m) 4 | } else if (n > m) { 5 | return (m * 2) - n 6 | } else if (n < 0) { 7 | return slopeMod(n + (m * 2), m) 8 | } else { 9 | return n 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /src/helpers/test-color-type.js: -------------------------------------------------------------------------------- 1 | const contains = (obj, test) => { 2 | const set = new Set(Object.keys(obj)) 3 | return test.every(val => set.has(val)) 4 | } 5 | const stringStartsWith = (colour, test) => typeof colour === 'string' && colour.slice(0, test.length) === test 6 | 7 | export default { 8 | hex: colour => stringStartsWith(colour, '#'), 9 | rgb: colour => contains(colour, [ 'r', 'g', 'b' ]), 10 | cssrgb: colour => stringStartsWith(colour, 'rgb('), 11 | hsl: colour => contains(colour, [ 'h', 's', 'l' ]), 12 | csshsl: colour => stringStartsWith(colour, 'hsl('), 13 | hsv: colour => contains(colour, [ 'h', 's', 'v' ]), 14 | cmyk: colour => contains(colour, [ 'c', 'm', 'y', 'k' ]), 15 | yiq: colour => contains(colour, [ 'y', 'i', 'q' ]), 16 | XYZ: colour => contains(colour, [ 'X', 'Y', 'Z' ]), 17 | xyY: colour => contains(colour, [ 'x', 'y', 'Y' ]), 18 | lms: colour => contains(colour, [ 'rho', 'gamma', 'beta' ]), 19 | cielab: colour => contains(colour, [ 'L', 'a', 'b' ]), 20 | cieluv: colour => contains(colour, [ 'L', 'u', 'v' ]), 21 | cielch: colour => contains(colour, [ 'L', 'C', 'h' ]), 22 | hsluv: colour => contains(colour, [ 'hu', 's', 'l' ]) 23 | } 24 | -------------------------------------------------------------------------------- /src/helpers/to-degree.js: -------------------------------------------------------------------------------- 1 | export default function toDegree (angle) { 2 | return angle * (180 / Math.PI) 3 | } 4 | -------------------------------------------------------------------------------- /src/helpers/to-radian.js: -------------------------------------------------------------------------------- 1 | export default function toRadian (angle) { 2 | return angle * (Math.PI / 180) 3 | } 4 | -------------------------------------------------------------------------------- /src/operations/adapt.js: -------------------------------------------------------------------------------- 1 | import getIlluminant from '../helpers/get-illuminant' 2 | import matrixMultiply from '../helpers/matrix-multiply' 3 | import getTransform from '../helpers/get-transform' 4 | import convert from '../helpers/convert-to-type' 5 | import makeColourObject from './convert' 6 | 7 | export default function adapt (colourRef, illuminantDRef, illuminantSRef) { 8 | const colour = convert('XYZ', colourRef) 9 | 10 | // Source + Destination illuminant must be supplied as CIE Stanard Illuminant labels. 11 | // Otherwise assuming CIE-D65 12 | const illuminantD = convert('lms', getIlluminant(illuminantDRef) || getIlluminant('D65')) 13 | const illuminantS = convert('lms', getIlluminant(illuminantSRef) || getIlluminant('D65')) 14 | 15 | // Bradford Transformation 16 | let Mb = getTransform('BRADFORD') 17 | 18 | // Inverse Bradford Transformation 19 | let Mbi = getTransform('INVERSE_BRADFORD') 20 | 21 | // Illuminant Ratio Matrix 22 | let Mir = [ 23 | [ illuminantD.rho / illuminantS.rho, 0, 0 ], 24 | [ 0, illuminantD.gamma / illuminantS.gamma, 0 ], 25 | [ 0, 0, illuminantD.beta / illuminantS.beta ] 26 | ] 27 | 28 | // Illuminant ratio matrix, pre-inversion 29 | let MbiMir = matrixMultiply(Mbi, Mir) 30 | 31 | // Illuminant ratio matrix 32 | let M = matrixMultiply(MbiMir, Mb) 33 | 34 | let valueArray = [ [ colour.X ], [ colour.Y ], [ colour.Z ] ] 35 | let resultArray = matrixMultiply(M, valueArray) 36 | 37 | let result = { 38 | X: resultArray[0][0], 39 | Y: resultArray[1][0], 40 | Z: resultArray[2][0] 41 | } 42 | 43 | return makeColourObject(result) 44 | } 45 | -------------------------------------------------------------------------------- /src/operations/adjacent.js: -------------------------------------------------------------------------------- 1 | import negativeModulo from '../helpers/negative-modulo' 2 | import convert from '../helpers/convert-to-type' 3 | import makeColourObject from './convert' 4 | 5 | export default function adjacent (deg, amount, colourRef) { 6 | const colour = convert('hsl', colourRef) 7 | const colours = [{ h: colour.h, s: colour.s, l: colour.l }] 8 | 9 | for (let i = 0; i < (amount - 1); i++) { 10 | colour.h = negativeModulo((colour.h + deg), 360) 11 | colours.push({ h: colour.h, s: colour.s, l: colour.l }) 12 | } 13 | 14 | return makeColourObject(colours) 15 | } 16 | -------------------------------------------------------------------------------- /src/operations/brightness.js: -------------------------------------------------------------------------------- 1 | import makeColourObject from './convert' 2 | import convert from '../helpers/convert-to-type' 3 | 4 | export default function brightness (shift, colourRef) { 5 | var colour = convert('hsl', colourRef) 6 | 7 | colour.l += shift 8 | if (colour.l < 0) { 9 | colour.l = 0 10 | } else if (colour.l > 100) { 11 | colour.l = 100 12 | } 13 | 14 | return makeColourObject(colour) 15 | } 16 | -------------------------------------------------------------------------------- /src/operations/complementary.js: -------------------------------------------------------------------------------- 1 | import convert from '../helpers/convert-to-type' 2 | import makeColourObject from './convert' 3 | 4 | export default function complementary (colourRef) { 5 | var colour = convert('hsl', colourRef) 6 | 7 | colour.h = (colour.h + 180) % 360 8 | 9 | return makeColourObject(colour) 10 | } 11 | -------------------------------------------------------------------------------- /src/operations/contrast.js: -------------------------------------------------------------------------------- 1 | import makeColourObject from './convert' 2 | import convert from '../helpers/convert-to-type' 3 | 4 | export default function contrast (shift, colourRef) { 5 | var colour = convert('rgb', colourRef) 6 | 7 | colour.r = (((((colour.r / 255.0) - 0.5) * shift) + 0.5) * 255.0) 8 | if (colour.r < 0) { 9 | colour.r = 0 10 | } else if (colour.r > 255) { 11 | colour.r = 255 12 | } 13 | 14 | colour.g = (((((colour.g / 255.0) - 0.5) * shift) + 0.5) * 255.0) 15 | if (colour.g < 0) { 16 | colour.g = 0 17 | } else if (colour.g > 255) { 18 | colour.g = 255 19 | } 20 | 21 | colour.b = (((((colour.b / 255.0) - 0.5) * shift) + 0.5) * 255.0) 22 | if (colour.b < 0) { 23 | colour.b = 0 24 | } else if (colour.b > 255) { 25 | colour.b = 255 26 | } 27 | 28 | return makeColourObject(colour) 29 | } 30 | -------------------------------------------------------------------------------- /src/operations/contrastRatio.js: -------------------------------------------------------------------------------- 1 | import convert from '../helpers/convert-to-type' 2 | import makeColourObject from './convert' 3 | 4 | export default function contrastRatio (colourRef) { 5 | var colour = convert('rgb', colourRef) 6 | 7 | var yiq = ((colour.r * 299) + (colour.g * 587) + (colour.b * 114)) / 1000 8 | if (yiq >= 128) { 9 | colour = { r: 0, g: 0, b: 0 } 10 | } else { 11 | colour = { r: 255, g: 255, b: 255 } 12 | } 13 | 14 | return makeColourObject(colour) 15 | } 16 | -------------------------------------------------------------------------------- /src/operations/convert.js: -------------------------------------------------------------------------------- 1 | import convert from '../helpers/convert-to-type' 2 | import testColorType from '../helpers/test-color-type' 3 | 4 | const types = Object.keys(testColorType) 5 | 6 | export default function makeColourObject (colour) { 7 | const object = {} 8 | 9 | types.forEach(type => { 10 | Object.defineProperty(object, type, { 11 | get: () => convertArrayOrColour(type, colour), 12 | enumerable: true 13 | }) 14 | }) 15 | 16 | return object 17 | } 18 | 19 | const convertArrayOrColour = (type, any) => Array.isArray(any) 20 | ? any.map(colour => convert(type, colour)) 21 | : convert(type, any) 22 | -------------------------------------------------------------------------------- /src/operations/difference.js: -------------------------------------------------------------------------------- 1 | import toRadian from '../helpers/to-radian' 2 | import convert from '../helpers/convert-to-type' 3 | 4 | export default function difference (colourRefOne, colourRefTwo, l, c) { 5 | l = l || 1 6 | c = c || 1 7 | 8 | const Lab1 = convert('cielab', colourRefOne) 9 | const Lab2 = convert('cielab', colourRefTwo) 10 | 11 | const C1 = Math.sqrt(Math.pow(Lab1.a, 2) + Math.pow(Lab1.b, 2)) 12 | const C2 = Math.sqrt(Math.pow(Lab2.a, 2) + Math.pow(Lab2.b, 2)) 13 | const dC = C1 - C2 14 | 15 | const dL = Lab1.L - Lab2.L 16 | const da = Lab1.a - Lab2.a 17 | const db = Lab1.b - Lab2.b 18 | 19 | const dH = Math.sqrt(Math.pow(da, 2) + Math.pow(db, 2) - Math.pow(dC, 2)) 20 | 21 | const SL = Lab1.L < 16 ? 0.511 : (0.040975 * Lab1.L) / (1.01765 * Lab1.L) 22 | const SC = (0.0638 * C1) / (1.0131 * C1) 23 | 24 | const H = Math.atan2(Lab1.b, Lab1.a) 25 | const H1 = H >= 0 ? H : H + 360 26 | 27 | const T = (H1 >= 164) && (H1 <= 345) ? (0.56 + Math.abs(0.2 * Math.cos(toRadian(H1 + 168)))) : (0.36 + Math.abs(0.4 * Math.cos(toRadian(H1 + 35)))) 28 | const F = Math.pow(C1, 4) / (Math.pow(C1, 4) + 1900) 29 | 30 | const SH = SC * (((F * T) + 1) - F) 31 | 32 | const EqPrt1 = Math.pow((dL / (l * SL)), 2) 33 | const EqPrt2 = Math.pow((dC / (c * SC)), 2) 34 | const EqPrt3 = Math.pow((dH / (SH)), 2) 35 | 36 | return Math.sqrt(EqPrt1 + EqPrt2 + EqPrt3) 37 | } 38 | -------------------------------------------------------------------------------- /src/operations/fade.js: -------------------------------------------------------------------------------- 1 | import slopeMod from '../helpers/slope-mod' 2 | import makeColourObject from './convert' 3 | import convert from '../helpers/convert-to-type' 4 | 5 | export default function fade (amount, fromRef, toRef) { 6 | var fromColour = convert('rgb', fromRef) 7 | var toColour = convert('rgb', toRef) 8 | 9 | var colours = [ fromColour ] 10 | amount = amount - 1 11 | 12 | var rDiff = (toColour.r - fromColour.r) / (amount) 13 | var gDiff = (toColour.g - fromColour.g) / (amount) 14 | var bDiff = (toColour.b - fromColour.b) / (amount) 15 | var colour = { r: fromColour.r, g: fromColour.g, b: fromColour.b } 16 | 17 | for (var i = 0; i < (amount - 1); i++) { 18 | colour.r = slopeMod(colour.r + rDiff, 255) 19 | colour.g = slopeMod(colour.g + gDiff, 255) 20 | colour.b = slopeMod(colour.b + bDiff, 255) 21 | colours.push({ r: colour.r, g: colour.g, b: colour.b }) 22 | } 23 | 24 | colours.push(toColour) 25 | 26 | return makeColourObject(colours) 27 | } 28 | -------------------------------------------------------------------------------- /src/operations/greyscale.js: -------------------------------------------------------------------------------- 1 | import makeColourObject from './convert' 2 | import convert from '../helpers/convert-to-type' 3 | 4 | export default function greyscale (colourRef) { 5 | var colour = convert('rgb', colourRef) 6 | 7 | var grey = ((colour.r + colour.g + colour.b) / 3) 8 | colour = { r: grey, g: grey, b: grey } 9 | 10 | return makeColourObject(colour) 11 | } 12 | -------------------------------------------------------------------------------- /src/operations/hue.js: -------------------------------------------------------------------------------- 1 | import negativeModulo from '../helpers/negative-modulo' 2 | import makeColourObject from './convert' 3 | import convert from '../helpers/convert-to-type' 4 | 5 | export default function hue (shift, colourRef) { 6 | const colour = convert('hsl', colourRef) 7 | 8 | colour.h = negativeModulo((colour.h + shift), 360) 9 | 10 | return makeColourObject(colour) 11 | } 12 | -------------------------------------------------------------------------------- /src/operations/index.js: -------------------------------------------------------------------------------- 1 | export { default as adapt } from './adapt' 2 | export { default as adjacent } from './adjacent' 3 | export { default as brightness } from './brightness' 4 | export { default as complementary } from './complementary' 5 | export { default as contrast } from './contrast' 6 | export { default as contrastRatio } from './contrastRatio' 7 | export { default as convert } from './convert' 8 | export { default as difference } from './difference' 9 | export { default as fade } from './fade' 10 | export { default as greyscale } from './greyscale' 11 | export { default as hue } from './hue' 12 | export { default as invert } from './invert' 13 | export { default as invertLightness } from './invertLightness' 14 | export { default as mid } from './mid' 15 | export { default as multiply } from './multiply' 16 | export { default as saturation } from './saturation' 17 | export { default as sepia } from './sepia' 18 | export { default as shade } from './shade' 19 | export { default as temperature } from './temperature' 20 | export { default as tetrad } from './tetrad' 21 | export { default as triad } from './triad' 22 | export { default as uniformComplementary } from './uniformComplementary' 23 | export { default as uniformTriad } from './uniformTriad' 24 | export { default as uniformTetrad } from './uniformTetrad' 25 | -------------------------------------------------------------------------------- /src/operations/invert.js: -------------------------------------------------------------------------------- 1 | import negativeModulo from '../helpers/negative-modulo' 2 | import makeColourObject from './convert' 3 | import convert from '../helpers/convert-to-type' 4 | 5 | export default function invert (colourRef) { 6 | var colour = convert('rgb', colourRef) 7 | 8 | colour.r = negativeModulo((255 - colour.r), 255) 9 | colour.g = negativeModulo((255 - colour.g), 255) 10 | colour.b = negativeModulo((255 - colour.b), 255) 11 | 12 | return makeColourObject(colour) 13 | } 14 | -------------------------------------------------------------------------------- /src/operations/invertLightness.js: -------------------------------------------------------------------------------- 1 | import makeColourObject from './convert' 2 | import convert from '../helpers/convert-to-type' 3 | 4 | export default function invertLightness (colourRef) { 5 | var colour = convert('hsl', colourRef) 6 | 7 | colour.l = 100 - colour.l 8 | 9 | return makeColourObject(colour) 10 | } 11 | -------------------------------------------------------------------------------- /src/operations/mid.js: -------------------------------------------------------------------------------- 1 | import makeColourObject from './convert' 2 | import convert from '../helpers/convert-to-type' 3 | 4 | export default function mid (colourOneRef, colourTwoRef) { 5 | var colourOne = convert('hsl', colourOneRef) 6 | var colourTwo = convert('hsl', colourTwoRef) 7 | 8 | var midHue = (colourOne.h + colourTwo.h) / 2 9 | var midSat = (colourOne.s + colourTwo.s) / 2 10 | var midLight = (colourOne.l + colourTwo.l) / 2 11 | var colour = { h: midHue, s: midSat, l: midLight } 12 | 13 | return makeColourObject(colour) 14 | } 15 | -------------------------------------------------------------------------------- /src/operations/multiply.js: -------------------------------------------------------------------------------- 1 | import makeColourObject from './convert' 2 | import convert from '../helpers/convert-to-type' 3 | 4 | export default function multiply (colourRefOne, colourRefTwo) { 5 | var c1 = convert('hsl', colourRefOne) 6 | var c2 = convert('hsl', colourRefTwo) 7 | 8 | var colour = { h: c1.h, s: c1.s, l: 100 * ((c1.l / 100) * (c2.l / 100)) } 9 | colour.l = (colour.l > 100 ? 100 : colour.l) 10 | colour.l = (colour.l < 0 ? 0 : colour.l) 11 | 12 | return makeColourObject(colour) 13 | } 14 | -------------------------------------------------------------------------------- /src/operations/saturation.js: -------------------------------------------------------------------------------- 1 | import makeColourObject from './convert' 2 | import convert from '../helpers/convert-to-type' 3 | 4 | export default function saturation (shift, colourRef) { 5 | var colour = convert('hsl', colourRef) 6 | 7 | colour.s += shift 8 | if (colour.s < 0) { 9 | colour.s = 0 10 | } else if (colour.s > 100) { 11 | colour.s = 100 12 | } 13 | 14 | return makeColourObject(colour) 15 | } 16 | -------------------------------------------------------------------------------- /src/operations/sepia.js: -------------------------------------------------------------------------------- 1 | import makeColourObject from './convert' 2 | import convert from '../helpers/convert-to-type' 3 | 4 | export default function sepia (colourRef) { 5 | var colour = convert('rgb', colourRef) 6 | 7 | var newcolour = {} 8 | newcolour.r = (colour.r * 0.393) + (colour.g * 0.769) + (colour.b * 0.189) 9 | newcolour.g = (colour.r * 0.349) + (colour.g * 0.686) + (colour.b * 0.168) 10 | newcolour.b = (colour.r * 0.272) + (colour.g * 0.534) + (colour.b * 0.131) 11 | 12 | return makeColourObject(newcolour) 13 | } 14 | -------------------------------------------------------------------------------- /src/operations/shade.js: -------------------------------------------------------------------------------- 1 | import makeColourObject from './convert' 2 | import convert from '../helpers/convert-to-type' 3 | 4 | export default function shade (shift, colourRef) { 5 | var colour = convert('hsv', colourRef) 6 | 7 | colour.v += shift 8 | if (colour.v < 0) { 9 | colour.v = 0 10 | } else if (colour.v > 100) { 11 | colour.v = 100 12 | } 13 | 14 | return makeColourObject(colour) 15 | } 16 | -------------------------------------------------------------------------------- /src/operations/temperature.js: -------------------------------------------------------------------------------- 1 | import convert from '../helpers/convert-to-type' 2 | 3 | export default function temperature (colourRef) { 4 | const colour = convert('xyY', colourRef) 5 | 6 | // McCamy's CCT fomula. 7 | // DOI: 10.1002/col.5080170211 8 | // http://onlinelibrary.wiley.com/doi/10.1002/col.5080170211/abstract;jsessionid=D127570AD1D0FEF9A18424F5C0E987C5.f02t04 9 | const n = (colour.x - 0.3320) / (colour.y - 0.1858) 10 | const out = (-449 * Math.pow(n, 3)) + (3525 * Math.pow(n, 2)) - (6823.3 * n) + 5520.33 11 | 12 | return out 13 | } 14 | -------------------------------------------------------------------------------- /src/operations/tetrad.js: -------------------------------------------------------------------------------- 1 | import makeColourObject from './convert' 2 | import convert from '../helpers/convert-to-type' 3 | 4 | export default function tetrad (colourRef) { 5 | var colour = convert('hsl', colourRef) 6 | 7 | var colours = [{ h: colour.h, s: colour.s, l: colour.l }] 8 | for (var i = 0; i < 3; i++) { 9 | colour.h = (colour.h + 90) % 360 10 | colours.push({ h: colour.h, s: colour.s, l: colour.l }) 11 | } 12 | 13 | return makeColourObject(colours) 14 | } 15 | -------------------------------------------------------------------------------- /src/operations/triad.js: -------------------------------------------------------------------------------- 1 | import makeColourObject from './convert' 2 | import convert from '../helpers/convert-to-type' 3 | 4 | export default function triad (colourRef) { 5 | const colour = convert('hsl', colourRef) 6 | 7 | const colours = [{ h: colour.h, s: colour.s, l: colour.l }] 8 | for (let i = 0; i < 2; i++) { 9 | colour.h = (colour.h + 120) % 360 10 | colours.push({ h: colour.h, s: colour.s, l: colour.l }) 11 | } 12 | 13 | return makeColourObject(colours) 14 | } 15 | -------------------------------------------------------------------------------- /src/operations/uniformComplementary.js: -------------------------------------------------------------------------------- 1 | import makeColourObject from './convert' 2 | import convert from '../helpers/convert-to-type' 3 | 4 | export default function complementary (colourRef) { 5 | var colour = convert('hsluv', colourRef) 6 | 7 | colour.hu = (colour.hu + 180) % 360 8 | 9 | return makeColourObject(colour) 10 | } 11 | -------------------------------------------------------------------------------- /src/operations/uniformTetrad.js: -------------------------------------------------------------------------------- 1 | import makeColourObject from './convert' 2 | import convert from '../helpers/convert-to-type' 3 | 4 | export default function tetrad (colourRef) { 5 | var colour = convert('hsluv', colourRef) 6 | 7 | var colours = [{ hu: colour.hu, s: colour.s, l: colour.l }] 8 | for (var i = 0; i < 3; i++) { 9 | colour.hu = (colour.hu + 90) % 360 10 | colours.push({ h: colour.hu, s: colour.s, l: colour.l }) 11 | } 12 | 13 | return makeColourObject(colours) 14 | } 15 | -------------------------------------------------------------------------------- /src/operations/uniformTriad.js: -------------------------------------------------------------------------------- 1 | import makeColourObject from './convert' 2 | import convert from '../helpers/convert-to-type' 3 | 4 | export default function triad (colourRef) { 5 | var colour = convert('hsluv', colourRef) 6 | 7 | var colours = [{ hu: colour.hu, s: colour.s, l: colour.l }] 8 | for (var i = 0; i < 2; i++) { 9 | colour.hu = (colour.hu + 120) % 360 10 | colours.push({ h: colour.hu, s: colour.s, l: colour.l }) 11 | } 12 | 13 | return makeColourObject(colours) 14 | } 15 | -------------------------------------------------------------------------------- /test/.eslintrc.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | env: { 3 | mocha: true 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /test/consts.js: -------------------------------------------------------------------------------- 1 | const red = { 2 | rgb: { 3 | value: { r: 255, g: 0, b: 0 }, 4 | accuracy: { 5 | rgb: 0, 6 | cssrgb: null, 7 | hex: null, 8 | hsl: 0, 9 | csshsl: null, 10 | hsv: 0, 11 | cmyk: 0.25, 12 | yiq: 0.25, 13 | XYZ: 0, 14 | xyY: 0, 15 | lms: 0.1, 16 | cielab: 0.25, 17 | cieluv: 0.000001, 18 | cielch: 0.025, 19 | hsluv: 0.025 20 | } 21 | }, 22 | hex: { 23 | value: '#ff0000', 24 | accuracy: { 25 | cielab: 0.000000001, 26 | cieluv: 0.000000001, 27 | cielch: 0.000000001, 28 | hsluv: 0.000000001 29 | } 30 | }, 31 | cssrgb: { 32 | value: 'rgb(255,0,0)', 33 | accuracy: { 34 | cielab: 0.000000001, 35 | cieluv: 0.000000001, 36 | cielch: 0.000000001, 37 | hsluv: 0.000000001 38 | } 39 | }, 40 | hsl: { 41 | value: { h: 0, s: 100, l: 50 }, 42 | accuracy: { 43 | rgb: 0, 44 | cssrgb: null, 45 | hex: null, 46 | hsl: 0, 47 | csshsl: null, 48 | hsv: 0, 49 | cmyk: 0.25, 50 | yiq: 0.25, 51 | XYZ: 0, 52 | xyY: 0, 53 | lms: 0.1, 54 | cielab: 0.25, 55 | cieluv: 0.000001, 56 | cielch: 0.025, 57 | hsluv: 0.025 58 | } 59 | }, 60 | csshsl: { 61 | value: 'hsl(0,100%,50%)', 62 | accuracy: { 63 | cielab: 0.000000001, 64 | cieluv: 0.000000001, 65 | cielch: 0.000000001, 66 | hsluv: 0.000000001 67 | } 68 | }, 69 | hsv: { 70 | value: { h: 0, s: 100, v: 100 }, 71 | accuracy: { 72 | rgb: 0, 73 | cssrgb: null, 74 | hex: null, 75 | hsl: 0, 76 | csshsl: null, 77 | hsv: 0, 78 | cmyk: 0.5, 79 | yiq: 0.25, 80 | XYZ: 0, 81 | xyY: 0, 82 | lms: 0.1, 83 | cielab: 0.25, 84 | cieluv: 0.000001, 85 | cielch: 0.025, 86 | hsluv: 0.025 87 | } 88 | }, 89 | cmyk: { 90 | value: { c: 0, m: 1, y: 1, k: 0 }, 91 | accuracy: { 92 | rgb: 0, 93 | cssrgb: null, 94 | hex: null, 95 | hsl: 0, 96 | csshsl: null, 97 | hsv: 0, 98 | cmyk: 0, 99 | yiq: 0.25, 100 | XYZ: 0, 101 | xyY: 0, 102 | lms: 0.1, 103 | cielab: 0.25, 104 | cieluv: 0.000001, 105 | cielch: 0.025, 106 | hsluv: 0.025 107 | } 108 | }, 109 | yiq: { 110 | value: { y: 0.299, i: 0.5957, q: 0.211 }, 111 | accuracy: { 112 | rgb: 0.25, 113 | cssrgb: null, 114 | hex: null, 115 | hsl: 0.25, 116 | csshsl: null, 117 | hsv: 0.25, 118 | cmyk: 0.25, 119 | yiq: 0, 120 | XYZ: 0.25, 121 | xyY: 0.25, 122 | lms: 0.1, 123 | cielab: 0.25, 124 | cieluv: 0.25, 125 | cielch: 0.25, 126 | hsluv: 0.25 127 | } 128 | }, 129 | XYZ: { 130 | value: { X: 41.24, Y: 21.26, Z: 1.9300000000000002 }, 131 | accuracy: { 132 | rgb: 0.25, 133 | cssrgb: null, 134 | hex: null, 135 | hsl: 0.25, 136 | csshsl: null, 137 | hsv: 0.25, 138 | cmyk: 0.25, 139 | yiq: 0.25, 140 | XYZ: 0, 141 | xyY: 0, 142 | lms: 0.5, 143 | cielab: 0.5, 144 | cieluv: 0.000001, 145 | cielch: 0.025, 146 | hsluv: 0.25 147 | } 148 | }, 149 | xyY: { 150 | value: { x: 0.6400744994567747, y: 0.3299705106316933, Y: 21.26 }, 151 | accuracy: { 152 | rgb: 0.25, 153 | cssrgb: null, 154 | hex: null, 155 | hsl: 0.25, 156 | csshsl: null, 157 | hsv: 0.25, 158 | cmyk: 0.25, 159 | yiq: 0.25, 160 | XYZ: 0.0000000001, // God damn floating point numbers 161 | xyY: 0, 162 | lms: 0.5, 163 | cielab: 0.5, 164 | cieluv: 0.000001, 165 | cielch: 0.025, 166 | hsluv: 0.25 167 | } 168 | }, 169 | lms: { 170 | value: { rho: 0.42266086, gamma: 0.05561592999999999, beta: 0.02135054 }, 171 | accuracy: { 172 | rgb: 0.25, 173 | cssrgb: null, 174 | hex: null, 175 | hsl: 0.25, 176 | csshsl: null, 177 | hsv: 0.25, 178 | cmyk: 0.25, 179 | yiq: 0.25, 180 | XYZ: 0.5, 181 | xyY: 0.25, 182 | lms: 0, 183 | cielab: 0.5, 184 | cieluv: 0.0001, 185 | cielch: 0.025, 186 | hsluv: 0.25 187 | } 188 | }, 189 | cielab: { 190 | value: { L: 53.23288178584244, a: 80.10930952982204, b: 67.22006831026425 }, 191 | accuracy: { 192 | rgb: 0.25, 193 | cssrgb: null, 194 | hex: null, 195 | hsl: 0.25, 196 | csshsl: null, 197 | hsv: 0.25, 198 | cmyk: 0.25, 199 | yiq: 0.5, 200 | XYZ: 0.25, 201 | xyY: 0.25, 202 | lms: 0.5, 203 | cielab: 0, 204 | cieluv: 0.000001, 205 | cielch: 0.025, 206 | hsluv: 0.25 207 | } 208 | }, 209 | cieluv: { 210 | value: { L: 53.23288178584245, u: 175.05303573649485, v: 37.750505032665004 }, 211 | accuracy: { 212 | rgb: 0.25, 213 | cssrgb: null, 214 | hex: null, 215 | hsl: 0.25, 216 | csshsl: null, 217 | hsv: 0.25, 218 | cmyk: 0.25, 219 | yiq: 0.5, 220 | XYZ: 0.25, 221 | xyY: 0.25, 222 | lms: 0.5, 223 | cielab: 0.000001, 224 | cieluv: 0, 225 | cielch: 0.025, 226 | hsluv: 0.25 227 | } 228 | }, 229 | cielch: { 230 | value: { L: 53.23288178584245, C: 179.077262517562, h: 12.169571625677895 }, 231 | accuracy: { 232 | rgb: 0.25, 233 | cssrgb: null, 234 | hex: null, 235 | hsl: 0.25, 236 | csshsl: null, 237 | hsv: 0.25, 238 | cmyk: 0.25, 239 | yiq: 0.5, 240 | XYZ: 0.25, 241 | xyY: 0.25, 242 | lms: 0.5, 243 | cielab: 0.001, 244 | cieluv: 0.001, 245 | cielch: 0, 246 | hsluv: 0.025 247 | } 248 | }, 249 | hsluv: { 250 | value: { hu: 12.169571625677895, s: 99.98979433290384, l: 53.23288178584245 }, 251 | accuracy: { 252 | rgb: 0.25, 253 | cssrgb: null, 254 | hex: null, 255 | hsl: 0.25, 256 | csshsl: null, 257 | hsv: 0.25, 258 | cmyk: 0.25, 259 | yiq: 0.5, 260 | XYZ: 0.25, 261 | xyY: 0.25, 262 | lms: 0.5, 263 | cielab: 0.001, 264 | cieluv: 0.001, 265 | cielch: 0.025, 266 | hsluv: 0 267 | } 268 | } 269 | } 270 | 271 | export default { 272 | red 273 | } 274 | -------------------------------------------------------------------------------- /test/rounding.js: -------------------------------------------------------------------------------- 1 | function applyFactor (inp, factor) { 2 | return Math.round(inp * factor) / factor 3 | } 4 | 5 | export default function round (inp, step) { 6 | if (step === 0) return inp 7 | let factor = 1.0 / step 8 | let out 9 | 10 | if (typeof inp === 'object') { 11 | out = {} 12 | for (let key in inp) { 13 | out[key] = applyFactor(inp[key], factor) 14 | } 15 | } else if (typeof inp === 'number') { 16 | out = applyFactor(inp, factor) 17 | } else { 18 | out = inp 19 | } 20 | 21 | return out 22 | } 23 | -------------------------------------------------------------------------------- /test/test.js: -------------------------------------------------------------------------------- 1 | /* global describe, it */ 2 | 3 | import assert from 'assert' 4 | import round from './rounding' 5 | import consts from './consts' 6 | import * as chroma from '../src/operations' 7 | 8 | describe('Conversion', () => { 9 | for (let fromKey in consts.red) { 10 | if (!consts.red.hasOwnProperty(fromKey)) { 11 | continue 12 | } 13 | 14 | for (let toKey in consts.red) { 15 | if (!consts.red.hasOwnProperty(toKey)) { 16 | continue 17 | } 18 | 19 | let accuracy = consts.red[fromKey].accuracy[toKey] || 0 20 | 21 | describe(fromKey.toUpperCase() + ' > ' + toKey.toUpperCase(), () => { 22 | const fromValue = consts.red[fromKey].value 23 | const expected = round(consts.red[toKey].value, accuracy) 24 | 25 | it(`should return ${accuracy !== 0 ? 'a value close to' : 'the value'} ${JSON.stringify(consts.red[toKey].value)}`, () => { 26 | assert.deepEqual( 27 | round(chroma.convert(fromValue)[toKey], accuracy), 28 | expected 29 | ) 30 | }) 31 | it(`should return ${accuracy !== 0 ? 'a value close to' : 'the value'} ${JSON.stringify(consts.red[toKey].value)} when passed in as an array`, () => { 32 | assert.deepEqual( 33 | chroma.convert([ fromValue, fromValue ])[toKey].map(value => round(value, accuracy)), 34 | [ expected, expected ] 35 | ) 36 | }) 37 | }) 38 | } 39 | } 40 | }) 41 | 42 | function close (numberA, numberB) { 43 | const difference = Math.abs(numberA - numberB) 44 | return difference < 0.0001 45 | } 46 | 47 | function closeXYZ (actual, expected) { 48 | return close(actual.X, expected.X) && close(actual.Y, expected.Y) && close(actual.Z, expected.Z) 49 | } 50 | 51 | function allAreCloseXYZ (arrayActual, arrayExpected) { 52 | return arrayExpected.every((expectedXYZ, i) => { 53 | const actualXYZ = arrayActual[i] 54 | return closeXYZ(actualXYZ, expectedXYZ) 55 | }) 56 | } 57 | 58 | describe('Operations', () => { 59 | it('should match expected value for complementary', () => { 60 | assert(closeXYZ(chroma.complementary('#4fc7ff').XYZ, 61 | { X: 51.31525590295186, 62 | Y: 39.152459064169946, 63 | Z: 12.24970542237237 } 64 | )) 65 | }) 66 | 67 | it('should match expected value for uniformComplementary', () => { 68 | assert(closeXYZ(chroma.uniformComplementary('#4fc7ff').XYZ, 69 | { X: 52.112337192985905, 70 | Y: 49.72911239090597, 71 | Z: 12.489177408160534 } 72 | )) 73 | }) 74 | 75 | it('should match expected value for triad', () => { 76 | assert(allAreCloseXYZ(chroma.triad('#4fc7ff').XYZ, 77 | [ { X: 41.53626010469932, 78 | Y: 49.405886246485146, 79 | Z: 101.95483866723517 }, 80 | { X: 54.22256483378904, 81 | Y: 30.926597459521155, 82 | Z: 56.503804537994384 }, 83 | { X: 60.631173321886735, 84 | Y: 84.17853037790493, 85 | Z: 20.44961910775087 } ] 86 | )) 87 | }) 88 | 89 | it('should match expected value for uniformTriad', () => { 90 | assert(allAreCloseXYZ(chroma.uniformTriad('#4fc7ff').XYZ, 91 | [ { X: 41.69787317690973, 92 | Y: 49.72911239090597, 93 | Z: 102.00870969130524 }, 94 | { X: 53.4225834547738, 95 | Y: 40.913416822510236, 96 | Z: 35.27663235082702 }, 97 | { X: 51.14408373744017, 98 | Y: 74.9924244853323, 99 | Z: 36.79881316661437 } ] 100 | )) 101 | }) 102 | 103 | it('should match expected value for tetrad', () => { 104 | assert(allAreCloseXYZ(chroma.tetrad('#4fc7ff').XYZ, 105 | [ { X: 41.53626010469932, 106 | Y: 49.405886246485146, 107 | Z: 101.95483866723517 }, 108 | { X: 51.16905708482478, 109 | Y: 28.4440830295141, 110 | Z: 97.40109044329289 }, 111 | { X: 51.31525590295186, 112 | Y: 39.152459064169946, 113 | Z: 12.24970542237237 }, 114 | { X: 43.682618932785076, 115 | Y: 75.44123003085592, 116 | Z: 19.65643991349854 } ] 117 | )) 118 | }) 119 | 120 | it('should match expected value for uniformTetrad', () => { 121 | assert(allAreCloseXYZ(chroma.uniformTetrad('#4fc7ff').XYZ, 122 | [ { X: 41.69787317690973, 123 | Y: 49.72911239090597, 124 | Z: 102.00870969130524 }, 125 | { X: 58.82032091119712, 126 | Y: 43.07251180507956, 127 | Z: 63.70072903963791 }, 128 | { X: 72.21153579379627, 129 | Y: 80.07129763623777, 130 | Z: 36.668752823012454 }, 131 | { X: 52.326683318488, 132 | Y: 75.19555888183191, 133 | Z: 55.22058814500378 } ] 134 | )) 135 | }) 136 | 137 | it('should match expected value for mid', () => { 138 | assert(closeXYZ(chroma.mid('#4fc7ff', '#75c2e6').XYZ, 139 | { X: 40.799216394001505, 140 | Y: 48.39740922533037, 141 | Z: 91.19689637619237 } 142 | )) 143 | }) 144 | 145 | it('should match expected value for invert', () => { 146 | assert(closeXYZ(chroma.invert('#4fc7ff').XYZ, 147 | { X: 19.318669329342615, 148 | Y: 12.058453052067094, 149 | Z: 1.3093076423159207 } 150 | )) 151 | }) 152 | 153 | it('should match expected value for invertLightness', () => { 154 | assert(closeXYZ(chroma.invertLightness('#4fc7ff').XYZ, 155 | { X: 14.468583181643496, 156 | Y: 16.398809350560242, 157 | Z: 43.47700646797299 } 158 | )) 159 | }) 160 | 161 | it('should match expected value for multiply', () => { 162 | assert(closeXYZ(chroma.multiply('#4fc7ff', '#75c2e6').XYZ, 163 | { X: 25.461157806545266, 164 | Y: 28.682628838331315, 165 | Z: 77.04915252759945 } 166 | )) 167 | }) 168 | 169 | it('should match expected value for adjacent', () => { 170 | assert(allAreCloseXYZ(chroma.adjacent(60, 2, '#4fc7ff').XYZ, 171 | [ { X: 41.53626010469932, 172 | Y: 49.405886246485146, 173 | Z: 101.95483866723517 }, 174 | { X: 30.781108042819238, 175 | Y: 17.933709687296894, 176 | Z: 96.44695024806809 } ] 177 | )) 178 | }) 179 | 180 | it('should match expected value for fade', () => { 181 | assert(allAreCloseXYZ(chroma.fade(2, '#4fc7ff', '#75c2e6').XYZ, 182 | [ { X: 41.69787317690974, 183 | Y: 49.729112390905975, 184 | Z: 102.00870969130528 }, 185 | { X: 40.91083262524179, 186 | Y: 48.07865190715945, 187 | Z: 81.98678938048923 } ] 188 | )) 189 | }) 190 | 191 | it('should match expected value for shade', () => { 192 | assert(closeXYZ(chroma.shade(20, '#4fc700').XYZ, 193 | { X: 39.303512967548, 194 | Y: 71.00959149123706, 195 | Z: 11.634716393545077 } 196 | )) 197 | }) 198 | 199 | it('should match expected value for saturation', () => { 200 | assert(closeXYZ(chroma.saturation(20, '#4fc7ff').XYZ, 201 | { X: 41.53626010469932, 202 | Y: 49.405886246485146, 203 | Z: 101.95483866723517 } 204 | )) 205 | }) 206 | 207 | it('should match expected value for brightness', () => { 208 | assert(closeXYZ(chroma.brightness(20, '#4fc7ff').XYZ, 209 | { X: 65.72636615483249, 210 | Y: 74.2843783908222, 211 | Z: 105.48191217236125 } 212 | )) 213 | }) 214 | 215 | it('should match expected value for hue', () => { 216 | assert(closeXYZ(chroma.hue(60, '#4fc7ff').XYZ, 217 | { X: 30.781108042819238, 218 | Y: 17.933709687296894, 219 | Z: 96.44695024806809 } 220 | )) 221 | }) 222 | 223 | it('should match expected value for contrast', () => { 224 | assert(closeXYZ(chroma.contrast(2, '#4fc7ff').XYZ, 225 | { X: 54.36013053099219, 226 | Y: 79.02360269371712, 227 | Z: 106.99574568197903 } 228 | )) 229 | }) 230 | 231 | it('should match expected value for greyscale', () => { 232 | assert(closeXYZ(chroma.greyscale('#4fc7ff').XYZ, 233 | { X: 42.14029244103617, 234 | Y: 44.33486842823374, 235 | Z: 48.280671718346554 } 236 | )) 237 | }) 238 | 239 | it('should match expected value for sepia', () => { 240 | assert(closeXYZ(chroma.sepia('#4fc7ff').XYZ, 241 | { X: 62.109119777183, 242 | Y: 64.36966501897096, 243 | Z: 42.94285971766853 } 244 | )) 245 | }) 246 | 247 | it('should match expected value for contrastRatio', () => { 248 | assert(closeXYZ(chroma.contrastRatio('#4fc7ff').XYZ, 249 | { X: 0, Y: 0, Z: 0 } 250 | )) 251 | }) 252 | 253 | it('should match expected value for adapt when using default D65 source illuminant', () => { 254 | assert(closeXYZ(chroma.adapt('#4fc7ff', 'D50').XYZ, 255 | { X: 39.71624372658961, 256 | Y: 48.74860966760767, 257 | Z: 77.08702260499929 } 258 | )) 259 | }) 260 | 261 | it('should match expected value for adapt when using defined F2 source illuminant', () => { 262 | assert(closeXYZ(chroma.adapt('#4fc7ff', 'D50', 'F2').XYZ, 263 | { X: 43.73825385154716, 264 | Y: 51.0118924505256, 265 | Z: 125.37810305190011 } 266 | )) 267 | }) 268 | 269 | it('should match expected value for difference', () => { 270 | assert(close(chroma.difference('#4fc7ff', '#75c2e6'), 202.64118553936103)) 271 | }) 272 | 273 | it('should be close to 6500K when temperature is passed the D65 illuminant', () => { 274 | assert(close(chroma.temperature({ X: 95.047, Y: 100, Z: 108.883 }), 6503.4619534794965)) 275 | }) 276 | }) 277 | -------------------------------------------------------------------------------- /yarn.lock: -------------------------------------------------------------------------------- 1 | # THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY. 2 | # yarn lockfile v1 3 | 4 | 5 | acorn-jsx@^3.0.0: 6 | version "3.0.1" 7 | resolved "https://registry.yarnpkg.com/acorn-jsx/-/acorn-jsx-3.0.1.tgz#afdf9488fb1ecefc8348f6fb22f464e32a58b36b" 8 | dependencies: 9 | acorn "^3.0.4" 10 | 11 | acorn@^3.0.4: 12 | version "3.3.0" 13 | resolved "https://registry.yarnpkg.com/acorn/-/acorn-3.3.0.tgz#45e37fb39e8da3f25baee3ff5369e2bb5f22017a" 14 | 15 | acorn@^4.0.1: 16 | version "4.0.13" 17 | resolved "https://registry.yarnpkg.com/acorn/-/acorn-4.0.13.tgz#105495ae5361d697bd195c825192e1ad7f253787" 18 | 19 | acorn@^5.0.1: 20 | version "5.0.3" 21 | resolved "https://registry.yarnpkg.com/acorn/-/acorn-5.0.3.tgz#c460df08491463f028ccb82eab3730bf01087b3d" 22 | 23 | ajv-keywords@^1.0.0: 24 | version "1.5.1" 25 | resolved "https://registry.yarnpkg.com/ajv-keywords/-/ajv-keywords-1.5.1.tgz#314dd0a4b3368fad3dfcdc54ede6171b886daf3c" 26 | 27 | ajv@^4.7.0: 28 | version "4.11.8" 29 | resolved "https://registry.yarnpkg.com/ajv/-/ajv-4.11.8.tgz#82ffb02b29e662ae53bdc20af15947706739c536" 30 | dependencies: 31 | co "^4.6.0" 32 | json-stable-stringify "^1.0.1" 33 | 34 | ansi-escapes@^1.1.0: 35 | version "1.4.0" 36 | resolved "https://registry.yarnpkg.com/ansi-escapes/-/ansi-escapes-1.4.0.tgz#d3a8a83b319aa67793662b13e761c7911422306e" 37 | 38 | ansi-regex@^2.0.0: 39 | version "2.1.1" 40 | resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-2.1.1.tgz#c3b33ab5ee360d86e0e628f0468ae7ef27d654df" 41 | 42 | ansi-styles@^2.2.1: 43 | version "2.2.1" 44 | resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-2.2.1.tgz#b432dd3358b634cf75e1e4664368240533c1ddbe" 45 | 46 | argparse@^1.0.7: 47 | version "1.0.9" 48 | resolved "https://registry.yarnpkg.com/argparse/-/argparse-1.0.9.tgz#73d83bc263f86e97f8cc4f6bae1b0e90a7d22c86" 49 | dependencies: 50 | sprintf-js "~1.0.2" 51 | 52 | arr-diff@^2.0.0: 53 | version "2.0.0" 54 | resolved "https://registry.yarnpkg.com/arr-diff/-/arr-diff-2.0.0.tgz#8f3b827f955a8bd669697e4a4256ac3ceae356cf" 55 | dependencies: 56 | arr-flatten "^1.0.1" 57 | 58 | arr-flatten@^1.0.1: 59 | version "1.0.3" 60 | resolved "https://registry.yarnpkg.com/arr-flatten/-/arr-flatten-1.0.3.tgz#a274ed85ac08849b6bd7847c4580745dc51adfb1" 61 | 62 | array-union@^1.0.1: 63 | version "1.0.2" 64 | resolved "https://registry.yarnpkg.com/array-union/-/array-union-1.0.2.tgz#9a34410e4f4e3da23dea375be5be70f24778ec39" 65 | dependencies: 66 | array-uniq "^1.0.1" 67 | 68 | array-uniq@^1.0.1: 69 | version "1.0.3" 70 | resolved "https://registry.yarnpkg.com/array-uniq/-/array-uniq-1.0.3.tgz#af6ac877a25cc7f74e058894753858dfdb24fdb6" 71 | 72 | array-unique@^0.2.1: 73 | version "0.2.1" 74 | resolved "https://registry.yarnpkg.com/array-unique/-/array-unique-0.2.1.tgz#a1d97ccafcbc2625cc70fadceb36a50c58b01a53" 75 | 76 | arrify@^1.0.0: 77 | version "1.0.1" 78 | resolved "https://registry.yarnpkg.com/arrify/-/arrify-1.0.1.tgz#898508da2226f380df904728456849c1501a4b0d" 79 | 80 | babel-code-frame@^6.16.0, babel-code-frame@^6.22.0: 81 | version "6.22.0" 82 | resolved "https://registry.yarnpkg.com/babel-code-frame/-/babel-code-frame-6.22.0.tgz#027620bee567a88c32561574e7fd0801d33118e4" 83 | dependencies: 84 | chalk "^1.1.0" 85 | esutils "^2.0.2" 86 | js-tokens "^3.0.0" 87 | 88 | babel-core@6, babel-core@^6.22.1, babel-core@^6.24.1: 89 | version "6.24.1" 90 | resolved "https://registry.yarnpkg.com/babel-core/-/babel-core-6.24.1.tgz#8c428564dce1e1f41fb337ec34f4c3b022b5ad83" 91 | dependencies: 92 | babel-code-frame "^6.22.0" 93 | babel-generator "^6.24.1" 94 | babel-helpers "^6.24.1" 95 | babel-messages "^6.23.0" 96 | babel-register "^6.24.1" 97 | babel-runtime "^6.22.0" 98 | babel-template "^6.24.1" 99 | babel-traverse "^6.24.1" 100 | babel-types "^6.24.1" 101 | babylon "^6.11.0" 102 | convert-source-map "^1.1.0" 103 | debug "^2.1.1" 104 | json5 "^0.5.0" 105 | lodash "^4.2.0" 106 | minimatch "^3.0.2" 107 | path-is-absolute "^1.0.0" 108 | private "^0.1.6" 109 | slash "^1.0.0" 110 | source-map "^0.5.0" 111 | 112 | babel-generator@^6.24.1: 113 | version "6.24.1" 114 | resolved "https://registry.yarnpkg.com/babel-generator/-/babel-generator-6.24.1.tgz#e715f486c58ded25649d888944d52aa07c5d9497" 115 | dependencies: 116 | babel-messages "^6.23.0" 117 | babel-runtime "^6.22.0" 118 | babel-types "^6.24.1" 119 | detect-indent "^4.0.0" 120 | jsesc "^1.3.0" 121 | lodash "^4.2.0" 122 | source-map "^0.5.0" 123 | trim-right "^1.0.1" 124 | 125 | babel-helper-builder-binary-assignment-operator-visitor@^6.24.1: 126 | version "6.24.1" 127 | resolved "https://registry.yarnpkg.com/babel-helper-builder-binary-assignment-operator-visitor/-/babel-helper-builder-binary-assignment-operator-visitor-6.24.1.tgz#cce4517ada356f4220bcae8a02c2b346f9a56664" 128 | dependencies: 129 | babel-helper-explode-assignable-expression "^6.24.1" 130 | babel-runtime "^6.22.0" 131 | babel-types "^6.24.1" 132 | 133 | babel-helper-call-delegate@^6.24.1: 134 | version "6.24.1" 135 | resolved "https://registry.yarnpkg.com/babel-helper-call-delegate/-/babel-helper-call-delegate-6.24.1.tgz#ece6aacddc76e41c3461f88bfc575bd0daa2df8d" 136 | dependencies: 137 | babel-helper-hoist-variables "^6.24.1" 138 | babel-runtime "^6.22.0" 139 | babel-traverse "^6.24.1" 140 | babel-types "^6.24.1" 141 | 142 | babel-helper-define-map@^6.24.1: 143 | version "6.24.1" 144 | resolved "https://registry.yarnpkg.com/babel-helper-define-map/-/babel-helper-define-map-6.24.1.tgz#7a9747f258d8947d32d515f6aa1c7bd02204a080" 145 | dependencies: 146 | babel-helper-function-name "^6.24.1" 147 | babel-runtime "^6.22.0" 148 | babel-types "^6.24.1" 149 | lodash "^4.2.0" 150 | 151 | babel-helper-explode-assignable-expression@^6.24.1: 152 | version "6.24.1" 153 | resolved "https://registry.yarnpkg.com/babel-helper-explode-assignable-expression/-/babel-helper-explode-assignable-expression-6.24.1.tgz#f25b82cf7dc10433c55f70592d5746400ac22caa" 154 | dependencies: 155 | babel-runtime "^6.22.0" 156 | babel-traverse "^6.24.1" 157 | babel-types "^6.24.1" 158 | 159 | babel-helper-function-name@^6.24.1: 160 | version "6.24.1" 161 | resolved "https://registry.yarnpkg.com/babel-helper-function-name/-/babel-helper-function-name-6.24.1.tgz#d3475b8c03ed98242a25b48351ab18399d3580a9" 162 | dependencies: 163 | babel-helper-get-function-arity "^6.24.1" 164 | babel-runtime "^6.22.0" 165 | babel-template "^6.24.1" 166 | babel-traverse "^6.24.1" 167 | babel-types "^6.24.1" 168 | 169 | babel-helper-get-function-arity@^6.24.1: 170 | version "6.24.1" 171 | resolved "https://registry.yarnpkg.com/babel-helper-get-function-arity/-/babel-helper-get-function-arity-6.24.1.tgz#8f7782aa93407c41d3aa50908f89b031b1b6853d" 172 | dependencies: 173 | babel-runtime "^6.22.0" 174 | babel-types "^6.24.1" 175 | 176 | babel-helper-hoist-variables@^6.24.1: 177 | version "6.24.1" 178 | resolved "https://registry.yarnpkg.com/babel-helper-hoist-variables/-/babel-helper-hoist-variables-6.24.1.tgz#1ecb27689c9d25513eadbc9914a73f5408be7a76" 179 | dependencies: 180 | babel-runtime "^6.22.0" 181 | babel-types "^6.24.1" 182 | 183 | babel-helper-optimise-call-expression@^6.24.1: 184 | version "6.24.1" 185 | resolved "https://registry.yarnpkg.com/babel-helper-optimise-call-expression/-/babel-helper-optimise-call-expression-6.24.1.tgz#f7a13427ba9f73f8f4fa993c54a97882d1244257" 186 | dependencies: 187 | babel-runtime "^6.22.0" 188 | babel-types "^6.24.1" 189 | 190 | babel-helper-regex@^6.24.1: 191 | version "6.24.1" 192 | resolved "https://registry.yarnpkg.com/babel-helper-regex/-/babel-helper-regex-6.24.1.tgz#d36e22fab1008d79d88648e32116868128456ce8" 193 | dependencies: 194 | babel-runtime "^6.22.0" 195 | babel-types "^6.24.1" 196 | lodash "^4.2.0" 197 | 198 | babel-helper-remap-async-to-generator@^6.24.1: 199 | version "6.24.1" 200 | resolved "https://registry.yarnpkg.com/babel-helper-remap-async-to-generator/-/babel-helper-remap-async-to-generator-6.24.1.tgz#5ec581827ad723fecdd381f1c928390676e4551b" 201 | dependencies: 202 | babel-helper-function-name "^6.24.1" 203 | babel-runtime "^6.22.0" 204 | babel-template "^6.24.1" 205 | babel-traverse "^6.24.1" 206 | babel-types "^6.24.1" 207 | 208 | babel-helper-replace-supers@^6.24.1: 209 | version "6.24.1" 210 | resolved "https://registry.yarnpkg.com/babel-helper-replace-supers/-/babel-helper-replace-supers-6.24.1.tgz#bf6dbfe43938d17369a213ca8a8bf74b6a90ab1a" 211 | dependencies: 212 | babel-helper-optimise-call-expression "^6.24.1" 213 | babel-messages "^6.23.0" 214 | babel-runtime "^6.22.0" 215 | babel-template "^6.24.1" 216 | babel-traverse "^6.24.1" 217 | babel-types "^6.24.1" 218 | 219 | babel-helpers@^6.24.1: 220 | version "6.24.1" 221 | resolved "https://registry.yarnpkg.com/babel-helpers/-/babel-helpers-6.24.1.tgz#3471de9caec388e5c850e597e58a26ddf37602b2" 222 | dependencies: 223 | babel-runtime "^6.22.0" 224 | babel-template "^6.24.1" 225 | 226 | babel-messages@^6.23.0: 227 | version "6.23.0" 228 | resolved "https://registry.yarnpkg.com/babel-messages/-/babel-messages-6.23.0.tgz#f3cdf4703858035b2a2951c6ec5edf6c62f2630e" 229 | dependencies: 230 | babel-runtime "^6.22.0" 231 | 232 | babel-plugin-check-es2015-constants@^6.22.0: 233 | version "6.22.0" 234 | resolved "https://registry.yarnpkg.com/babel-plugin-check-es2015-constants/-/babel-plugin-check-es2015-constants-6.22.0.tgz#35157b101426fd2ffd3da3f75c7d1e91835bbf8a" 235 | dependencies: 236 | babel-runtime "^6.22.0" 237 | 238 | babel-plugin-external-helpers@^6.22.0: 239 | version "6.22.0" 240 | resolved "https://registry.yarnpkg.com/babel-plugin-external-helpers/-/babel-plugin-external-helpers-6.22.0.tgz#2285f48b02bd5dede85175caf8c62e86adccefa1" 241 | dependencies: 242 | babel-runtime "^6.22.0" 243 | 244 | babel-plugin-syntax-async-functions@^6.8.0: 245 | version "6.13.0" 246 | resolved "https://registry.yarnpkg.com/babel-plugin-syntax-async-functions/-/babel-plugin-syntax-async-functions-6.13.0.tgz#cad9cad1191b5ad634bf30ae0872391e0647be95" 247 | 248 | babel-plugin-syntax-exponentiation-operator@^6.8.0: 249 | version "6.13.0" 250 | resolved "https://registry.yarnpkg.com/babel-plugin-syntax-exponentiation-operator/-/babel-plugin-syntax-exponentiation-operator-6.13.0.tgz#9ee7e8337290da95288201a6a57f4170317830de" 251 | 252 | babel-plugin-syntax-trailing-function-commas@^6.22.0: 253 | version "6.22.0" 254 | resolved "https://registry.yarnpkg.com/babel-plugin-syntax-trailing-function-commas/-/babel-plugin-syntax-trailing-function-commas-6.22.0.tgz#ba0360937f8d06e40180a43fe0d5616fff532cf3" 255 | 256 | babel-plugin-transform-async-to-generator@^6.22.0: 257 | version "6.24.1" 258 | resolved "https://registry.yarnpkg.com/babel-plugin-transform-async-to-generator/-/babel-plugin-transform-async-to-generator-6.24.1.tgz#6536e378aff6cb1d5517ac0e40eb3e9fc8d08761" 259 | dependencies: 260 | babel-helper-remap-async-to-generator "^6.24.1" 261 | babel-plugin-syntax-async-functions "^6.8.0" 262 | babel-runtime "^6.22.0" 263 | 264 | babel-plugin-transform-es2015-arrow-functions@^6.22.0: 265 | version "6.22.0" 266 | resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-arrow-functions/-/babel-plugin-transform-es2015-arrow-functions-6.22.0.tgz#452692cb711d5f79dc7f85e440ce41b9f244d221" 267 | dependencies: 268 | babel-runtime "^6.22.0" 269 | 270 | babel-plugin-transform-es2015-block-scoped-functions@^6.22.0: 271 | version "6.22.0" 272 | resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-block-scoped-functions/-/babel-plugin-transform-es2015-block-scoped-functions-6.22.0.tgz#bbc51b49f964d70cb8d8e0b94e820246ce3a6141" 273 | dependencies: 274 | babel-runtime "^6.22.0" 275 | 276 | babel-plugin-transform-es2015-block-scoping@^6.23.0: 277 | version "6.24.1" 278 | resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-block-scoping/-/babel-plugin-transform-es2015-block-scoping-6.24.1.tgz#76c295dc3a4741b1665adfd3167215dcff32a576" 279 | dependencies: 280 | babel-runtime "^6.22.0" 281 | babel-template "^6.24.1" 282 | babel-traverse "^6.24.1" 283 | babel-types "^6.24.1" 284 | lodash "^4.2.0" 285 | 286 | babel-plugin-transform-es2015-classes@^6.23.0, babel-plugin-transform-es2015-classes@^6.9.0: 287 | version "6.24.1" 288 | resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-classes/-/babel-plugin-transform-es2015-classes-6.24.1.tgz#5a4c58a50c9c9461e564b4b2a3bfabc97a2584db" 289 | dependencies: 290 | babel-helper-define-map "^6.24.1" 291 | babel-helper-function-name "^6.24.1" 292 | babel-helper-optimise-call-expression "^6.24.1" 293 | babel-helper-replace-supers "^6.24.1" 294 | babel-messages "^6.23.0" 295 | babel-runtime "^6.22.0" 296 | babel-template "^6.24.1" 297 | babel-traverse "^6.24.1" 298 | babel-types "^6.24.1" 299 | 300 | babel-plugin-transform-es2015-computed-properties@^6.22.0: 301 | version "6.24.1" 302 | resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-computed-properties/-/babel-plugin-transform-es2015-computed-properties-6.24.1.tgz#6fe2a8d16895d5634f4cd999b6d3480a308159b3" 303 | dependencies: 304 | babel-runtime "^6.22.0" 305 | babel-template "^6.24.1" 306 | 307 | babel-plugin-transform-es2015-destructuring@^6.23.0: 308 | version "6.23.0" 309 | resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-destructuring/-/babel-plugin-transform-es2015-destructuring-6.23.0.tgz#997bb1f1ab967f682d2b0876fe358d60e765c56d" 310 | dependencies: 311 | babel-runtime "^6.22.0" 312 | 313 | babel-plugin-transform-es2015-duplicate-keys@^6.22.0: 314 | version "6.24.1" 315 | resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-duplicate-keys/-/babel-plugin-transform-es2015-duplicate-keys-6.24.1.tgz#73eb3d310ca969e3ef9ec91c53741a6f1576423e" 316 | dependencies: 317 | babel-runtime "^6.22.0" 318 | babel-types "^6.24.1" 319 | 320 | babel-plugin-transform-es2015-for-of@^6.23.0: 321 | version "6.23.0" 322 | resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-for-of/-/babel-plugin-transform-es2015-for-of-6.23.0.tgz#f47c95b2b613df1d3ecc2fdb7573623c75248691" 323 | dependencies: 324 | babel-runtime "^6.22.0" 325 | 326 | babel-plugin-transform-es2015-function-name@^6.22.0: 327 | version "6.24.1" 328 | resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-function-name/-/babel-plugin-transform-es2015-function-name-6.24.1.tgz#834c89853bc36b1af0f3a4c5dbaa94fd8eacaa8b" 329 | dependencies: 330 | babel-helper-function-name "^6.24.1" 331 | babel-runtime "^6.22.0" 332 | babel-types "^6.24.1" 333 | 334 | babel-plugin-transform-es2015-literals@^6.22.0: 335 | version "6.22.0" 336 | resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-literals/-/babel-plugin-transform-es2015-literals-6.22.0.tgz#4f54a02d6cd66cf915280019a31d31925377ca2e" 337 | dependencies: 338 | babel-runtime "^6.22.0" 339 | 340 | babel-plugin-transform-es2015-modules-amd@^6.22.0, babel-plugin-transform-es2015-modules-amd@^6.24.1: 341 | version "6.24.1" 342 | resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-modules-amd/-/babel-plugin-transform-es2015-modules-amd-6.24.1.tgz#3b3e54017239842d6d19c3011c4bd2f00a00d154" 343 | dependencies: 344 | babel-plugin-transform-es2015-modules-commonjs "^6.24.1" 345 | babel-runtime "^6.22.0" 346 | babel-template "^6.24.1" 347 | 348 | babel-plugin-transform-es2015-modules-commonjs@^6.23.0, babel-plugin-transform-es2015-modules-commonjs@^6.24.1: 349 | version "6.24.1" 350 | resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-modules-commonjs/-/babel-plugin-transform-es2015-modules-commonjs-6.24.1.tgz#d3e310b40ef664a36622200097c6d440298f2bfe" 351 | dependencies: 352 | babel-plugin-transform-strict-mode "^6.24.1" 353 | babel-runtime "^6.22.0" 354 | babel-template "^6.24.1" 355 | babel-types "^6.24.1" 356 | 357 | babel-plugin-transform-es2015-modules-systemjs@^6.23.0: 358 | version "6.24.1" 359 | resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-modules-systemjs/-/babel-plugin-transform-es2015-modules-systemjs-6.24.1.tgz#ff89a142b9119a906195f5f106ecf305d9407d23" 360 | dependencies: 361 | babel-helper-hoist-variables "^6.24.1" 362 | babel-runtime "^6.22.0" 363 | babel-template "^6.24.1" 364 | 365 | babel-plugin-transform-es2015-modules-umd@^6.23.0: 366 | version "6.24.1" 367 | resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-modules-umd/-/babel-plugin-transform-es2015-modules-umd-6.24.1.tgz#ac997e6285cd18ed6176adb607d602344ad38468" 368 | dependencies: 369 | babel-plugin-transform-es2015-modules-amd "^6.24.1" 370 | babel-runtime "^6.22.0" 371 | babel-template "^6.24.1" 372 | 373 | babel-plugin-transform-es2015-object-super@^6.22.0: 374 | version "6.24.1" 375 | resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-object-super/-/babel-plugin-transform-es2015-object-super-6.24.1.tgz#24cef69ae21cb83a7f8603dad021f572eb278f8d" 376 | dependencies: 377 | babel-helper-replace-supers "^6.24.1" 378 | babel-runtime "^6.22.0" 379 | 380 | babel-plugin-transform-es2015-parameters@^6.23.0: 381 | version "6.24.1" 382 | resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-parameters/-/babel-plugin-transform-es2015-parameters-6.24.1.tgz#57ac351ab49caf14a97cd13b09f66fdf0a625f2b" 383 | dependencies: 384 | babel-helper-call-delegate "^6.24.1" 385 | babel-helper-get-function-arity "^6.24.1" 386 | babel-runtime "^6.22.0" 387 | babel-template "^6.24.1" 388 | babel-traverse "^6.24.1" 389 | babel-types "^6.24.1" 390 | 391 | babel-plugin-transform-es2015-shorthand-properties@^6.22.0: 392 | version "6.24.1" 393 | resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-shorthand-properties/-/babel-plugin-transform-es2015-shorthand-properties-6.24.1.tgz#24f875d6721c87661bbd99a4622e51f14de38aa0" 394 | dependencies: 395 | babel-runtime "^6.22.0" 396 | babel-types "^6.24.1" 397 | 398 | babel-plugin-transform-es2015-spread@^6.22.0: 399 | version "6.22.0" 400 | resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-spread/-/babel-plugin-transform-es2015-spread-6.22.0.tgz#d6d68a99f89aedc4536c81a542e8dd9f1746f8d1" 401 | dependencies: 402 | babel-runtime "^6.22.0" 403 | 404 | babel-plugin-transform-es2015-sticky-regex@^6.22.0: 405 | version "6.24.1" 406 | resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-sticky-regex/-/babel-plugin-transform-es2015-sticky-regex-6.24.1.tgz#00c1cdb1aca71112cdf0cf6126c2ed6b457ccdbc" 407 | dependencies: 408 | babel-helper-regex "^6.24.1" 409 | babel-runtime "^6.22.0" 410 | babel-types "^6.24.1" 411 | 412 | babel-plugin-transform-es2015-template-literals@^6.22.0: 413 | version "6.22.0" 414 | resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-template-literals/-/babel-plugin-transform-es2015-template-literals-6.22.0.tgz#a84b3450f7e9f8f1f6839d6d687da84bb1236d8d" 415 | dependencies: 416 | babel-runtime "^6.22.0" 417 | 418 | babel-plugin-transform-es2015-typeof-symbol@^6.23.0: 419 | version "6.23.0" 420 | resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-typeof-symbol/-/babel-plugin-transform-es2015-typeof-symbol-6.23.0.tgz#dec09f1cddff94b52ac73d505c84df59dcceb372" 421 | dependencies: 422 | babel-runtime "^6.22.0" 423 | 424 | babel-plugin-transform-es2015-unicode-regex@^6.22.0: 425 | version "6.24.1" 426 | resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-unicode-regex/-/babel-plugin-transform-es2015-unicode-regex-6.24.1.tgz#d38b12f42ea7323f729387f18a7c5ae1faeb35e9" 427 | dependencies: 428 | babel-helper-regex "^6.24.1" 429 | babel-runtime "^6.22.0" 430 | regexpu-core "^2.0.0" 431 | 432 | babel-plugin-transform-exponentiation-operator@^6.22.0: 433 | version "6.24.1" 434 | resolved "https://registry.yarnpkg.com/babel-plugin-transform-exponentiation-operator/-/babel-plugin-transform-exponentiation-operator-6.24.1.tgz#2ab0c9c7f3098fa48907772bb813fe41e8de3a0e" 435 | dependencies: 436 | babel-helper-builder-binary-assignment-operator-visitor "^6.24.1" 437 | babel-plugin-syntax-exponentiation-operator "^6.8.0" 438 | babel-runtime "^6.22.0" 439 | 440 | babel-plugin-transform-regenerator@^6.22.0: 441 | version "6.24.1" 442 | resolved "https://registry.yarnpkg.com/babel-plugin-transform-regenerator/-/babel-plugin-transform-regenerator-6.24.1.tgz#b8da305ad43c3c99b4848e4fe4037b770d23c418" 443 | dependencies: 444 | regenerator-transform "0.9.11" 445 | 446 | babel-plugin-transform-strict-mode@^6.24.1: 447 | version "6.24.1" 448 | resolved "https://registry.yarnpkg.com/babel-plugin-transform-strict-mode/-/babel-plugin-transform-strict-mode-6.24.1.tgz#d5faf7aa578a65bbe591cf5edae04a0c67020758" 449 | dependencies: 450 | babel-runtime "^6.22.0" 451 | babel-types "^6.24.1" 452 | 453 | babel-preset-env@^1.5.2: 454 | version "1.5.2" 455 | resolved "https://registry.yarnpkg.com/babel-preset-env/-/babel-preset-env-1.5.2.tgz#cd4ae90a6e94b709f97374b33e5f8b983556adef" 456 | dependencies: 457 | babel-plugin-check-es2015-constants "^6.22.0" 458 | babel-plugin-syntax-trailing-function-commas "^6.22.0" 459 | babel-plugin-transform-async-to-generator "^6.22.0" 460 | babel-plugin-transform-es2015-arrow-functions "^6.22.0" 461 | babel-plugin-transform-es2015-block-scoped-functions "^6.22.0" 462 | babel-plugin-transform-es2015-block-scoping "^6.23.0" 463 | babel-plugin-transform-es2015-classes "^6.23.0" 464 | babel-plugin-transform-es2015-computed-properties "^6.22.0" 465 | babel-plugin-transform-es2015-destructuring "^6.23.0" 466 | babel-plugin-transform-es2015-duplicate-keys "^6.22.0" 467 | babel-plugin-transform-es2015-for-of "^6.23.0" 468 | babel-plugin-transform-es2015-function-name "^6.22.0" 469 | babel-plugin-transform-es2015-literals "^6.22.0" 470 | babel-plugin-transform-es2015-modules-amd "^6.22.0" 471 | babel-plugin-transform-es2015-modules-commonjs "^6.23.0" 472 | babel-plugin-transform-es2015-modules-systemjs "^6.23.0" 473 | babel-plugin-transform-es2015-modules-umd "^6.23.0" 474 | babel-plugin-transform-es2015-object-super "^6.22.0" 475 | babel-plugin-transform-es2015-parameters "^6.23.0" 476 | babel-plugin-transform-es2015-shorthand-properties "^6.22.0" 477 | babel-plugin-transform-es2015-spread "^6.22.0" 478 | babel-plugin-transform-es2015-sticky-regex "^6.22.0" 479 | babel-plugin-transform-es2015-template-literals "^6.22.0" 480 | babel-plugin-transform-es2015-typeof-symbol "^6.23.0" 481 | babel-plugin-transform-es2015-unicode-regex "^6.22.0" 482 | babel-plugin-transform-exponentiation-operator "^6.22.0" 483 | babel-plugin-transform-regenerator "^6.22.0" 484 | browserslist "^2.1.2" 485 | invariant "^2.2.2" 486 | semver "^5.3.0" 487 | 488 | babel-register@^6.24.1: 489 | version "6.24.1" 490 | resolved "https://registry.yarnpkg.com/babel-register/-/babel-register-6.24.1.tgz#7e10e13a2f71065bdfad5a1787ba45bca6ded75f" 491 | dependencies: 492 | babel-core "^6.24.1" 493 | babel-runtime "^6.22.0" 494 | core-js "^2.4.0" 495 | home-or-tmp "^2.0.0" 496 | lodash "^4.2.0" 497 | mkdirp "^0.5.1" 498 | source-map-support "^0.4.2" 499 | 500 | babel-runtime@^6.18.0, babel-runtime@^6.22.0: 501 | version "6.23.0" 502 | resolved "https://registry.yarnpkg.com/babel-runtime/-/babel-runtime-6.23.0.tgz#0a9489f144de70efb3ce4300accdb329e2fc543b" 503 | dependencies: 504 | core-js "^2.4.0" 505 | regenerator-runtime "^0.10.0" 506 | 507 | babel-template@^6.24.1: 508 | version "6.24.1" 509 | resolved "https://registry.yarnpkg.com/babel-template/-/babel-template-6.24.1.tgz#04ae514f1f93b3a2537f2a0f60a5a45fb8308333" 510 | dependencies: 511 | babel-runtime "^6.22.0" 512 | babel-traverse "^6.24.1" 513 | babel-types "^6.24.1" 514 | babylon "^6.11.0" 515 | lodash "^4.2.0" 516 | 517 | babel-traverse@^6.24.1: 518 | version "6.24.1" 519 | resolved "https://registry.yarnpkg.com/babel-traverse/-/babel-traverse-6.24.1.tgz#ab36673fd356f9a0948659e7b338d5feadb31695" 520 | dependencies: 521 | babel-code-frame "^6.22.0" 522 | babel-messages "^6.23.0" 523 | babel-runtime "^6.22.0" 524 | babel-types "^6.24.1" 525 | babylon "^6.15.0" 526 | debug "^2.2.0" 527 | globals "^9.0.0" 528 | invariant "^2.2.0" 529 | lodash "^4.2.0" 530 | 531 | babel-types@^6.19.0, babel-types@^6.24.1: 532 | version "6.24.1" 533 | resolved "https://registry.yarnpkg.com/babel-types/-/babel-types-6.24.1.tgz#a136879dc15b3606bda0d90c1fc74304c2ff0975" 534 | dependencies: 535 | babel-runtime "^6.22.0" 536 | esutils "^2.0.2" 537 | lodash "^4.2.0" 538 | to-fast-properties "^1.0.1" 539 | 540 | babylon@^6.11.0, babylon@^6.15.0: 541 | version "6.17.1" 542 | resolved "https://registry.yarnpkg.com/babylon/-/babylon-6.17.1.tgz#17f14fddf361b695981fe679385e4f1c01ebd86f" 543 | 544 | balanced-match@^0.4.1: 545 | version "0.4.2" 546 | resolved "https://registry.yarnpkg.com/balanced-match/-/balanced-match-0.4.2.tgz#cb3f3e3c732dc0f01ee70b403f302e61d7709838" 547 | 548 | brace-expansion@^1.1.7: 549 | version "1.1.7" 550 | resolved "https://registry.yarnpkg.com/brace-expansion/-/brace-expansion-1.1.7.tgz#3effc3c50e000531fb720eaff80f0ae8ef23cf59" 551 | dependencies: 552 | balanced-match "^0.4.1" 553 | concat-map "0.0.1" 554 | 555 | braces@^1.8.2: 556 | version "1.8.5" 557 | resolved "https://registry.yarnpkg.com/braces/-/braces-1.8.5.tgz#ba77962e12dff969d6b76711e914b737857bf6a7" 558 | dependencies: 559 | expand-range "^1.8.1" 560 | preserve "^0.2.0" 561 | repeat-element "^1.1.2" 562 | 563 | browser-resolve@^1.11.0: 564 | version "1.11.2" 565 | resolved "https://registry.yarnpkg.com/browser-resolve/-/browser-resolve-1.11.2.tgz#8ff09b0a2c421718a1051c260b32e48f442938ce" 566 | dependencies: 567 | resolve "1.1.7" 568 | 569 | browser-stdout@1.3.0: 570 | version "1.3.0" 571 | resolved "https://registry.yarnpkg.com/browser-stdout/-/browser-stdout-1.3.0.tgz#f351d32969d32fa5d7a5567154263d928ae3bd1f" 572 | 573 | browserslist@^2.1.2: 574 | version "2.1.4" 575 | resolved "https://registry.yarnpkg.com/browserslist/-/browserslist-2.1.4.tgz#cc526af4a1312b7d2e05653e56d0c8ab70c0e053" 576 | dependencies: 577 | caniuse-lite "^1.0.30000670" 578 | electron-to-chromium "^1.3.11" 579 | 580 | builtin-modules@^1.0.0, builtin-modules@^1.1.0, builtin-modules@^1.1.1: 581 | version "1.1.1" 582 | resolved "https://registry.yarnpkg.com/builtin-modules/-/builtin-modules-1.1.1.tgz#270f076c5a72c02f5b65a47df94c5fe3a278892f" 583 | 584 | caller-path@^0.1.0: 585 | version "0.1.0" 586 | resolved "https://registry.yarnpkg.com/caller-path/-/caller-path-0.1.0.tgz#94085ef63581ecd3daa92444a8fe94e82577751f" 587 | dependencies: 588 | callsites "^0.2.0" 589 | 590 | callsites@^0.2.0: 591 | version "0.2.0" 592 | resolved "https://registry.yarnpkg.com/callsites/-/callsites-0.2.0.tgz#afab96262910a7f33c19a5775825c69f34e350ca" 593 | 594 | caniuse-lite@^1.0.30000670: 595 | version "1.0.30000683" 596 | resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30000683.tgz#a7573707cf2acc9217ca6484d1dfbc9f13898364" 597 | 598 | chalk@^1.0.0, chalk@^1.1.0, chalk@^1.1.1, chalk@^1.1.3: 599 | version "1.1.3" 600 | resolved "https://registry.yarnpkg.com/chalk/-/chalk-1.1.3.tgz#a8115c55e4a702fe4d150abd3872822a7e09fc98" 601 | dependencies: 602 | ansi-styles "^2.2.1" 603 | escape-string-regexp "^1.0.2" 604 | has-ansi "^2.0.0" 605 | strip-ansi "^3.0.0" 606 | supports-color "^2.0.0" 607 | 608 | circular-json@^0.3.1: 609 | version "0.3.1" 610 | resolved "https://registry.yarnpkg.com/circular-json/-/circular-json-0.3.1.tgz#be8b36aefccde8b3ca7aa2d6afc07a37242c0d2d" 611 | 612 | cli-cursor@^1.0.1: 613 | version "1.0.2" 614 | resolved "https://registry.yarnpkg.com/cli-cursor/-/cli-cursor-1.0.2.tgz#64da3f7d56a54412e59794bd62dc35295e8f2987" 615 | dependencies: 616 | restore-cursor "^1.0.1" 617 | 618 | cli-width@^2.0.0: 619 | version "2.1.0" 620 | resolved "https://registry.yarnpkg.com/cli-width/-/cli-width-2.1.0.tgz#b234ca209b29ef66fc518d9b98d5847b00edf00a" 621 | 622 | co@^4.6.0: 623 | version "4.6.0" 624 | resolved "https://registry.yarnpkg.com/co/-/co-4.6.0.tgz#6ea6bdf3d853ae54ccb8e47bfa0bf3f9031fb184" 625 | 626 | code-point-at@^1.0.0: 627 | version "1.1.0" 628 | resolved "https://registry.yarnpkg.com/code-point-at/-/code-point-at-1.1.0.tgz#0d070b4d043a5bea33a2f1a40e2edb3d9a4ccf77" 629 | 630 | commander@2.9.0, commander@~2.9.0: 631 | version "2.9.0" 632 | resolved "https://registry.yarnpkg.com/commander/-/commander-2.9.0.tgz#9c99094176e12240cb22d6c5146098400fe0f7d4" 633 | dependencies: 634 | graceful-readlink ">= 1.0.0" 635 | 636 | concat-map@0.0.1: 637 | version "0.0.1" 638 | resolved "https://registry.yarnpkg.com/concat-map/-/concat-map-0.0.1.tgz#d8a96bd77fd68df7793a73036a3ba0d5405d477b" 639 | 640 | concat-stream@^1.5.2: 641 | version "1.6.0" 642 | resolved "https://registry.yarnpkg.com/concat-stream/-/concat-stream-1.6.0.tgz#0aac662fd52be78964d5532f694784e70110acf7" 643 | dependencies: 644 | inherits "^2.0.3" 645 | readable-stream "^2.2.2" 646 | typedarray "^0.0.6" 647 | 648 | contains-path@^0.1.0: 649 | version "0.1.0" 650 | resolved "https://registry.yarnpkg.com/contains-path/-/contains-path-0.1.0.tgz#fe8cf184ff6670b6baef01a9d4861a5cbec4120a" 651 | 652 | convert-source-map@^1.1.0: 653 | version "1.5.0" 654 | resolved "https://registry.yarnpkg.com/convert-source-map/-/convert-source-map-1.5.0.tgz#9acd70851c6d5dfdd93d9282e5edf94a03ff46b5" 655 | 656 | core-js@^2.4.0: 657 | version "2.4.1" 658 | resolved "https://registry.yarnpkg.com/core-js/-/core-js-2.4.1.tgz#4de911e667b0eae9124e34254b53aea6fc618d3e" 659 | 660 | core-util-is@~1.0.0: 661 | version "1.0.2" 662 | resolved "https://registry.yarnpkg.com/core-util-is/-/core-util-is-1.0.2.tgz#b5fd54220aa2bc5ab57aab7140c940754503c1a7" 663 | 664 | d@1: 665 | version "1.0.0" 666 | resolved "https://registry.yarnpkg.com/d/-/d-1.0.0.tgz#754bb5bfe55451da69a58b94d45f4c5b0462d58f" 667 | dependencies: 668 | es5-ext "^0.10.9" 669 | 670 | debug@2.2.0: 671 | version "2.2.0" 672 | resolved "https://registry.yarnpkg.com/debug/-/debug-2.2.0.tgz#f87057e995b1a1f6ae6a4960664137bc56f039da" 673 | dependencies: 674 | ms "0.7.1" 675 | 676 | debug@2.6.0: 677 | version "2.6.0" 678 | resolved "https://registry.yarnpkg.com/debug/-/debug-2.6.0.tgz#bc596bcabe7617f11d9fa15361eded5608b8499b" 679 | dependencies: 680 | ms "0.7.2" 681 | 682 | debug@^2.1.1, debug@^2.2.0: 683 | version "2.6.8" 684 | resolved "https://registry.yarnpkg.com/debug/-/debug-2.6.8.tgz#e731531ca2ede27d188222427da17821d68ff4fc" 685 | dependencies: 686 | ms "2.0.0" 687 | 688 | deep-is@~0.1.3: 689 | version "0.1.3" 690 | resolved "https://registry.yarnpkg.com/deep-is/-/deep-is-0.1.3.tgz#b369d6fb5dbc13eecf524f91b070feedc357cf34" 691 | 692 | del@^2.0.2: 693 | version "2.2.2" 694 | resolved "https://registry.yarnpkg.com/del/-/del-2.2.2.tgz#c12c981d067846c84bcaf862cff930d907ffd1a8" 695 | dependencies: 696 | globby "^5.0.0" 697 | is-path-cwd "^1.0.0" 698 | is-path-in-cwd "^1.0.0" 699 | object-assign "^4.0.1" 700 | pify "^2.0.0" 701 | pinkie-promise "^2.0.0" 702 | rimraf "^2.2.8" 703 | 704 | detect-indent@^4.0.0: 705 | version "4.0.0" 706 | resolved "https://registry.yarnpkg.com/detect-indent/-/detect-indent-4.0.0.tgz#f76d064352cdf43a1cb6ce619c4ee3a9475de208" 707 | dependencies: 708 | repeating "^2.0.0" 709 | 710 | diff@3.2.0: 711 | version "3.2.0" 712 | resolved "https://registry.yarnpkg.com/diff/-/diff-3.2.0.tgz#c9ce393a4b7cbd0b058a725c93df299027868ff9" 713 | 714 | doctrine@1.5.0: 715 | version "1.5.0" 716 | resolved "https://registry.yarnpkg.com/doctrine/-/doctrine-1.5.0.tgz#379dce730f6166f76cefa4e6707a159b02c5a6fa" 717 | dependencies: 718 | esutils "^2.0.2" 719 | isarray "^1.0.0" 720 | 721 | doctrine@^2.0.0: 722 | version "2.0.0" 723 | resolved "https://registry.yarnpkg.com/doctrine/-/doctrine-2.0.0.tgz#c73d8d2909d22291e1a007a395804da8b665fe63" 724 | dependencies: 725 | esutils "^2.0.2" 726 | isarray "^1.0.0" 727 | 728 | electron-to-chromium@^1.3.11: 729 | version "1.3.14" 730 | resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.3.14.tgz#64af0f9efd3c3c6acd57d71f83b49ca7ee9c4b43" 731 | 732 | error-ex@^1.2.0: 733 | version "1.3.1" 734 | resolved "https://registry.yarnpkg.com/error-ex/-/error-ex-1.3.1.tgz#f855a86ce61adc4e8621c3cda21e7a7612c3a8dc" 735 | dependencies: 736 | is-arrayish "^0.2.1" 737 | 738 | es5-ext@^0.10.14, es5-ext@^0.10.9, es5-ext@~0.10.14: 739 | version "0.10.23" 740 | resolved "https://registry.yarnpkg.com/es5-ext/-/es5-ext-0.10.23.tgz#7578b51be974207a5487821b56538c224e4e7b38" 741 | dependencies: 742 | es6-iterator "2" 743 | es6-symbol "~3.1" 744 | 745 | es6-iterator@2, es6-iterator@^2.0.1, es6-iterator@~2.0.1: 746 | version "2.0.1" 747 | resolved "https://registry.yarnpkg.com/es6-iterator/-/es6-iterator-2.0.1.tgz#8e319c9f0453bf575d374940a655920e59ca5512" 748 | dependencies: 749 | d "1" 750 | es5-ext "^0.10.14" 751 | es6-symbol "^3.1" 752 | 753 | es6-map@^0.1.3: 754 | version "0.1.5" 755 | resolved "https://registry.yarnpkg.com/es6-map/-/es6-map-0.1.5.tgz#9136e0503dcc06a301690f0bb14ff4e364e949f0" 756 | dependencies: 757 | d "1" 758 | es5-ext "~0.10.14" 759 | es6-iterator "~2.0.1" 760 | es6-set "~0.1.5" 761 | es6-symbol "~3.1.1" 762 | event-emitter "~0.3.5" 763 | 764 | es6-set@~0.1.5: 765 | version "0.1.5" 766 | resolved "https://registry.yarnpkg.com/es6-set/-/es6-set-0.1.5.tgz#d2b3ec5d4d800ced818db538d28974db0a73ccb1" 767 | dependencies: 768 | d "1" 769 | es5-ext "~0.10.14" 770 | es6-iterator "~2.0.1" 771 | es6-symbol "3.1.1" 772 | event-emitter "~0.3.5" 773 | 774 | es6-symbol@3.1.1, es6-symbol@^3.1, es6-symbol@^3.1.1, es6-symbol@~3.1, es6-symbol@~3.1.1: 775 | version "3.1.1" 776 | resolved "https://registry.yarnpkg.com/es6-symbol/-/es6-symbol-3.1.1.tgz#bf00ef4fdab6ba1b46ecb7b629b4c7ed5715cc77" 777 | dependencies: 778 | d "1" 779 | es5-ext "~0.10.14" 780 | 781 | es6-weak-map@^2.0.1: 782 | version "2.0.2" 783 | resolved "https://registry.yarnpkg.com/es6-weak-map/-/es6-weak-map-2.0.2.tgz#5e3ab32251ffd1538a1f8e5ffa1357772f92d96f" 784 | dependencies: 785 | d "1" 786 | es5-ext "^0.10.14" 787 | es6-iterator "^2.0.1" 788 | es6-symbol "^3.1.1" 789 | 790 | escape-string-regexp@1.0.5, escape-string-regexp@^1.0.2, escape-string-regexp@^1.0.5: 791 | version "1.0.5" 792 | resolved "https://registry.yarnpkg.com/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz#1b61c0562190a8dff6ae3bb2cf0200ca130b86d4" 793 | 794 | escope@^3.6.0: 795 | version "3.6.0" 796 | resolved "https://registry.yarnpkg.com/escope/-/escope-3.6.0.tgz#e01975e812781a163a6dadfdd80398dc64c889c3" 797 | dependencies: 798 | es6-map "^0.1.3" 799 | es6-weak-map "^2.0.1" 800 | esrecurse "^4.1.0" 801 | estraverse "^4.1.1" 802 | 803 | eslint-config-standard@^10.2.1: 804 | version "10.2.1" 805 | resolved "https://registry.yarnpkg.com/eslint-config-standard/-/eslint-config-standard-10.2.1.tgz#c061e4d066f379dc17cd562c64e819b4dd454591" 806 | 807 | eslint-import-resolver-node@^0.2.0: 808 | version "0.2.3" 809 | resolved "https://registry.yarnpkg.com/eslint-import-resolver-node/-/eslint-import-resolver-node-0.2.3.tgz#5add8106e8c928db2cba232bcd9efa846e3da16c" 810 | dependencies: 811 | debug "^2.2.0" 812 | object-assign "^4.0.1" 813 | resolve "^1.1.6" 814 | 815 | eslint-module-utils@^2.0.0: 816 | version "2.0.0" 817 | resolved "https://registry.yarnpkg.com/eslint-module-utils/-/eslint-module-utils-2.0.0.tgz#a6f8c21d901358759cdc35dbac1982ae1ee58bce" 818 | dependencies: 819 | debug "2.2.0" 820 | pkg-dir "^1.0.0" 821 | 822 | eslint-plugin-import@^2.3.0: 823 | version "2.3.0" 824 | resolved "https://registry.yarnpkg.com/eslint-plugin-import/-/eslint-plugin-import-2.3.0.tgz#37c801e0ada0e296cbdf20c3f393acb5b52af36b" 825 | dependencies: 826 | builtin-modules "^1.1.1" 827 | contains-path "^0.1.0" 828 | debug "^2.2.0" 829 | doctrine "1.5.0" 830 | eslint-import-resolver-node "^0.2.0" 831 | eslint-module-utils "^2.0.0" 832 | has "^1.0.1" 833 | lodash.cond "^4.3.0" 834 | minimatch "^3.0.3" 835 | read-pkg-up "^2.0.0" 836 | 837 | eslint-plugin-node@^5.0.0: 838 | version "5.0.0" 839 | resolved "https://registry.yarnpkg.com/eslint-plugin-node/-/eslint-plugin-node-5.0.0.tgz#948b1fb82e3f0a744e86fad19aa4f49537d246cc" 840 | dependencies: 841 | ignore "^3.3.3" 842 | minimatch "^3.0.4" 843 | resolve "^1.3.3" 844 | semver "5.3.0" 845 | 846 | eslint-plugin-promise@^3.5.0: 847 | version "3.5.0" 848 | resolved "https://registry.yarnpkg.com/eslint-plugin-promise/-/eslint-plugin-promise-3.5.0.tgz#78fbb6ffe047201627569e85a6c5373af2a68fca" 849 | 850 | eslint-plugin-standard@^3.0.1: 851 | version "3.0.1" 852 | resolved "https://registry.yarnpkg.com/eslint-plugin-standard/-/eslint-plugin-standard-3.0.1.tgz#34d0c915b45edc6f010393c7eef3823b08565cf2" 853 | 854 | eslint@^3.19.0: 855 | version "3.19.0" 856 | resolved "https://registry.yarnpkg.com/eslint/-/eslint-3.19.0.tgz#c8fc6201c7f40dd08941b87c085767386a679acc" 857 | dependencies: 858 | babel-code-frame "^6.16.0" 859 | chalk "^1.1.3" 860 | concat-stream "^1.5.2" 861 | debug "^2.1.1" 862 | doctrine "^2.0.0" 863 | escope "^3.6.0" 864 | espree "^3.4.0" 865 | esquery "^1.0.0" 866 | estraverse "^4.2.0" 867 | esutils "^2.0.2" 868 | file-entry-cache "^2.0.0" 869 | glob "^7.0.3" 870 | globals "^9.14.0" 871 | ignore "^3.2.0" 872 | imurmurhash "^0.1.4" 873 | inquirer "^0.12.0" 874 | is-my-json-valid "^2.10.0" 875 | is-resolvable "^1.0.0" 876 | js-yaml "^3.5.1" 877 | json-stable-stringify "^1.0.0" 878 | levn "^0.3.0" 879 | lodash "^4.0.0" 880 | mkdirp "^0.5.0" 881 | natural-compare "^1.4.0" 882 | optionator "^0.8.2" 883 | path-is-inside "^1.0.1" 884 | pluralize "^1.2.1" 885 | progress "^1.1.8" 886 | require-uncached "^1.0.2" 887 | shelljs "^0.7.5" 888 | strip-bom "^3.0.0" 889 | strip-json-comments "~2.0.1" 890 | table "^3.7.8" 891 | text-table "~0.2.0" 892 | user-home "^2.0.0" 893 | 894 | espree@^3.4.0: 895 | version "3.4.3" 896 | resolved "https://registry.yarnpkg.com/espree/-/espree-3.4.3.tgz#2910b5ccd49ce893c2ffffaab4fd8b3a31b82374" 897 | dependencies: 898 | acorn "^5.0.1" 899 | acorn-jsx "^3.0.0" 900 | 901 | esprima@^3.1.1: 902 | version "3.1.3" 903 | resolved "https://registry.yarnpkg.com/esprima/-/esprima-3.1.3.tgz#fdca51cee6133895e3c88d535ce49dbff62a4633" 904 | 905 | esquery@^1.0.0: 906 | version "1.0.0" 907 | resolved "https://registry.yarnpkg.com/esquery/-/esquery-1.0.0.tgz#cfba8b57d7fba93f17298a8a006a04cda13d80fa" 908 | dependencies: 909 | estraverse "^4.0.0" 910 | 911 | esrecurse@^4.1.0: 912 | version "4.1.0" 913 | resolved "https://registry.yarnpkg.com/esrecurse/-/esrecurse-4.1.0.tgz#4713b6536adf7f2ac4f327d559e7756bff648220" 914 | dependencies: 915 | estraverse "~4.1.0" 916 | object-assign "^4.0.1" 917 | 918 | estraverse@^4.0.0, estraverse@^4.1.1, estraverse@^4.2.0: 919 | version "4.2.0" 920 | resolved "https://registry.yarnpkg.com/estraverse/-/estraverse-4.2.0.tgz#0dee3fed31fcd469618ce7342099fc1afa0bdb13" 921 | 922 | estraverse@~4.1.0: 923 | version "4.1.1" 924 | resolved "https://registry.yarnpkg.com/estraverse/-/estraverse-4.1.1.tgz#f6caca728933a850ef90661d0e17982ba47111a2" 925 | 926 | estree-walker@^0.2.1: 927 | version "0.2.1" 928 | resolved "https://registry.yarnpkg.com/estree-walker/-/estree-walker-0.2.1.tgz#bdafe8095383d8414d5dc2ecf4c9173b6db9412e" 929 | 930 | estree-walker@^0.3.0: 931 | version "0.3.1" 932 | resolved "https://registry.yarnpkg.com/estree-walker/-/estree-walker-0.3.1.tgz#e6b1a51cf7292524e7237c312e5fe6660c1ce1aa" 933 | 934 | esutils@^2.0.2: 935 | version "2.0.2" 936 | resolved "https://registry.yarnpkg.com/esutils/-/esutils-2.0.2.tgz#0abf4f1caa5bcb1f7a9d8acc6dea4faaa04bac9b" 937 | 938 | event-emitter@~0.3.5: 939 | version "0.3.5" 940 | resolved "https://registry.yarnpkg.com/event-emitter/-/event-emitter-0.3.5.tgz#df8c69eef1647923c7157b9ce83840610b02cc39" 941 | dependencies: 942 | d "1" 943 | es5-ext "~0.10.14" 944 | 945 | exit-hook@^1.0.0: 946 | version "1.1.1" 947 | resolved "https://registry.yarnpkg.com/exit-hook/-/exit-hook-1.1.1.tgz#f05ca233b48c05d54fff07765df8507e95c02ff8" 948 | 949 | expand-brackets@^0.1.4: 950 | version "0.1.5" 951 | resolved "https://registry.yarnpkg.com/expand-brackets/-/expand-brackets-0.1.5.tgz#df07284e342a807cd733ac5af72411e581d1177b" 952 | dependencies: 953 | is-posix-bracket "^0.1.0" 954 | 955 | expand-range@^1.8.1: 956 | version "1.8.2" 957 | resolved "https://registry.yarnpkg.com/expand-range/-/expand-range-1.8.2.tgz#a299effd335fe2721ebae8e257ec79644fc85337" 958 | dependencies: 959 | fill-range "^2.1.0" 960 | 961 | extglob@^0.3.1: 962 | version "0.3.2" 963 | resolved "https://registry.yarnpkg.com/extglob/-/extglob-0.3.2.tgz#2e18ff3d2f49ab2765cec9023f011daa8d8349a1" 964 | dependencies: 965 | is-extglob "^1.0.0" 966 | 967 | fast-levenshtein@~2.0.4: 968 | version "2.0.6" 969 | resolved "https://registry.yarnpkg.com/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz#3d8a5c66883a16a30ca8643e851f19baa7797917" 970 | 971 | figures@^1.3.5: 972 | version "1.7.0" 973 | resolved "https://registry.yarnpkg.com/figures/-/figures-1.7.0.tgz#cbe1e3affcf1cd44b80cadfed28dc793a9701d2e" 974 | dependencies: 975 | escape-string-regexp "^1.0.5" 976 | object-assign "^4.1.0" 977 | 978 | file-entry-cache@^2.0.0: 979 | version "2.0.0" 980 | resolved "https://registry.yarnpkg.com/file-entry-cache/-/file-entry-cache-2.0.0.tgz#c392990c3e684783d838b8c84a45d8a048458361" 981 | dependencies: 982 | flat-cache "^1.2.1" 983 | object-assign "^4.0.1" 984 | 985 | filename-regex@^2.0.0: 986 | version "2.0.1" 987 | resolved "https://registry.yarnpkg.com/filename-regex/-/filename-regex-2.0.1.tgz#c1c4b9bee3e09725ddb106b75c1e301fe2f18b26" 988 | 989 | fill-range@^2.1.0: 990 | version "2.2.3" 991 | resolved "https://registry.yarnpkg.com/fill-range/-/fill-range-2.2.3.tgz#50b77dfd7e469bc7492470963699fe7a8485a723" 992 | dependencies: 993 | is-number "^2.1.0" 994 | isobject "^2.0.0" 995 | randomatic "^1.1.3" 996 | repeat-element "^1.1.2" 997 | repeat-string "^1.5.2" 998 | 999 | find-up@^1.0.0: 1000 | version "1.1.2" 1001 | resolved "https://registry.yarnpkg.com/find-up/-/find-up-1.1.2.tgz#6b2e9822b1a2ce0a60ab64d610eccad53cb24d0f" 1002 | dependencies: 1003 | path-exists "^2.0.0" 1004 | pinkie-promise "^2.0.0" 1005 | 1006 | find-up@^2.0.0: 1007 | version "2.1.0" 1008 | resolved "https://registry.yarnpkg.com/find-up/-/find-up-2.1.0.tgz#45d1b7e506c717ddd482775a2b77920a3c0c57a7" 1009 | dependencies: 1010 | locate-path "^2.0.0" 1011 | 1012 | flat-cache@^1.2.1: 1013 | version "1.2.2" 1014 | resolved "https://registry.yarnpkg.com/flat-cache/-/flat-cache-1.2.2.tgz#fa86714e72c21db88601761ecf2f555d1abc6b96" 1015 | dependencies: 1016 | circular-json "^0.3.1" 1017 | del "^2.0.2" 1018 | graceful-fs "^4.1.2" 1019 | write "^0.2.1" 1020 | 1021 | for-in@^1.0.1: 1022 | version "1.0.2" 1023 | resolved "https://registry.yarnpkg.com/for-in/-/for-in-1.0.2.tgz#81068d295a8142ec0ac726c6e2200c30fb6d5e80" 1024 | 1025 | for-own@^0.1.4: 1026 | version "0.1.5" 1027 | resolved "https://registry.yarnpkg.com/for-own/-/for-own-0.1.5.tgz#5265c681a4f294dabbf17c9509b6763aa84510ce" 1028 | dependencies: 1029 | for-in "^1.0.1" 1030 | 1031 | fs.realpath@^1.0.0: 1032 | version "1.0.0" 1033 | resolved "https://registry.yarnpkg.com/fs.realpath/-/fs.realpath-1.0.0.tgz#1504ad2523158caa40db4a2787cb01411994ea4f" 1034 | 1035 | function-bind@^1.0.2: 1036 | version "1.1.0" 1037 | resolved "https://registry.yarnpkg.com/function-bind/-/function-bind-1.1.0.tgz#16176714c801798e4e8f2cf7f7529467bb4a5771" 1038 | 1039 | generate-function@^2.0.0: 1040 | version "2.0.0" 1041 | resolved "https://registry.yarnpkg.com/generate-function/-/generate-function-2.0.0.tgz#6858fe7c0969b7d4e9093337647ac79f60dfbe74" 1042 | 1043 | generate-object-property@^1.1.0: 1044 | version "1.2.0" 1045 | resolved "https://registry.yarnpkg.com/generate-object-property/-/generate-object-property-1.2.0.tgz#9c0e1c40308ce804f4783618b937fa88f99d50d0" 1046 | dependencies: 1047 | is-property "^1.0.0" 1048 | 1049 | glob-base@^0.3.0: 1050 | version "0.3.0" 1051 | resolved "https://registry.yarnpkg.com/glob-base/-/glob-base-0.3.0.tgz#dbb164f6221b1c0b1ccf82aea328b497df0ea3c4" 1052 | dependencies: 1053 | glob-parent "^2.0.0" 1054 | is-glob "^2.0.0" 1055 | 1056 | glob-parent@^2.0.0: 1057 | version "2.0.0" 1058 | resolved "https://registry.yarnpkg.com/glob-parent/-/glob-parent-2.0.0.tgz#81383d72db054fcccf5336daa902f182f6edbb28" 1059 | dependencies: 1060 | is-glob "^2.0.0" 1061 | 1062 | glob@7.1.1, glob@^7.0.0, glob@^7.0.3, glob@^7.0.5: 1063 | version "7.1.1" 1064 | resolved "https://registry.yarnpkg.com/glob/-/glob-7.1.1.tgz#805211df04faaf1c63a3600306cdf5ade50b2ec8" 1065 | dependencies: 1066 | fs.realpath "^1.0.0" 1067 | inflight "^1.0.4" 1068 | inherits "2" 1069 | minimatch "^3.0.2" 1070 | once "^1.3.0" 1071 | path-is-absolute "^1.0.0" 1072 | 1073 | globals@^9.0.0, globals@^9.14.0: 1074 | version "9.17.0" 1075 | resolved "https://registry.yarnpkg.com/globals/-/globals-9.17.0.tgz#0c0ca696d9b9bb694d2e5470bd37777caad50286" 1076 | 1077 | globby@^5.0.0: 1078 | version "5.0.0" 1079 | resolved "https://registry.yarnpkg.com/globby/-/globby-5.0.0.tgz#ebd84667ca0dbb330b99bcfc68eac2bc54370e0d" 1080 | dependencies: 1081 | array-union "^1.0.1" 1082 | arrify "^1.0.0" 1083 | glob "^7.0.3" 1084 | object-assign "^4.0.1" 1085 | pify "^2.0.0" 1086 | pinkie-promise "^2.0.0" 1087 | 1088 | graceful-fs@^4.1.2: 1089 | version "4.1.11" 1090 | resolved "https://registry.yarnpkg.com/graceful-fs/-/graceful-fs-4.1.11.tgz#0e8bdfe4d1ddb8854d64e04ea7c00e2a026e5658" 1091 | 1092 | "graceful-readlink@>= 1.0.0": 1093 | version "1.0.1" 1094 | resolved "https://registry.yarnpkg.com/graceful-readlink/-/graceful-readlink-1.0.1.tgz#4cafad76bc62f02fa039b2f94e9a3dd3a391a725" 1095 | 1096 | growl@1.9.2: 1097 | version "1.9.2" 1098 | resolved "https://registry.yarnpkg.com/growl/-/growl-1.9.2.tgz#0ea7743715db8d8de2c5ede1775e1b45ac85c02f" 1099 | 1100 | has-ansi@^2.0.0: 1101 | version "2.0.0" 1102 | resolved "https://registry.yarnpkg.com/has-ansi/-/has-ansi-2.0.0.tgz#34f5049ce1ecdf2b0649af3ef24e45ed35416d91" 1103 | dependencies: 1104 | ansi-regex "^2.0.0" 1105 | 1106 | has-flag@^1.0.0: 1107 | version "1.0.0" 1108 | resolved "https://registry.yarnpkg.com/has-flag/-/has-flag-1.0.0.tgz#9d9e793165ce017a00f00418c43f942a7b1d11fa" 1109 | 1110 | has@^1.0.1: 1111 | version "1.0.1" 1112 | resolved "https://registry.yarnpkg.com/has/-/has-1.0.1.tgz#8461733f538b0837c9361e39a9ab9e9704dc2f28" 1113 | dependencies: 1114 | function-bind "^1.0.2" 1115 | 1116 | home-or-tmp@^2.0.0: 1117 | version "2.0.0" 1118 | resolved "https://registry.yarnpkg.com/home-or-tmp/-/home-or-tmp-2.0.0.tgz#e36c3f2d2cae7d746a857e38d18d5f32a7882db8" 1119 | dependencies: 1120 | os-homedir "^1.0.0" 1121 | os-tmpdir "^1.0.1" 1122 | 1123 | hosted-git-info@^2.1.4: 1124 | version "2.4.2" 1125 | resolved "https://registry.yarnpkg.com/hosted-git-info/-/hosted-git-info-2.4.2.tgz#0076b9f46a270506ddbaaea56496897460612a67" 1126 | 1127 | ignore@^3.2.0, ignore@^3.3.3: 1128 | version "3.3.3" 1129 | resolved "https://registry.yarnpkg.com/ignore/-/ignore-3.3.3.tgz#432352e57accd87ab3110e82d3fea0e47812156d" 1130 | 1131 | imurmurhash@^0.1.4: 1132 | version "0.1.4" 1133 | resolved "https://registry.yarnpkg.com/imurmurhash/-/imurmurhash-0.1.4.tgz#9218b9b2b928a238b13dc4fb6b6d576f231453ea" 1134 | 1135 | inflight@^1.0.4: 1136 | version "1.0.6" 1137 | resolved "https://registry.yarnpkg.com/inflight/-/inflight-1.0.6.tgz#49bd6331d7d02d0c09bc910a1075ba8165b56df9" 1138 | dependencies: 1139 | once "^1.3.0" 1140 | wrappy "1" 1141 | 1142 | inherits@2, inherits@^2.0.3, inherits@~2.0.1: 1143 | version "2.0.3" 1144 | resolved "https://registry.yarnpkg.com/inherits/-/inherits-2.0.3.tgz#633c2c83e3da42a502f52466022480f4208261de" 1145 | 1146 | inquirer@^0.12.0: 1147 | version "0.12.0" 1148 | resolved "https://registry.yarnpkg.com/inquirer/-/inquirer-0.12.0.tgz#1ef2bfd63504df0bc75785fff8c2c41df12f077e" 1149 | dependencies: 1150 | ansi-escapes "^1.1.0" 1151 | ansi-regex "^2.0.0" 1152 | chalk "^1.0.0" 1153 | cli-cursor "^1.0.1" 1154 | cli-width "^2.0.0" 1155 | figures "^1.3.5" 1156 | lodash "^4.3.0" 1157 | readline2 "^1.0.1" 1158 | run-async "^0.1.0" 1159 | rx-lite "^3.1.2" 1160 | string-width "^1.0.1" 1161 | strip-ansi "^3.0.0" 1162 | through "^2.3.6" 1163 | 1164 | interpret@^1.0.0: 1165 | version "1.0.3" 1166 | resolved "https://registry.yarnpkg.com/interpret/-/interpret-1.0.3.tgz#cbc35c62eeee73f19ab7b10a801511401afc0f90" 1167 | 1168 | invariant@^2.2.0, invariant@^2.2.2: 1169 | version "2.2.2" 1170 | resolved "https://registry.yarnpkg.com/invariant/-/invariant-2.2.2.tgz#9e1f56ac0acdb6bf303306f338be3b204ae60360" 1171 | dependencies: 1172 | loose-envify "^1.0.0" 1173 | 1174 | is-arrayish@^0.2.1: 1175 | version "0.2.1" 1176 | resolved "https://registry.yarnpkg.com/is-arrayish/-/is-arrayish-0.2.1.tgz#77c99840527aa8ecb1a8ba697b80645a7a926a9d" 1177 | 1178 | is-buffer@^1.1.5: 1179 | version "1.1.5" 1180 | resolved "https://registry.yarnpkg.com/is-buffer/-/is-buffer-1.1.5.tgz#1f3b26ef613b214b88cbca23cc6c01d87961eecc" 1181 | 1182 | is-builtin-module@^1.0.0: 1183 | version "1.0.0" 1184 | resolved "https://registry.yarnpkg.com/is-builtin-module/-/is-builtin-module-1.0.0.tgz#540572d34f7ac3119f8f76c30cbc1b1e037affbe" 1185 | dependencies: 1186 | builtin-modules "^1.0.0" 1187 | 1188 | is-dotfile@^1.0.0: 1189 | version "1.0.2" 1190 | resolved "https://registry.yarnpkg.com/is-dotfile/-/is-dotfile-1.0.2.tgz#2c132383f39199f8edc268ca01b9b007d205cc4d" 1191 | 1192 | is-equal-shallow@^0.1.3: 1193 | version "0.1.3" 1194 | resolved "https://registry.yarnpkg.com/is-equal-shallow/-/is-equal-shallow-0.1.3.tgz#2238098fc221de0bcfa5d9eac4c45d638aa1c534" 1195 | dependencies: 1196 | is-primitive "^2.0.0" 1197 | 1198 | is-extendable@^0.1.1: 1199 | version "0.1.1" 1200 | resolved "https://registry.yarnpkg.com/is-extendable/-/is-extendable-0.1.1.tgz#62b110e289a471418e3ec36a617d472e301dfc89" 1201 | 1202 | is-extglob@^1.0.0: 1203 | version "1.0.0" 1204 | resolved "https://registry.yarnpkg.com/is-extglob/-/is-extglob-1.0.0.tgz#ac468177c4943405a092fc8f29760c6ffc6206c0" 1205 | 1206 | is-finite@^1.0.0: 1207 | version "1.0.2" 1208 | resolved "https://registry.yarnpkg.com/is-finite/-/is-finite-1.0.2.tgz#cc6677695602be550ef11e8b4aa6305342b6d0aa" 1209 | dependencies: 1210 | number-is-nan "^1.0.0" 1211 | 1212 | is-fullwidth-code-point@^1.0.0: 1213 | version "1.0.0" 1214 | resolved "https://registry.yarnpkg.com/is-fullwidth-code-point/-/is-fullwidth-code-point-1.0.0.tgz#ef9e31386f031a7f0d643af82fde50c457ef00cb" 1215 | dependencies: 1216 | number-is-nan "^1.0.0" 1217 | 1218 | is-fullwidth-code-point@^2.0.0: 1219 | version "2.0.0" 1220 | resolved "https://registry.yarnpkg.com/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz#a3b30a5c4f199183167aaab93beefae3ddfb654f" 1221 | 1222 | is-glob@^2.0.0, is-glob@^2.0.1: 1223 | version "2.0.1" 1224 | resolved "https://registry.yarnpkg.com/is-glob/-/is-glob-2.0.1.tgz#d096f926a3ded5600f3fdfd91198cb0888c2d863" 1225 | dependencies: 1226 | is-extglob "^1.0.0" 1227 | 1228 | is-module@^1.0.0: 1229 | version "1.0.0" 1230 | resolved "https://registry.yarnpkg.com/is-module/-/is-module-1.0.0.tgz#3258fb69f78c14d5b815d664336b4cffb6441591" 1231 | 1232 | is-my-json-valid@^2.10.0: 1233 | version "2.16.0" 1234 | resolved "https://registry.yarnpkg.com/is-my-json-valid/-/is-my-json-valid-2.16.0.tgz#f079dd9bfdae65ee2038aae8acbc86ab109e3693" 1235 | dependencies: 1236 | generate-function "^2.0.0" 1237 | generate-object-property "^1.1.0" 1238 | jsonpointer "^4.0.0" 1239 | xtend "^4.0.0" 1240 | 1241 | is-number@^2.0.2, is-number@^2.1.0: 1242 | version "2.1.0" 1243 | resolved "https://registry.yarnpkg.com/is-number/-/is-number-2.1.0.tgz#01fcbbb393463a548f2f466cce16dece49db908f" 1244 | dependencies: 1245 | kind-of "^3.0.2" 1246 | 1247 | is-path-cwd@^1.0.0: 1248 | version "1.0.0" 1249 | resolved "https://registry.yarnpkg.com/is-path-cwd/-/is-path-cwd-1.0.0.tgz#d225ec23132e89edd38fda767472e62e65f1106d" 1250 | 1251 | is-path-in-cwd@^1.0.0: 1252 | version "1.0.0" 1253 | resolved "https://registry.yarnpkg.com/is-path-in-cwd/-/is-path-in-cwd-1.0.0.tgz#6477582b8214d602346094567003be8a9eac04dc" 1254 | dependencies: 1255 | is-path-inside "^1.0.0" 1256 | 1257 | is-path-inside@^1.0.0: 1258 | version "1.0.0" 1259 | resolved "https://registry.yarnpkg.com/is-path-inside/-/is-path-inside-1.0.0.tgz#fc06e5a1683fbda13de667aff717bbc10a48f37f" 1260 | dependencies: 1261 | path-is-inside "^1.0.1" 1262 | 1263 | is-posix-bracket@^0.1.0: 1264 | version "0.1.1" 1265 | resolved "https://registry.yarnpkg.com/is-posix-bracket/-/is-posix-bracket-0.1.1.tgz#3334dc79774368e92f016e6fbc0a88f5cd6e6bc4" 1266 | 1267 | is-primitive@^2.0.0: 1268 | version "2.0.0" 1269 | resolved "https://registry.yarnpkg.com/is-primitive/-/is-primitive-2.0.0.tgz#207bab91638499c07b2adf240a41a87210034575" 1270 | 1271 | is-property@^1.0.0: 1272 | version "1.0.2" 1273 | resolved "https://registry.yarnpkg.com/is-property/-/is-property-1.0.2.tgz#57fe1c4e48474edd65b09911f26b1cd4095dda84" 1274 | 1275 | is-resolvable@^1.0.0: 1276 | version "1.0.0" 1277 | resolved "https://registry.yarnpkg.com/is-resolvable/-/is-resolvable-1.0.0.tgz#8df57c61ea2e3c501408d100fb013cf8d6e0cc62" 1278 | dependencies: 1279 | tryit "^1.0.1" 1280 | 1281 | isarray@1.0.0, isarray@^1.0.0, isarray@~1.0.0: 1282 | version "1.0.0" 1283 | resolved "https://registry.yarnpkg.com/isarray/-/isarray-1.0.0.tgz#bb935d48582cba168c06834957a54a3e07124f11" 1284 | 1285 | isobject@^2.0.0: 1286 | version "2.1.0" 1287 | resolved "https://registry.yarnpkg.com/isobject/-/isobject-2.1.0.tgz#f065561096a3f1da2ef46272f815c840d87e0c89" 1288 | dependencies: 1289 | isarray "1.0.0" 1290 | 1291 | js-tokens@^3.0.0: 1292 | version "3.0.1" 1293 | resolved "https://registry.yarnpkg.com/js-tokens/-/js-tokens-3.0.1.tgz#08e9f132484a2c45a30907e9dc4d5567b7f114d7" 1294 | 1295 | js-yaml@^3.5.1: 1296 | version "3.8.4" 1297 | resolved "https://registry.yarnpkg.com/js-yaml/-/js-yaml-3.8.4.tgz#520b4564f86573ba96662af85a8cafa7b4b5a6f6" 1298 | dependencies: 1299 | argparse "^1.0.7" 1300 | esprima "^3.1.1" 1301 | 1302 | jsesc@^1.3.0: 1303 | version "1.3.0" 1304 | resolved "https://registry.yarnpkg.com/jsesc/-/jsesc-1.3.0.tgz#46c3fec8c1892b12b0833db9bc7622176dbab34b" 1305 | 1306 | jsesc@~0.5.0: 1307 | version "0.5.0" 1308 | resolved "https://registry.yarnpkg.com/jsesc/-/jsesc-0.5.0.tgz#e7dee66e35d6fc16f710fe91d5cf69f70f08911d" 1309 | 1310 | json-stable-stringify@^1.0.0, json-stable-stringify@^1.0.1: 1311 | version "1.0.1" 1312 | resolved "https://registry.yarnpkg.com/json-stable-stringify/-/json-stable-stringify-1.0.1.tgz#9a759d39c5f2ff503fd5300646ed445f88c4f9af" 1313 | dependencies: 1314 | jsonify "~0.0.0" 1315 | 1316 | json3@3.3.2: 1317 | version "3.3.2" 1318 | resolved "https://registry.yarnpkg.com/json3/-/json3-3.3.2.tgz#3c0434743df93e2f5c42aee7b19bcb483575f4e1" 1319 | 1320 | json5@^0.5.0: 1321 | version "0.5.1" 1322 | resolved "https://registry.yarnpkg.com/json5/-/json5-0.5.1.tgz#1eade7acc012034ad84e2396767ead9fa5495821" 1323 | 1324 | jsonify@~0.0.0: 1325 | version "0.0.0" 1326 | resolved "https://registry.yarnpkg.com/jsonify/-/jsonify-0.0.0.tgz#2c74b6ee41d93ca51b7b5aaee8f503631d252a73" 1327 | 1328 | jsonpointer@^4.0.0: 1329 | version "4.0.1" 1330 | resolved "https://registry.yarnpkg.com/jsonpointer/-/jsonpointer-4.0.1.tgz#4fd92cb34e0e9db3c89c8622ecf51f9b978c6cb9" 1331 | 1332 | kind-of@^3.0.2: 1333 | version "3.2.2" 1334 | resolved "https://registry.yarnpkg.com/kind-of/-/kind-of-3.2.2.tgz#31ea21a734bab9bbb0f32466d893aea51e4a3c64" 1335 | dependencies: 1336 | is-buffer "^1.1.5" 1337 | 1338 | levn@^0.3.0, levn@~0.3.0: 1339 | version "0.3.0" 1340 | resolved "https://registry.yarnpkg.com/levn/-/levn-0.3.0.tgz#3b09924edf9f083c0490fdd4c0bc4421e04764ee" 1341 | dependencies: 1342 | prelude-ls "~1.1.2" 1343 | type-check "~0.3.2" 1344 | 1345 | load-json-file@^2.0.0: 1346 | version "2.0.0" 1347 | resolved "https://registry.yarnpkg.com/load-json-file/-/load-json-file-2.0.0.tgz#7947e42149af80d696cbf797bcaabcfe1fe29ca8" 1348 | dependencies: 1349 | graceful-fs "^4.1.2" 1350 | parse-json "^2.2.0" 1351 | pify "^2.0.0" 1352 | strip-bom "^3.0.0" 1353 | 1354 | locate-path@^2.0.0: 1355 | version "2.0.0" 1356 | resolved "https://registry.yarnpkg.com/locate-path/-/locate-path-2.0.0.tgz#2b568b265eec944c6d9c0de9c3dbbbca0354cd8e" 1357 | dependencies: 1358 | p-locate "^2.0.0" 1359 | path-exists "^3.0.0" 1360 | 1361 | lodash._baseassign@^3.0.0: 1362 | version "3.2.0" 1363 | resolved "https://registry.yarnpkg.com/lodash._baseassign/-/lodash._baseassign-3.2.0.tgz#8c38a099500f215ad09e59f1722fd0c52bfe0a4e" 1364 | dependencies: 1365 | lodash._basecopy "^3.0.0" 1366 | lodash.keys "^3.0.0" 1367 | 1368 | lodash._basecopy@^3.0.0: 1369 | version "3.0.1" 1370 | resolved "https://registry.yarnpkg.com/lodash._basecopy/-/lodash._basecopy-3.0.1.tgz#8da0e6a876cf344c0ad8a54882111dd3c5c7ca36" 1371 | 1372 | lodash._basecreate@^3.0.0: 1373 | version "3.0.3" 1374 | resolved "https://registry.yarnpkg.com/lodash._basecreate/-/lodash._basecreate-3.0.3.tgz#1bc661614daa7fc311b7d03bf16806a0213cf821" 1375 | 1376 | lodash._getnative@^3.0.0: 1377 | version "3.9.1" 1378 | resolved "https://registry.yarnpkg.com/lodash._getnative/-/lodash._getnative-3.9.1.tgz#570bc7dede46d61cdcde687d65d3eecbaa3aaff5" 1379 | 1380 | lodash._isiterateecall@^3.0.0: 1381 | version "3.0.9" 1382 | resolved "https://registry.yarnpkg.com/lodash._isiterateecall/-/lodash._isiterateecall-3.0.9.tgz#5203ad7ba425fae842460e696db9cf3e6aac057c" 1383 | 1384 | lodash.cond@^4.3.0: 1385 | version "4.5.2" 1386 | resolved "https://registry.yarnpkg.com/lodash.cond/-/lodash.cond-4.5.2.tgz#f471a1da486be60f6ab955d17115523dd1d255d5" 1387 | 1388 | lodash.create@3.1.1: 1389 | version "3.1.1" 1390 | resolved "https://registry.yarnpkg.com/lodash.create/-/lodash.create-3.1.1.tgz#d7f2849f0dbda7e04682bb8cd72ab022461debe7" 1391 | dependencies: 1392 | lodash._baseassign "^3.0.0" 1393 | lodash._basecreate "^3.0.0" 1394 | lodash._isiterateecall "^3.0.0" 1395 | 1396 | lodash.isarguments@^3.0.0: 1397 | version "3.1.0" 1398 | resolved "https://registry.yarnpkg.com/lodash.isarguments/-/lodash.isarguments-3.1.0.tgz#2f573d85c6a24289ff00663b491c1d338ff3458a" 1399 | 1400 | lodash.isarray@^3.0.0: 1401 | version "3.0.4" 1402 | resolved "https://registry.yarnpkg.com/lodash.isarray/-/lodash.isarray-3.0.4.tgz#79e4eb88c36a8122af86f844aa9bcd851b5fbb55" 1403 | 1404 | lodash.keys@^3.0.0: 1405 | version "3.1.2" 1406 | resolved "https://registry.yarnpkg.com/lodash.keys/-/lodash.keys-3.1.2.tgz#4dbc0472b156be50a0b286855d1bd0b0c656098a" 1407 | dependencies: 1408 | lodash._getnative "^3.0.0" 1409 | lodash.isarguments "^3.0.0" 1410 | lodash.isarray "^3.0.0" 1411 | 1412 | lodash@^4.0.0, lodash@^4.2.0, lodash@^4.3.0: 1413 | version "4.17.4" 1414 | resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.4.tgz#78203a4d1c328ae1d86dca6460e369b57f4055ae" 1415 | 1416 | loose-envify@^1.0.0: 1417 | version "1.3.1" 1418 | resolved "https://registry.yarnpkg.com/loose-envify/-/loose-envify-1.3.1.tgz#d1a8ad33fa9ce0e713d65fdd0ac8b748d478c848" 1419 | dependencies: 1420 | js-tokens "^3.0.0" 1421 | 1422 | magic-string@^0.19.0: 1423 | version "0.19.1" 1424 | resolved "https://registry.yarnpkg.com/magic-string/-/magic-string-0.19.1.tgz#14d768013caf2ec8fdea16a49af82fc377e75201" 1425 | dependencies: 1426 | vlq "^0.2.1" 1427 | 1428 | micromatch@^2.3.11: 1429 | version "2.3.11" 1430 | resolved "https://registry.yarnpkg.com/micromatch/-/micromatch-2.3.11.tgz#86677c97d1720b363431d04d0d15293bd38c1565" 1431 | dependencies: 1432 | arr-diff "^2.0.0" 1433 | array-unique "^0.2.1" 1434 | braces "^1.8.2" 1435 | expand-brackets "^0.1.4" 1436 | extglob "^0.3.1" 1437 | filename-regex "^2.0.0" 1438 | is-extglob "^1.0.0" 1439 | is-glob "^2.0.1" 1440 | kind-of "^3.0.2" 1441 | normalize-path "^2.0.1" 1442 | object.omit "^2.0.0" 1443 | parse-glob "^3.0.4" 1444 | regex-cache "^0.4.2" 1445 | 1446 | minimatch@^3.0.2, minimatch@^3.0.3, minimatch@^3.0.4: 1447 | version "3.0.4" 1448 | resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-3.0.4.tgz#5166e286457f03306064be5497e8dbb0c3d32083" 1449 | dependencies: 1450 | brace-expansion "^1.1.7" 1451 | 1452 | minimist@0.0.8: 1453 | version "0.0.8" 1454 | resolved "https://registry.yarnpkg.com/minimist/-/minimist-0.0.8.tgz#857fcabfc3397d2625b8228262e86aa7a011b05d" 1455 | 1456 | mkdirp@0.5.1, mkdirp@^0.5.0, mkdirp@^0.5.1: 1457 | version "0.5.1" 1458 | resolved "https://registry.yarnpkg.com/mkdirp/-/mkdirp-0.5.1.tgz#30057438eac6cf7f8c4767f38648d6697d75c903" 1459 | dependencies: 1460 | minimist "0.0.8" 1461 | 1462 | mocha@^3.2.0: 1463 | version "3.4.2" 1464 | resolved "https://registry.yarnpkg.com/mocha/-/mocha-3.4.2.tgz#d0ef4d332126dbf18d0d640c9b382dd48be97594" 1465 | dependencies: 1466 | browser-stdout "1.3.0" 1467 | commander "2.9.0" 1468 | debug "2.6.0" 1469 | diff "3.2.0" 1470 | escape-string-regexp "1.0.5" 1471 | glob "7.1.1" 1472 | growl "1.9.2" 1473 | json3 "3.3.2" 1474 | lodash.create "3.1.1" 1475 | mkdirp "0.5.1" 1476 | supports-color "3.1.2" 1477 | 1478 | ms@0.7.1: 1479 | version "0.7.1" 1480 | resolved "https://registry.yarnpkg.com/ms/-/ms-0.7.1.tgz#9cd13c03adbff25b65effde7ce864ee952017098" 1481 | 1482 | ms@0.7.2: 1483 | version "0.7.2" 1484 | resolved "https://registry.yarnpkg.com/ms/-/ms-0.7.2.tgz#ae25cf2512b3885a1d95d7f037868d8431124765" 1485 | 1486 | ms@2.0.0: 1487 | version "2.0.0" 1488 | resolved "https://registry.yarnpkg.com/ms/-/ms-2.0.0.tgz#5608aeadfc00be6c2901df5f9861788de0d597c8" 1489 | 1490 | mute-stream@0.0.5: 1491 | version "0.0.5" 1492 | resolved "https://registry.yarnpkg.com/mute-stream/-/mute-stream-0.0.5.tgz#8fbfabb0a98a253d3184331f9e8deb7372fac6c0" 1493 | 1494 | natural-compare@^1.4.0: 1495 | version "1.4.0" 1496 | resolved "https://registry.yarnpkg.com/natural-compare/-/natural-compare-1.4.0.tgz#4abebfeed7541f2c27acfb29bdbbd15c8d5ba4f7" 1497 | 1498 | normalize-package-data@^2.3.2: 1499 | version "2.3.8" 1500 | resolved "https://registry.yarnpkg.com/normalize-package-data/-/normalize-package-data-2.3.8.tgz#d819eda2a9dedbd1ffa563ea4071d936782295bb" 1501 | dependencies: 1502 | hosted-git-info "^2.1.4" 1503 | is-builtin-module "^1.0.0" 1504 | semver "2 || 3 || 4 || 5" 1505 | validate-npm-package-license "^3.0.1" 1506 | 1507 | normalize-path@^2.0.1: 1508 | version "2.1.1" 1509 | resolved "https://registry.yarnpkg.com/normalize-path/-/normalize-path-2.1.1.tgz#1ab28b556e198363a8c1a6f7e6fa20137fe6aed9" 1510 | dependencies: 1511 | remove-trailing-separator "^1.0.1" 1512 | 1513 | number-is-nan@^1.0.0: 1514 | version "1.0.1" 1515 | resolved "https://registry.yarnpkg.com/number-is-nan/-/number-is-nan-1.0.1.tgz#097b602b53422a522c1afb8790318336941a011d" 1516 | 1517 | object-assign@^4.0.1, object-assign@^4.1.0: 1518 | version "4.1.1" 1519 | resolved "https://registry.yarnpkg.com/object-assign/-/object-assign-4.1.1.tgz#2109adc7965887cfc05cbbd442cac8bfbb360863" 1520 | 1521 | object.omit@^2.0.0: 1522 | version "2.0.1" 1523 | resolved "https://registry.yarnpkg.com/object.omit/-/object.omit-2.0.1.tgz#1a9c744829f39dbb858c76ca3579ae2a54ebd1fa" 1524 | dependencies: 1525 | for-own "^0.1.4" 1526 | is-extendable "^0.1.1" 1527 | 1528 | once@^1.3.0: 1529 | version "1.4.0" 1530 | resolved "https://registry.yarnpkg.com/once/-/once-1.4.0.tgz#583b1aa775961d4b113ac17d9c50baef9dd76bd1" 1531 | dependencies: 1532 | wrappy "1" 1533 | 1534 | onetime@^1.0.0: 1535 | version "1.1.0" 1536 | resolved "https://registry.yarnpkg.com/onetime/-/onetime-1.1.0.tgz#a1f7838f8314c516f05ecefcbc4ccfe04b4ed789" 1537 | 1538 | optionator@^0.8.2: 1539 | version "0.8.2" 1540 | resolved "https://registry.yarnpkg.com/optionator/-/optionator-0.8.2.tgz#364c5e409d3f4d6301d6c0b4c05bba50180aeb64" 1541 | dependencies: 1542 | deep-is "~0.1.3" 1543 | fast-levenshtein "~2.0.4" 1544 | levn "~0.3.0" 1545 | prelude-ls "~1.1.2" 1546 | type-check "~0.3.2" 1547 | wordwrap "~1.0.0" 1548 | 1549 | os-homedir@^1.0.0: 1550 | version "1.0.2" 1551 | resolved "https://registry.yarnpkg.com/os-homedir/-/os-homedir-1.0.2.tgz#ffbc4988336e0e833de0c168c7ef152121aa7fb3" 1552 | 1553 | os-tmpdir@^1.0.1: 1554 | version "1.0.2" 1555 | resolved "https://registry.yarnpkg.com/os-tmpdir/-/os-tmpdir-1.0.2.tgz#bbe67406c79aa85c5cfec766fe5734555dfa1274" 1556 | 1557 | p-limit@^1.1.0: 1558 | version "1.1.0" 1559 | resolved "https://registry.yarnpkg.com/p-limit/-/p-limit-1.1.0.tgz#b07ff2d9a5d88bec806035895a2bab66a27988bc" 1560 | 1561 | p-locate@^2.0.0: 1562 | version "2.0.0" 1563 | resolved "https://registry.yarnpkg.com/p-locate/-/p-locate-2.0.0.tgz#20a0103b222a70c8fd39cc2e580680f3dde5ec43" 1564 | dependencies: 1565 | p-limit "^1.1.0" 1566 | 1567 | parse-glob@^3.0.4: 1568 | version "3.0.4" 1569 | resolved "https://registry.yarnpkg.com/parse-glob/-/parse-glob-3.0.4.tgz#b2c376cfb11f35513badd173ef0bb6e3a388391c" 1570 | dependencies: 1571 | glob-base "^0.3.0" 1572 | is-dotfile "^1.0.0" 1573 | is-extglob "^1.0.0" 1574 | is-glob "^2.0.0" 1575 | 1576 | parse-json@^2.2.0: 1577 | version "2.2.0" 1578 | resolved "https://registry.yarnpkg.com/parse-json/-/parse-json-2.2.0.tgz#f480f40434ef80741f8469099f8dea18f55a4dc9" 1579 | dependencies: 1580 | error-ex "^1.2.0" 1581 | 1582 | path-exists@^2.0.0: 1583 | version "2.1.0" 1584 | resolved "https://registry.yarnpkg.com/path-exists/-/path-exists-2.1.0.tgz#0feb6c64f0fc518d9a754dd5efb62c7022761f4b" 1585 | dependencies: 1586 | pinkie-promise "^2.0.0" 1587 | 1588 | path-exists@^3.0.0: 1589 | version "3.0.0" 1590 | resolved "https://registry.yarnpkg.com/path-exists/-/path-exists-3.0.0.tgz#ce0ebeaa5f78cb18925ea7d810d7b59b010fd515" 1591 | 1592 | path-is-absolute@^1.0.0: 1593 | version "1.0.1" 1594 | resolved "https://registry.yarnpkg.com/path-is-absolute/-/path-is-absolute-1.0.1.tgz#174b9268735534ffbc7ace6bf53a5a9e1b5c5f5f" 1595 | 1596 | path-is-inside@^1.0.1: 1597 | version "1.0.2" 1598 | resolved "https://registry.yarnpkg.com/path-is-inside/-/path-is-inside-1.0.2.tgz#365417dede44430d1c11af61027facf074bdfc53" 1599 | 1600 | path-parse@^1.0.5: 1601 | version "1.0.5" 1602 | resolved "https://registry.yarnpkg.com/path-parse/-/path-parse-1.0.5.tgz#3c1adf871ea9cd6c9431b6ea2bd74a0ff055c4c1" 1603 | 1604 | path-type@^2.0.0: 1605 | version "2.0.0" 1606 | resolved "https://registry.yarnpkg.com/path-type/-/path-type-2.0.0.tgz#f012ccb8415b7096fc2daa1054c3d72389594c73" 1607 | dependencies: 1608 | pify "^2.0.0" 1609 | 1610 | pify@^2.0.0: 1611 | version "2.3.0" 1612 | resolved "https://registry.yarnpkg.com/pify/-/pify-2.3.0.tgz#ed141a6ac043a849ea588498e7dca8b15330e90c" 1613 | 1614 | pinkie-promise@^2.0.0: 1615 | version "2.0.1" 1616 | resolved "https://registry.yarnpkg.com/pinkie-promise/-/pinkie-promise-2.0.1.tgz#2135d6dfa7a358c069ac9b178776288228450ffa" 1617 | dependencies: 1618 | pinkie "^2.0.0" 1619 | 1620 | pinkie@^2.0.0: 1621 | version "2.0.4" 1622 | resolved "https://registry.yarnpkg.com/pinkie/-/pinkie-2.0.4.tgz#72556b80cfa0d48a974e80e77248e80ed4f7f870" 1623 | 1624 | pkg-dir@^1.0.0: 1625 | version "1.0.0" 1626 | resolved "https://registry.yarnpkg.com/pkg-dir/-/pkg-dir-1.0.0.tgz#7a4b508a8d5bb2d629d447056ff4e9c9314cf3d4" 1627 | dependencies: 1628 | find-up "^1.0.0" 1629 | 1630 | pluralize@^1.2.1: 1631 | version "1.2.1" 1632 | resolved "https://registry.yarnpkg.com/pluralize/-/pluralize-1.2.1.tgz#d1a21483fd22bb41e58a12fa3421823140897c45" 1633 | 1634 | prelude-ls@~1.1.2: 1635 | version "1.1.2" 1636 | resolved "https://registry.yarnpkg.com/prelude-ls/-/prelude-ls-1.1.2.tgz#21932a549f5e52ffd9a827f570e04be62a97da54" 1637 | 1638 | preserve@^0.2.0: 1639 | version "0.2.0" 1640 | resolved "https://registry.yarnpkg.com/preserve/-/preserve-0.2.0.tgz#815ed1f6ebc65926f865b310c0713bcb3315ce4b" 1641 | 1642 | private@^0.1.6: 1643 | version "0.1.7" 1644 | resolved "https://registry.yarnpkg.com/private/-/private-0.1.7.tgz#68ce5e8a1ef0a23bb570cc28537b5332aba63ef1" 1645 | 1646 | process-nextick-args@~1.0.6: 1647 | version "1.0.7" 1648 | resolved "https://registry.yarnpkg.com/process-nextick-args/-/process-nextick-args-1.0.7.tgz#150e20b756590ad3f91093f25a4f2ad8bff30ba3" 1649 | 1650 | progress@^1.1.8: 1651 | version "1.1.8" 1652 | resolved "https://registry.yarnpkg.com/progress/-/progress-1.1.8.tgz#e260c78f6161cdd9b0e56cc3e0a85de17c7a57be" 1653 | 1654 | randomatic@^1.1.3: 1655 | version "1.1.6" 1656 | resolved "https://registry.yarnpkg.com/randomatic/-/randomatic-1.1.6.tgz#110dcabff397e9dcff7c0789ccc0a49adf1ec5bb" 1657 | dependencies: 1658 | is-number "^2.0.2" 1659 | kind-of "^3.0.2" 1660 | 1661 | read-pkg-up@^2.0.0: 1662 | version "2.0.0" 1663 | resolved "https://registry.yarnpkg.com/read-pkg-up/-/read-pkg-up-2.0.0.tgz#6b72a8048984e0c41e79510fd5e9fa99b3b549be" 1664 | dependencies: 1665 | find-up "^2.0.0" 1666 | read-pkg "^2.0.0" 1667 | 1668 | read-pkg@^2.0.0: 1669 | version "2.0.0" 1670 | resolved "https://registry.yarnpkg.com/read-pkg/-/read-pkg-2.0.0.tgz#8ef1c0623c6a6db0dc6713c4bfac46332b2368f8" 1671 | dependencies: 1672 | load-json-file "^2.0.0" 1673 | normalize-package-data "^2.3.2" 1674 | path-type "^2.0.0" 1675 | 1676 | readable-stream@^2.2.2: 1677 | version "2.2.11" 1678 | resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-2.2.11.tgz#0796b31f8d7688007ff0b93a8088d34aa17c0f72" 1679 | dependencies: 1680 | core-util-is "~1.0.0" 1681 | inherits "~2.0.1" 1682 | isarray "~1.0.0" 1683 | process-nextick-args "~1.0.6" 1684 | safe-buffer "~5.0.1" 1685 | string_decoder "~1.0.0" 1686 | util-deprecate "~1.0.1" 1687 | 1688 | readline2@^1.0.1: 1689 | version "1.0.1" 1690 | resolved "https://registry.yarnpkg.com/readline2/-/readline2-1.0.1.tgz#41059608ffc154757b715d9989d199ffbf372e35" 1691 | dependencies: 1692 | code-point-at "^1.0.0" 1693 | is-fullwidth-code-point "^1.0.0" 1694 | mute-stream "0.0.5" 1695 | 1696 | rechoir@^0.6.2: 1697 | version "0.6.2" 1698 | resolved "https://registry.yarnpkg.com/rechoir/-/rechoir-0.6.2.tgz#85204b54dba82d5742e28c96756ef43af50e3384" 1699 | dependencies: 1700 | resolve "^1.1.6" 1701 | 1702 | regenerate@^1.2.1: 1703 | version "1.3.2" 1704 | resolved "https://registry.yarnpkg.com/regenerate/-/regenerate-1.3.2.tgz#d1941c67bad437e1be76433add5b385f95b19260" 1705 | 1706 | regenerator-runtime@^0.10.0: 1707 | version "0.10.5" 1708 | resolved "https://registry.yarnpkg.com/regenerator-runtime/-/regenerator-runtime-0.10.5.tgz#336c3efc1220adcedda2c9fab67b5a7955a33658" 1709 | 1710 | regenerator-transform@0.9.11: 1711 | version "0.9.11" 1712 | resolved "https://registry.yarnpkg.com/regenerator-transform/-/regenerator-transform-0.9.11.tgz#3a7d067520cb7b7176769eb5ff868691befe1283" 1713 | dependencies: 1714 | babel-runtime "^6.18.0" 1715 | babel-types "^6.19.0" 1716 | private "^0.1.6" 1717 | 1718 | regex-cache@^0.4.2: 1719 | version "0.4.3" 1720 | resolved "https://registry.yarnpkg.com/regex-cache/-/regex-cache-0.4.3.tgz#9b1a6c35d4d0dfcef5711ae651e8e9d3d7114145" 1721 | dependencies: 1722 | is-equal-shallow "^0.1.3" 1723 | is-primitive "^2.0.0" 1724 | 1725 | regexpu-core@^2.0.0: 1726 | version "2.0.0" 1727 | resolved "https://registry.yarnpkg.com/regexpu-core/-/regexpu-core-2.0.0.tgz#49d038837b8dcf8bfa5b9a42139938e6ea2ae240" 1728 | dependencies: 1729 | regenerate "^1.2.1" 1730 | regjsgen "^0.2.0" 1731 | regjsparser "^0.1.4" 1732 | 1733 | regjsgen@^0.2.0: 1734 | version "0.2.0" 1735 | resolved "https://registry.yarnpkg.com/regjsgen/-/regjsgen-0.2.0.tgz#6c016adeac554f75823fe37ac05b92d5a4edb1f7" 1736 | 1737 | regjsparser@^0.1.4: 1738 | version "0.1.5" 1739 | resolved "https://registry.yarnpkg.com/regjsparser/-/regjsparser-0.1.5.tgz#7ee8f84dc6fa792d3fd0ae228d24bd949ead205c" 1740 | dependencies: 1741 | jsesc "~0.5.0" 1742 | 1743 | remove-trailing-separator@^1.0.1: 1744 | version "1.0.1" 1745 | resolved "https://registry.yarnpkg.com/remove-trailing-separator/-/remove-trailing-separator-1.0.1.tgz#615ebb96af559552d4bf4057c8436d486ab63cc4" 1746 | 1747 | repeat-element@^1.1.2: 1748 | version "1.1.2" 1749 | resolved "https://registry.yarnpkg.com/repeat-element/-/repeat-element-1.1.2.tgz#ef089a178d1483baae4d93eb98b4f9e4e11d990a" 1750 | 1751 | repeat-string@^1.5.2: 1752 | version "1.6.1" 1753 | resolved "https://registry.yarnpkg.com/repeat-string/-/repeat-string-1.6.1.tgz#8dcae470e1c88abc2d600fff4a776286da75e637" 1754 | 1755 | repeating@^2.0.0: 1756 | version "2.0.1" 1757 | resolved "https://registry.yarnpkg.com/repeating/-/repeating-2.0.1.tgz#5214c53a926d3552707527fbab415dbc08d06dda" 1758 | dependencies: 1759 | is-finite "^1.0.0" 1760 | 1761 | require-uncached@^1.0.2: 1762 | version "1.0.3" 1763 | resolved "https://registry.yarnpkg.com/require-uncached/-/require-uncached-1.0.3.tgz#4e0d56d6c9662fd31e43011c4b95aa49955421d3" 1764 | dependencies: 1765 | caller-path "^0.1.0" 1766 | resolve-from "^1.0.0" 1767 | 1768 | resolve-from@^1.0.0: 1769 | version "1.0.1" 1770 | resolved "https://registry.yarnpkg.com/resolve-from/-/resolve-from-1.0.1.tgz#26cbfe935d1aeeeabb29bc3fe5aeb01e93d44226" 1771 | 1772 | resolve@1.1.7: 1773 | version "1.1.7" 1774 | resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.1.7.tgz#203114d82ad2c5ed9e8e0411b3932875e889e97b" 1775 | 1776 | resolve@^1.1.6, resolve@^1.1.7, resolve@^1.3.3: 1777 | version "1.3.3" 1778 | resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.3.3.tgz#655907c3469a8680dc2de3a275a8fdd69691f0e5" 1779 | dependencies: 1780 | path-parse "^1.0.5" 1781 | 1782 | restore-cursor@^1.0.1: 1783 | version "1.0.1" 1784 | resolved "https://registry.yarnpkg.com/restore-cursor/-/restore-cursor-1.0.1.tgz#34661f46886327fed2991479152252df92daa541" 1785 | dependencies: 1786 | exit-hook "^1.0.0" 1787 | onetime "^1.0.0" 1788 | 1789 | rimraf@^2.2.8: 1790 | version "2.6.1" 1791 | resolved "https://registry.yarnpkg.com/rimraf/-/rimraf-2.6.1.tgz#c2338ec643df7a1b7fe5c54fa86f57428a55f33d" 1792 | dependencies: 1793 | glob "^7.0.5" 1794 | 1795 | rollup-plugin-babel@^2.7.1: 1796 | version "2.7.1" 1797 | resolved "https://registry.yarnpkg.com/rollup-plugin-babel/-/rollup-plugin-babel-2.7.1.tgz#16528197b0f938a1536f44683c7a93d573182f57" 1798 | dependencies: 1799 | babel-core "6" 1800 | babel-plugin-transform-es2015-classes "^6.9.0" 1801 | object-assign "^4.1.0" 1802 | rollup-pluginutils "^1.5.0" 1803 | 1804 | rollup-plugin-commonjs@^8.0.2: 1805 | version "8.0.2" 1806 | resolved "https://registry.yarnpkg.com/rollup-plugin-commonjs/-/rollup-plugin-commonjs-8.0.2.tgz#98b1589bfe32a6c0f67790b60c0b499972afed89" 1807 | dependencies: 1808 | acorn "^4.0.1" 1809 | estree-walker "^0.3.0" 1810 | magic-string "^0.19.0" 1811 | resolve "^1.1.7" 1812 | rollup-pluginutils "^2.0.1" 1813 | 1814 | rollup-plugin-node-resolve@^3.0.0: 1815 | version "3.0.0" 1816 | resolved "https://registry.yarnpkg.com/rollup-plugin-node-resolve/-/rollup-plugin-node-resolve-3.0.0.tgz#8b897c4c3030d5001277b0514b25d2ca09683ee0" 1817 | dependencies: 1818 | browser-resolve "^1.11.0" 1819 | builtin-modules "^1.1.0" 1820 | is-module "^1.0.0" 1821 | resolve "^1.1.6" 1822 | 1823 | rollup-plugin-uglify@^2.0.1: 1824 | version "2.0.1" 1825 | resolved "https://registry.yarnpkg.com/rollup-plugin-uglify/-/rollup-plugin-uglify-2.0.1.tgz#67b37ad1efdafbd83af4c36b40c189ee4866c969" 1826 | dependencies: 1827 | uglify-js "^3.0.9" 1828 | 1829 | rollup-pluginutils@^1.5.0: 1830 | version "1.5.2" 1831 | resolved "https://registry.yarnpkg.com/rollup-pluginutils/-/rollup-pluginutils-1.5.2.tgz#1e156e778f94b7255bfa1b3d0178be8f5c552408" 1832 | dependencies: 1833 | estree-walker "^0.2.1" 1834 | minimatch "^3.0.2" 1835 | 1836 | rollup-pluginutils@^2.0.1: 1837 | version "2.0.1" 1838 | resolved "https://registry.yarnpkg.com/rollup-pluginutils/-/rollup-pluginutils-2.0.1.tgz#7ec95b3573f6543a46a6461bd9a7c544525d0fc0" 1839 | dependencies: 1840 | estree-walker "^0.3.0" 1841 | micromatch "^2.3.11" 1842 | 1843 | rollup@^0.41.6: 1844 | version "0.41.6" 1845 | resolved "https://registry.yarnpkg.com/rollup/-/rollup-0.41.6.tgz#e0d05497877a398c104d816d2733a718a7a94e2a" 1846 | dependencies: 1847 | source-map-support "^0.4.0" 1848 | 1849 | run-async@^0.1.0: 1850 | version "0.1.0" 1851 | resolved "https://registry.yarnpkg.com/run-async/-/run-async-0.1.0.tgz#c8ad4a5e110661e402a7d21b530e009f25f8e389" 1852 | dependencies: 1853 | once "^1.3.0" 1854 | 1855 | rx-lite@^3.1.2: 1856 | version "3.1.2" 1857 | resolved "https://registry.yarnpkg.com/rx-lite/-/rx-lite-3.1.2.tgz#19ce502ca572665f3b647b10939f97fd1615f102" 1858 | 1859 | safe-buffer@~5.0.1: 1860 | version "5.0.1" 1861 | resolved "https://registry.yarnpkg.com/safe-buffer/-/safe-buffer-5.0.1.tgz#d263ca54696cd8a306b5ca6551e92de57918fbe7" 1862 | 1863 | "semver@2 || 3 || 4 || 5", semver@5.3.0, semver@^5.3.0: 1864 | version "5.3.0" 1865 | resolved "https://registry.yarnpkg.com/semver/-/semver-5.3.0.tgz#9b2ce5d3de02d17c6012ad326aa6b4d0cf54f94f" 1866 | 1867 | shelljs@^0.7.5: 1868 | version "0.7.8" 1869 | resolved "https://registry.yarnpkg.com/shelljs/-/shelljs-0.7.8.tgz#decbcf874b0d1e5fb72e14b164a9683048e9acb3" 1870 | dependencies: 1871 | glob "^7.0.0" 1872 | interpret "^1.0.0" 1873 | rechoir "^0.6.2" 1874 | 1875 | slash@^1.0.0: 1876 | version "1.0.0" 1877 | resolved "https://registry.yarnpkg.com/slash/-/slash-1.0.0.tgz#c41f2f6c39fc16d1cd17ad4b5d896114ae470d55" 1878 | 1879 | slice-ansi@0.0.4: 1880 | version "0.0.4" 1881 | resolved "https://registry.yarnpkg.com/slice-ansi/-/slice-ansi-0.0.4.tgz#edbf8903f66f7ce2f8eafd6ceed65e264c831b35" 1882 | 1883 | source-map-support@^0.4.0, source-map-support@^0.4.2: 1884 | version "0.4.15" 1885 | resolved "https://registry.yarnpkg.com/source-map-support/-/source-map-support-0.4.15.tgz#03202df65c06d2bd8c7ec2362a193056fef8d3b1" 1886 | dependencies: 1887 | source-map "^0.5.6" 1888 | 1889 | source-map@^0.5.0, source-map@^0.5.6, source-map@~0.5.1: 1890 | version "0.5.6" 1891 | resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.5.6.tgz#75ce38f52bf0733c5a7f0c118d81334a2bb5f412" 1892 | 1893 | spdx-correct@~1.0.0: 1894 | version "1.0.2" 1895 | resolved "https://registry.yarnpkg.com/spdx-correct/-/spdx-correct-1.0.2.tgz#4b3073d933ff51f3912f03ac5519498a4150db40" 1896 | dependencies: 1897 | spdx-license-ids "^1.0.2" 1898 | 1899 | spdx-expression-parse@~1.0.0: 1900 | version "1.0.4" 1901 | resolved "https://registry.yarnpkg.com/spdx-expression-parse/-/spdx-expression-parse-1.0.4.tgz#9bdf2f20e1f40ed447fbe273266191fced51626c" 1902 | 1903 | spdx-license-ids@^1.0.2: 1904 | version "1.2.2" 1905 | resolved "https://registry.yarnpkg.com/spdx-license-ids/-/spdx-license-ids-1.2.2.tgz#c9df7a3424594ade6bd11900d596696dc06bac57" 1906 | 1907 | sprintf-js@~1.0.2: 1908 | version "1.0.3" 1909 | resolved "https://registry.yarnpkg.com/sprintf-js/-/sprintf-js-1.0.3.tgz#04e6926f662895354f3dd015203633b857297e2c" 1910 | 1911 | string-width@^1.0.1: 1912 | version "1.0.2" 1913 | resolved "https://registry.yarnpkg.com/string-width/-/string-width-1.0.2.tgz#118bdf5b8cdc51a2a7e70d211e07e2b0b9b107d3" 1914 | dependencies: 1915 | code-point-at "^1.0.0" 1916 | is-fullwidth-code-point "^1.0.0" 1917 | strip-ansi "^3.0.0" 1918 | 1919 | string-width@^2.0.0: 1920 | version "2.0.0" 1921 | resolved "https://registry.yarnpkg.com/string-width/-/string-width-2.0.0.tgz#635c5436cc72a6e0c387ceca278d4e2eec52687e" 1922 | dependencies: 1923 | is-fullwidth-code-point "^2.0.0" 1924 | strip-ansi "^3.0.0" 1925 | 1926 | string_decoder@~1.0.0: 1927 | version "1.0.2" 1928 | resolved "https://registry.yarnpkg.com/string_decoder/-/string_decoder-1.0.2.tgz#b29e1f4e1125fa97a10382b8a533737b7491e179" 1929 | dependencies: 1930 | safe-buffer "~5.0.1" 1931 | 1932 | strip-ansi@^3.0.0: 1933 | version "3.0.1" 1934 | resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-3.0.1.tgz#6a385fb8853d952d5ff05d0e8aaf94278dc63dcf" 1935 | dependencies: 1936 | ansi-regex "^2.0.0" 1937 | 1938 | strip-bom@^3.0.0: 1939 | version "3.0.0" 1940 | resolved "https://registry.yarnpkg.com/strip-bom/-/strip-bom-3.0.0.tgz#2334c18e9c759f7bdd56fdef7e9ae3d588e68ed3" 1941 | 1942 | strip-json-comments@~2.0.1: 1943 | version "2.0.1" 1944 | resolved "https://registry.yarnpkg.com/strip-json-comments/-/strip-json-comments-2.0.1.tgz#3c531942e908c2697c0ec344858c286c7ca0a60a" 1945 | 1946 | supports-color@3.1.2: 1947 | version "3.1.2" 1948 | resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-3.1.2.tgz#72a262894d9d408b956ca05ff37b2ed8a6e2a2d5" 1949 | dependencies: 1950 | has-flag "^1.0.0" 1951 | 1952 | supports-color@^2.0.0: 1953 | version "2.0.0" 1954 | resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-2.0.0.tgz#535d045ce6b6363fa40117084629995e9df324c7" 1955 | 1956 | table@^3.7.8: 1957 | version "3.8.3" 1958 | resolved "https://registry.yarnpkg.com/table/-/table-3.8.3.tgz#2bbc542f0fda9861a755d3947fefd8b3f513855f" 1959 | dependencies: 1960 | ajv "^4.7.0" 1961 | ajv-keywords "^1.0.0" 1962 | chalk "^1.1.1" 1963 | lodash "^4.0.0" 1964 | slice-ansi "0.0.4" 1965 | string-width "^2.0.0" 1966 | 1967 | text-table@~0.2.0: 1968 | version "0.2.0" 1969 | resolved "https://registry.yarnpkg.com/text-table/-/text-table-0.2.0.tgz#7f5ee823ae805207c00af2df4a84ec3fcfa570b4" 1970 | 1971 | through@^2.3.6: 1972 | version "2.3.8" 1973 | resolved "https://registry.yarnpkg.com/through/-/through-2.3.8.tgz#0dd4c9ffaabc357960b1b724115d7e0e86a2e1f5" 1974 | 1975 | to-fast-properties@^1.0.1: 1976 | version "1.0.3" 1977 | resolved "https://registry.yarnpkg.com/to-fast-properties/-/to-fast-properties-1.0.3.tgz#b83571fa4d8c25b82e231b06e3a3055de4ca1a47" 1978 | 1979 | trim-right@^1.0.1: 1980 | version "1.0.1" 1981 | resolved "https://registry.yarnpkg.com/trim-right/-/trim-right-1.0.1.tgz#cb2e1203067e0c8de1f614094b9fe45704ea6003" 1982 | 1983 | tryit@^1.0.1: 1984 | version "1.0.3" 1985 | resolved "https://registry.yarnpkg.com/tryit/-/tryit-1.0.3.tgz#393be730a9446fd1ead6da59a014308f36c289cb" 1986 | 1987 | type-check@~0.3.2: 1988 | version "0.3.2" 1989 | resolved "https://registry.yarnpkg.com/type-check/-/type-check-0.3.2.tgz#5884cab512cf1d355e3fb784f30804b2b520db72" 1990 | dependencies: 1991 | prelude-ls "~1.1.2" 1992 | 1993 | typedarray@^0.0.6: 1994 | version "0.0.6" 1995 | resolved "https://registry.yarnpkg.com/typedarray/-/typedarray-0.0.6.tgz#867ac74e3864187b1d3d47d996a78ec5c8830777" 1996 | 1997 | uglify-es@^3.0.13: 1998 | version "3.0.13" 1999 | resolved "https://registry.yarnpkg.com/uglify-es/-/uglify-es-3.0.13.tgz#82d823da4d0139bb1ff3c11e5381934edf52ee64" 2000 | dependencies: 2001 | commander "~2.9.0" 2002 | source-map "~0.5.1" 2003 | 2004 | uglify-js@^3.0.9: 2005 | version "3.0.13" 2006 | resolved "https://registry.yarnpkg.com/uglify-js/-/uglify-js-3.0.13.tgz#1871d736aa1e550c728d7e5a6556579e70925d68" 2007 | dependencies: 2008 | commander "~2.9.0" 2009 | source-map "~0.5.1" 2010 | 2011 | user-home@^2.0.0: 2012 | version "2.0.0" 2013 | resolved "https://registry.yarnpkg.com/user-home/-/user-home-2.0.0.tgz#9c70bfd8169bc1dcbf48604e0f04b8b49cde9e9f" 2014 | dependencies: 2015 | os-homedir "^1.0.0" 2016 | 2017 | util-deprecate@~1.0.1: 2018 | version "1.0.2" 2019 | resolved "https://registry.yarnpkg.com/util-deprecate/-/util-deprecate-1.0.2.tgz#450d4dc9fa70de732762fbd2d4a28981419a0ccf" 2020 | 2021 | validate-npm-package-license@^3.0.1: 2022 | version "3.0.1" 2023 | resolved "https://registry.yarnpkg.com/validate-npm-package-license/-/validate-npm-package-license-3.0.1.tgz#2804babe712ad3379459acfbe24746ab2c303fbc" 2024 | dependencies: 2025 | spdx-correct "~1.0.0" 2026 | spdx-expression-parse "~1.0.0" 2027 | 2028 | vlq@^0.2.1: 2029 | version "0.2.2" 2030 | resolved "https://registry.yarnpkg.com/vlq/-/vlq-0.2.2.tgz#e316d5257b40b86bb43cb8d5fea5d7f54d6b0ca1" 2031 | 2032 | wordwrap@~1.0.0: 2033 | version "1.0.0" 2034 | resolved "https://registry.yarnpkg.com/wordwrap/-/wordwrap-1.0.0.tgz#27584810891456a4171c8d0226441ade90cbcaeb" 2035 | 2036 | wrappy@1: 2037 | version "1.0.2" 2038 | resolved "https://registry.yarnpkg.com/wrappy/-/wrappy-1.0.2.tgz#b5243d8f3ec1aa35f1364605bc0d1036e30ab69f" 2039 | 2040 | write@^0.2.1: 2041 | version "0.2.1" 2042 | resolved "https://registry.yarnpkg.com/write/-/write-0.2.1.tgz#5fc03828e264cea3fe91455476f7a3c566cb0757" 2043 | dependencies: 2044 | mkdirp "^0.5.1" 2045 | 2046 | xtend@^4.0.0: 2047 | version "4.0.1" 2048 | resolved "https://registry.yarnpkg.com/xtend/-/xtend-4.0.1.tgz#a5c6d532be656e23db820efb943a1f04998d63af" 2049 | --------------------------------------------------------------------------------