├── .eslintignore ├── .eslintrc ├── .gitignore ├── .travis.yml ├── API.md ├── CHANGELOG ├── LICENSE ├── README.md ├── dist ├── note-parser.js └── note-parser.js.map ├── index.js ├── package.json ├── rollup.config.js ├── test └── note-parser-test.js └── yarn.lock /.eslintignore: -------------------------------------------------------------------------------- 1 | dist/* 2 | docs/**/* 3 | -------------------------------------------------------------------------------- /.eslintrc: -------------------------------------------------------------------------------- 1 | { 2 | "extends": [ 3 | "standard" 4 | ], 5 | "env": { 6 | "jest": true 7 | }, 8 | "rules": { 9 | "comma-dangle": ["error", "only-multiline"] 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | node_modules 2 | -------------------------------------------------------------------------------- /.travis.yml: -------------------------------------------------------------------------------- 1 | language: node_js 2 | node_js: 3 | - stable 4 | - "4.0" 5 | - "0.12.13" 6 | -------------------------------------------------------------------------------- /API.md: -------------------------------------------------------------------------------- 1 | ## Functions 2 | 3 |
4 |
regex()RegExp
5 |

A regex for matching note strings in scientific notation.

6 |
7 |
parse(note, isTonic, tunning)Object
8 |

Parse a note name in scientific notation an return it's components, 9 | and some numeric properties including midi number and frequency.

10 |
11 |
build(obj)String
12 |

Create a string from a parsed object or step, alteration, octave parameters

13 |
14 |
midi(note)Integer
15 |

Get midi of a note

16 |
17 |
freq(note, tuning)Float
18 |

Get freq of a note in hertzs (in a well tempered 440Hz A4)

19 |
20 |
21 | 22 | 23 | 24 | ## regex() ⇒ RegExp 25 | A regex for matching note strings in scientific notation. 26 | 27 | **Kind**: global function 28 | **Returns**: RegExp - the regexp used to parse the note name 29 | 30 | The note string should have the form `letter[accidentals][octave][element]` 31 | where: 32 | 33 | - letter: (Required) is a letter from A to G either upper or lower case 34 | - accidentals: (Optional) can be one or more `b` (flats), `#` (sharps) or `x` (double sharps). 35 | They can NOT be mixed. 36 | - octave: (Optional) a positive or negative integer 37 | - element: (Optional) additionally anything after the duration is considered to 38 | be the element name (for example: 'C2 dorian') 39 | 40 | The executed regex contains (by array index): 41 | 42 | - 0: the complete string 43 | - 1: the note letter 44 | - 2: the optional accidentals 45 | - 3: the optional octave 46 | - 4: the rest of the string (trimmed) 47 | **Example** 48 | ```js 49 | var parser = require('note-parser') 50 | parser.regex.exec('c#4') 51 | // => ['c#4', 'c', '#', '4', ''] 52 | parser.regex.exec('c#4 major') 53 | // => ['c#4major', 'c', '#', '4', 'major'] 54 | parser.regex().exec('CMaj7') 55 | // => ['CMaj7', 'C', '', '', 'Maj7'] 56 | ``` 57 | 58 | 59 | ## parse(note, isTonic, tunning) ⇒ Object 60 | Parse a note name in scientific notation an return it's components, 61 | and some numeric properties including midi number and frequency. 62 | 63 | **Kind**: global function 64 | **Returns**: Object - the parsed note name or null if not a valid note 65 | 66 | The parsed note name object will ALWAYS contains: 67 | - letter: the uppercase letter of the note 68 | - acc: the accidentals of the note (only sharps or flats) 69 | - pc: the pitch class (letter + acc) 70 | - step: s a numeric representation of the letter. It's an integer from 0 to 6 71 | where 0 = C, 1 = D ... 6 = B 72 | - alt: a numeric representation of the accidentals. 0 means no alteration, 73 | positive numbers are for sharps and negative for flats 74 | - chroma: a numeric representation of the pitch class. It's like midi for 75 | pitch classes. 0 = C, 1 = C#, 2 = D ... 11 = B. Can be used to find enharmonics 76 | since, for example, chroma of 'Cb' and 'B' are both 11 77 | 78 | If the note has octave, the parser object will contain: 79 | - oct: the octave number (as integer) 80 | - midi: the midi number 81 | - freq: the frequency (using tuning parameter as base) 82 | 83 | If the parameter `isTonic` is set to true, the parsed object will contain: 84 | - tonicOf: the rest of the string that follows note name (left and right trimmed) 85 | 86 | | Param | Type | Description | 87 | | --- | --- | --- | 88 | | note | String | the note string to be parsed | 89 | | isTonic | Boolean | true the strings it's supposed to contain a note number and some category (for example an scale: 'C# major'). It's false by default, but when true, en extra tonicOf property is returned with the category ('major') | 90 | | tunning | Float | The frequency of A4 note to calculate frequencies. By default it 440. | 91 | 92 | **Example** 93 | ```js 94 | var parse = require('note-parser').parse 95 | parse('Cb4') 96 | // => { letter: 'C', acc: 'b', pc: 'Cb', step: 0, alt: -1, chroma: -1, 97 | oct: 4, midi: 59, freq: 246.94165062806206 } 98 | // if no octave, no midi, no freq 99 | parse('fx') 100 | // => { letter: 'F', acc: '##', pc: 'F##', step: 3, alt: 2, chroma: 7 }) 101 | ``` 102 | 103 | 104 | ## build(obj) ⇒ String 105 | Create a string from a parsed object or `step, alteration, octave` parameters 106 | 107 | **Kind**: global function 108 | **Returns**: String - a note string or null if not valid parameters 109 | **Since**: 1.2 110 | 111 | | Param | Type | Description | 112 | | --- | --- | --- | 113 | | obj | Object | the parsed data object | 114 | 115 | **Example** 116 | ```js 117 | parser.build(parser.parse('cb2')) // => 'Cb2' 118 | ``` 119 | **Example** 120 | ```js 121 | // it accepts (step, alteration, octave) parameters: 122 | parser.build(3) // => 'F' 123 | parser.build(3, -1) // => 'Fb' 124 | parser.build(3, -1, 4) // => 'Fb4' 125 | ``` 126 | 127 | 128 | ## midi(note) ⇒ Integer 129 | Get midi of a note 130 | 131 | **Kind**: global function 132 | **Returns**: Integer - the midi number of the note or null if not a valid note 133 | or the note does NOT contains octave 134 | 135 | | Param | Type | Description | 136 | | --- | --- | --- | 137 | | note | String | Integer | the note name or midi number | 138 | 139 | **Example** 140 | ```js 141 | var parser = require('note-parser') 142 | parser.midi('A4') // => 69 143 | parser.midi('A') // => null 144 | ``` 145 | **Example** 146 | ```js 147 | // midi numbers are bypassed (even as strings) 148 | parser.midi(60) // => 60 149 | parser.midi('60') // => 60 150 | ``` 151 | 152 | 153 | ## freq(note, tuning) ⇒ Float 154 | Get freq of a note in hertzs (in a well tempered 440Hz A4) 155 | 156 | **Kind**: global function 157 | **Returns**: Float - the freq of the number if hertzs or null if not valid note 158 | 159 | | Param | Type | Description | 160 | | --- | --- | --- | 161 | | note | String | the note name or note midi number | 162 | | tuning | String | (Optional) the A4 frequency (440 by default) | 163 | 164 | **Example** 165 | ```js 166 | var parser = require('note-parser') 167 | parser.freq('A4') // => 440 168 | parser.freq('A') // => null 169 | ``` 170 | **Example** 171 | ```js 172 | // can change tuning (440 by default) 173 | parser.freq('A4', 444) // => 444 174 | parser.freq('A3', 444) // => 222 175 | ``` 176 | **Example** 177 | ```js 178 | // it accepts midi numbers (as numbers and as strings) 179 | parser.freq(69) // => 440 180 | parser.freq('69', 442) // => 442 181 | ``` 182 | -------------------------------------------------------------------------------- /CHANGELOG: -------------------------------------------------------------------------------- 1 | [MASTER] 2 | 3 | [2.0.1] 4 | - Move to ES6 modules with ES5 fallback via rollup 5 | - Add eslint configuration and tests 6 | 7 | [2.0.0] 8 | - API BREAK: remove midiToFreq function (replaced by freq function that now accepts midi numbers too) 9 | - chroma values are always inside 0..11 range 10 | - midi function bypasses midi numbers 11 | - freq accepts midi numbers and an optional tuning parameter 12 | 13 | [1.2.0] 14 | - Add build function 15 | 16 | [1.1.0] 17 | - Add midiToFreq function 18 | 19 | [1.0.0] 20 | - Add better REGEX support 21 | - Add function for each property 22 | - Add chroma, alt 23 | 24 | [0.9.0] 25 | - Add name and remove toString 26 | 27 | [0.8.0] 28 | - Add plus and minus notation (impro-visor style) 29 | - Move to standard js style 30 | 31 | [0.7.0] 32 | - Add midi note 33 | - Add frequency 34 | 35 | [0.6.0] 36 | - Add defaultOctave param 37 | - Add defaultValue param 38 | 39 | [0.5.0] 40 | - Octave is, by default, 4 41 | - Rename pitchClass to pc 42 | - Rename octave to oct 43 | - Rename accidentals acc 44 | 45 | [0.4.0] 46 | - Add parse.toString method 47 | 48 | [0.3.0] 49 | - Rename to note-parser 50 | - Fail fast: parser error now throws exception 51 | 52 | [0.2.0] 53 | - Parse a parsed note return itself 54 | 55 | [0.1.0] 56 | - First version 57 | - Parse notes with accidentals 58 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2015 danigb 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | 23 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # note-parser [![npm](https://img.shields.io/npm/v/note-parser.svg)](https://www.npmjs.com/package/note-parser) 2 | 3 | [![Build Status](https://travis-ci.org/danigb/note-parser.svg?branch=master)](https://travis-ci.org/danigb/note-parser) [![Code Climate](https://codeclimate.com/github/danigb/note-parser/badges/gpa.svg)](https://codeclimate.com/github/danigb/note-parser) 4 | [![js-standard-style](https://img.shields.io/badge/code%20style-standard-brightgreen.svg?style=flat)](https://github.com/feross/standard) 5 | 6 | Parse note names (in [scientific notation](https://en.wikipedia.org/wiki/Scientific_pitch_notation)) with javascript. Given a string, obtain a hash 7 | with note properties (including midi number and frequency) 8 | 9 | If you need parse interval names take a look to [interval-notation](https://github.com/danigb/interval-notation) 10 | 11 | ## Usage 12 | 13 | Install via npm: `npm i --save note-parser` and require it: 14 | 15 | ```js 16 | var parser = require('note-parser') 17 | parser.parse('c#4') // => { letter: 'C', acc: '#', ... midi: 61, freq: 277.1826309768721 } 18 | ``` 19 | 20 | The returned object will contain: 21 | 22 | - `letter`: the uppercase letter of the note 23 | - `acc`: the accidentals of the note (only sharps or flats) 24 | - `pc`: the pitch class (letter + acc) 25 | - `step`: s a numeric representation of the letter. It's an integer from 0 to 6 where 0 = C, 1 = D ... 6 = B 26 | - `alt`: a numeric representation of the accidentals. 0 means no alteration, 27 | positive numbers are for sharps and negative for flats 28 | - `chroma`: a numeric representation of the pitch class. It's like midi for 29 | pitch classes. 0 = C, 1 = C#, 2 = D ... It can have negative values: -1 = Cb. 30 | 31 | If the note name has octave, the returned object will additionally have: 32 | 33 | - `oct`: the octave number (as integer) 34 | - `midi`: the midi number 35 | - `freq`: the frequency (using tuning parameter as base) 36 | 37 | If the parameter `isTonic` is set to true another property is included: 38 | 39 | - `tonicOf`: the rest of the string that follows note name (left and right trimmed) 40 | 41 | #### Midi note number and frequency 42 | 43 | If you are interested only in midi numbers or frequencies, you can use `midi` function: 44 | 45 | ```js 46 | parser.midi('A4') // => 69 47 | parser.midi('blah') // => null 48 | parser.midi(60) // => 60 49 | parser.midi('60') // => 60 50 | ``` 51 | 52 | or the `freq` function: 53 | 54 | ```js 55 | parser.freq('A4') // => 440 56 | parser.freq('A3', 444) // => 222 57 | parser.freq(69) // => 440 58 | ``` 59 | 60 | ### Build the string back 61 | 62 | With the `build` function you can convert back to string: 63 | 64 | ```js 65 | parser.build(parser.parse('cb2')) // => 'Cb2' 66 | ``` 67 | 68 | Alternatively the `build` function accepts `step, alteration, octave` parameters: 69 | 70 | ```js 71 | parser.build(3, -2, 4) // => 'Fbb4' 72 | ``` 73 | 74 | ## Tests and documentation 75 | 76 | You can read the [generated API documentation here](https://github.com/danigb/note-parser/blob/master/API.md) 77 | 78 | To run the test clone this repo and: 79 | 80 | ``` 81 | npm install 82 | npm test 83 | ``` 84 | 85 | ## License 86 | 87 | MIT License 88 | -------------------------------------------------------------------------------- /dist/note-parser.js: -------------------------------------------------------------------------------- 1 | !function(t,n){"object"==typeof exports&&"undefined"!=typeof module?n(exports):"function"==typeof define&&define.amd?define(["exports"],n):n(t.NoteParser=t.NoteParser||{})}(this,function(t){"use strict";function n(t,n){return Array(n+1).join(t)}function r(t){return"number"==typeof t}function e(t){return"string"==typeof t}function u(t){return void 0!==t}function c(t,n){return Math.pow(2,(t-69)/12)*(n||440)}function o(){return b}function i(t,n,r){if("string"!=typeof t)return null;var e=b.exec(t);if(!e||!n&&e[4])return null;var u={letter:e[1].toUpperCase(),acc:e[2].replace(/x/g,"##")};u.pc=u.letter+u.acc,u.step=(u.letter.charCodeAt(0)+3)%7,u.alt="b"===u.acc[0]?-u.acc.length:u.acc.length;var o=A[u.step]+u.alt;return u.chroma=o<0?12+o:o%12,e[3]&&(u.oct=+e[3],u.midi=o+12*(u.oct+1),u.freq=c(u.midi,r)),n&&(u.tonicOf=e[4]),u}function f(t){return r(t)?t<0?n("b",-t):n("#",t):""}function a(t){return r(t)?""+t:""}function l(t,n,r){return null===t||void 0===t?null:t.step?l(t.step,t.alt,t.oct):t<0||t>6?null:C.charAt(t)+f(n)+a(r)}function p(t){if((r(t)||e(t))&&t>=0&&t<128)return+t;var n=i(t);return n&&u(n.midi)?n.midi:null}function s(t,n){var r=p(t);return null===r?null:c(r,n)}function d(t){return(i(t)||{}).letter}function m(t){return(i(t)||{}).acc}function h(t){return(i(t)||{}).pc}function v(t){return(i(t)||{}).step}function g(t){return(i(t)||{}).alt}function x(t){return(i(t)||{}).chroma}function y(t){return(i(t)||{}).oct}var b=/^([a-gA-G])(#{1,}|b{1,}|x{1,}|)(-?\d*)\s*(.*)\s*$/,A=[0,2,4,5,7,9,11],C="CDEFGAB";t.regex=o,t.parse=i,t.build=l,t.midi=p,t.freq=s,t.letter=d,t.acc=m,t.pc=h,t.step=v,t.alt=g,t.chroma=x,t.oct=y}); 2 | //# sourceMappingURL=note-parser.js.map 3 | -------------------------------------------------------------------------------- /dist/note-parser.js.map: -------------------------------------------------------------------------------- 1 | {"version":3,"file":"note-parser.js","sources":["../index.js"],"sourcesContent":["'use strict'\n\n// util\nfunction fillStr (s, num) { return Array(num + 1).join(s) }\nfunction isNum (x) { return typeof x === 'number' }\nfunction isStr (x) { return typeof x === 'string' }\nfunction isDef (x) { return typeof x !== 'undefined' }\nfunction midiToFreq (midi, tuning) {\n return Math.pow(2, (midi - 69) / 12) * (tuning || 440)\n}\n\nvar REGEX = /^([a-gA-G])(#{1,}|b{1,}|x{1,}|)(-?\\d*)\\s*(.*)\\s*$/\n/**\n * A regex for matching note strings in scientific notation.\n *\n * @name regex\n * @function\n * @return {RegExp} the regexp used to parse the note name\n *\n * The note string should have the form `letter[accidentals][octave][element]`\n * where:\n *\n * - letter: (Required) is a letter from A to G either upper or lower case\n * - accidentals: (Optional) can be one or more `b` (flats), `#` (sharps) or `x` (double sharps).\n * They can NOT be mixed.\n * - octave: (Optional) a positive or negative integer\n * - element: (Optional) additionally anything after the duration is considered to\n * be the element name (for example: 'C2 dorian')\n *\n * The executed regex contains (by array index):\n *\n * - 0: the complete string\n * - 1: the note letter\n * - 2: the optional accidentals\n * - 3: the optional octave\n * - 4: the rest of the string (trimmed)\n *\n * @example\n * var parser = require('note-parser')\n * parser.regex.exec('c#4')\n * // => ['c#4', 'c', '#', '4', '']\n * parser.regex.exec('c#4 major')\n * // => ['c#4major', 'c', '#', '4', 'major']\n * parser.regex().exec('CMaj7')\n * // => ['CMaj7', 'C', '', '', 'Maj7']\n */\nexport function regex () { return REGEX }\n\nvar SEMITONES = [0, 2, 4, 5, 7, 9, 11]\n/**\n * Parse a note name in scientific notation an return it's components,\n * and some numeric properties including midi number and frequency.\n *\n * @name parse\n * @function\n * @param {String} note - the note string to be parsed\n * @param {Boolean} isTonic - true the strings it's supposed to contain a note number\n * and some category (for example an scale: 'C# major'). It's false by default,\n * but when true, en extra tonicOf property is returned with the category ('major')\n * @param {Float} tunning - The frequency of A4 note to calculate frequencies.\n * By default it 440.\n * @return {Object} the parsed note name or null if not a valid note\n *\n * The parsed note name object will ALWAYS contains:\n * - letter: the uppercase letter of the note\n * - acc: the accidentals of the note (only sharps or flats)\n * - pc: the pitch class (letter + acc)\n * - step: s a numeric representation of the letter. It's an integer from 0 to 6\n * where 0 = C, 1 = D ... 6 = B\n * - alt: a numeric representation of the accidentals. 0 means no alteration,\n * positive numbers are for sharps and negative for flats\n * - chroma: a numeric representation of the pitch class. It's like midi for\n * pitch classes. 0 = C, 1 = C#, 2 = D ... 11 = B. Can be used to find enharmonics\n * since, for example, chroma of 'Cb' and 'B' are both 11\n *\n * If the note has octave, the parser object will contain:\n * - oct: the octave number (as integer)\n * - midi: the midi number\n * - freq: the frequency (using tuning parameter as base)\n *\n * If the parameter `isTonic` is set to true, the parsed object will contain:\n * - tonicOf: the rest of the string that follows note name (left and right trimmed)\n *\n * @example\n * var parse = require('note-parser').parse\n * parse('Cb4')\n * // => { letter: 'C', acc: 'b', pc: 'Cb', step: 0, alt: -1, chroma: -1,\n * oct: 4, midi: 59, freq: 246.94165062806206 }\n * // if no octave, no midi, no freq\n * parse('fx')\n * // => { letter: 'F', acc: '##', pc: 'F##', step: 3, alt: 2, chroma: 7 })\n */\nexport function parse (str, isTonic, tuning) {\n if (typeof str !== 'string') return null\n var m = REGEX.exec(str)\n if (!m || (!isTonic && m[4])) return null\n\n var p = { letter: m[1].toUpperCase(), acc: m[2].replace(/x/g, '##') }\n p.pc = p.letter + p.acc\n p.step = (p.letter.charCodeAt(0) + 3) % 7\n p.alt = p.acc[0] === 'b' ? -p.acc.length : p.acc.length\n var pos = SEMITONES[p.step] + p.alt\n p.chroma = pos < 0 ? 12 + pos : pos % 12\n if (m[3]) { // has octave\n p.oct = +m[3]\n p.midi = pos + 12 * (p.oct + 1)\n p.freq = midiToFreq(p.midi, tuning)\n }\n if (isTonic) p.tonicOf = m[4]\n return p\n}\n\nvar LETTERS = 'CDEFGAB'\nfunction accStr (n) { return !isNum(n) ? '' : n < 0 ? fillStr('b', -n) : fillStr('#', n) }\nfunction octStr (n) { return !isNum(n) ? '' : '' + n }\n\n/**\n * Create a string from a parsed object or `step, alteration, octave` parameters\n * @param {Object} obj - the parsed data object\n * @return {String} a note string or null if not valid parameters\n * @since 1.2\n * @example\n * parser.build(parser.parse('cb2')) // => 'Cb2'\n *\n * @example\n * // it accepts (step, alteration, octave) parameters:\n * parser.build(3) // => 'F'\n * parser.build(3, -1) // => 'Fb'\n * parser.build(3, -1, 4) // => 'Fb4'\n */\nexport function build (s, a, o) {\n if (s === null || typeof s === 'undefined') return null\n if (s.step) return build(s.step, s.alt, s.oct)\n if (s < 0 || s > 6) return null\n return LETTERS.charAt(s) + accStr(a) + octStr(o)\n}\n\n/**\n * Get midi of a note\n *\n * @name midi\n * @function\n * @param {String|Integer} note - the note name or midi number\n * @return {Integer} the midi number of the note or null if not a valid note\n * or the note does NOT contains octave\n * @example\n * var parser = require('note-parser')\n * parser.midi('A4') // => 69\n * parser.midi('A') // => null\n * @example\n * // midi numbers are bypassed (even as strings)\n * parser.midi(60) // => 60\n * parser.midi('60') // => 60\n */\nexport function midi (note) {\n if ((isNum(note) || isStr(note)) && note >= 0 && note < 128) return +note\n var p = parse(note)\n return p && isDef(p.midi) ? p.midi : null\n}\n\n/**\n * Get freq of a note in hertzs (in a well tempered 440Hz A4)\n *\n * @name freq\n * @function\n * @param {String} note - the note name or note midi number\n * @param {String} tuning - (Optional) the A4 frequency (440 by default)\n * @return {Float} the freq of the number if hertzs or null if not valid note\n * @example\n * var parser = require('note-parser')\n * parser.freq('A4') // => 440\n * parser.freq('A') // => null\n * @example\n * // can change tuning (440 by default)\n * parser.freq('A4', 444) // => 444\n * parser.freq('A3', 444) // => 222\n * @example\n * // it accepts midi numbers (as numbers and as strings)\n * parser.freq(69) // => 440\n * parser.freq('69', 442) // => 442\n */\nexport function freq (note, tuning) {\n var m = midi(note)\n return m === null ? null : midiToFreq(m, tuning)\n}\n\nexport function letter (src) { return (parse(src) || {}).letter }\nexport function acc (src) { return (parse(src) || {}).acc }\nexport function pc (src) { return (parse(src) || {}).pc }\nexport function step (src) { return (parse(src) || {}).step }\nexport function alt (src) { return (parse(src) || {}).alt }\nexport function chroma (src) { return (parse(src) || {}).chroma }\nexport function oct (src) { return (parse(src) || {}).oct }\n"],"names":["fillStr","s","num","Array","join","isNum","x","isStr","isDef","midiToFreq","midi","tuning","Math","pow","regex","REGEX","parse","str","isTonic","m","exec","p","letter","toUpperCase","acc","replace","pc","step","charCodeAt","alt","length","pos","SEMITONES","chroma","oct","freq","tonicOf","accStr","n","octStr","build","a","o","LETTERS","charAt","note","src"],"mappings":"0MAGA,SAASA,GAASC,EAAGC,GAAO,MAAOC,OAAMD,EAAM,GAAGE,KAAKH,GACvD,QAASI,GAAOC,GAAK,MAAoB,gBAANA,GACnC,QAASC,GAAOD,GAAK,MAAoB,gBAANA,GACnC,QAASE,GAAOF,GAAK,WAAoB,KAANA,EACnC,QAASG,GAAYC,EAAMC,GACzB,MAAOC,MAAKC,IAAI,GAAIH,EAAO,IAAM,KAAOC,GAAU,KAsCpD,QAAgBG,KAAW,MAAOC,GA8ClC,QAAgBC,GAAOC,EAAKC,EAASP,GACnC,GAAmB,gBAARM,GAAkB,MAAO,KACpC,IAAIE,GAAIJ,EAAMK,KAAKH,EACnB,KAAKE,IAAOD,GAAWC,EAAE,GAAK,MAAO,KAErC,IAAIE,IAAMC,OAAQH,EAAE,GAAGI,cAAeC,IAAKL,EAAE,GAAGM,QAAQ,KAAM,MAC9DJ,GAAEK,GAAKL,EAAEC,OAASD,EAAEG,IACpBH,EAAEM,MAAQN,EAAEC,OAAOM,WAAW,GAAK,GAAK,EACxCP,EAAEQ,IAAmB,MAAbR,EAAEG,IAAI,IAAcH,EAAEG,IAAIM,OAAST,EAAEG,IAAIM,MACjD,IAAIC,GAAMC,EAAUX,EAAEM,MAAQN,EAAEQ,GAQhC,OAPAR,GAAEY,OAASF,EAAM,EAAI,GAAKA,EAAMA,EAAM,GAClCZ,EAAE,KACJE,EAAEa,KAAOf,EAAE,GACXE,EAAEX,KAAOqB,EAAM,IAAMV,EAAEa,IAAM,GAC7Bb,EAAEc,KAAO1B,EAAWY,EAAEX,KAAMC,IAE1BO,IAASG,EAAEe,QAAUjB,EAAE,IACpBE,EAIT,QAASgB,GAAQC,GAAK,MAAQjC,GAAMiC,GAAUA,EAAI,EAAItC,EAAQ,KAAMsC,GAAKtC,EAAQ,IAAKsC,GAA7C,GACzC,QAASC,GAAQD,GAAK,MAAQjC,GAAMiC,GAAU,GAAKA,EAAV,GAgBzC,QAAgBE,GAAOvC,EAAGwC,EAAGC,GAC3B,MAAU,QAANzC,OAA2B,KAANA,EAA0B,KAC/CA,EAAE0B,KAAaa,EAAMvC,EAAE0B,KAAM1B,EAAE4B,IAAK5B,EAAEiC,KACtCjC,EAAI,GAAKA,EAAI,EAAU,KACpB0C,EAAQC,OAAO3C,GAAKoC,EAAOI,GAAKF,EAAOG,GAoBhD,QAAgBhC,GAAMmC,GACpB,IAAKxC,EAAMwC,IAAStC,EAAMsC,KAAUA,GAAQ,GAAKA,EAAO,IAAK,OAAQA,CACrE,IAAIxB,GAAIL,EAAM6B,EACd,OAAOxB,IAAKb,EAAMa,EAAEX,MAAQW,EAAEX,KAAO,KAwBvC,QAAgByB,GAAMU,EAAMlC,GAC1B,GAAIQ,GAAIT,EAAKmC,EACb,OAAa,QAAN1B,EAAa,KAAOV,EAAWU,EAAGR,GAG3C,QAAgBW,GAAQwB,GAAO,OAAQ9B,EAAM8B,QAAYxB,OACzD,QAAgBE,GAAKsB,GAAO,OAAQ9B,EAAM8B,QAAYtB,IACtD,QAAgBE,GAAIoB,GAAO,OAAQ9B,EAAM8B,QAAYpB,GACrD,QAAgBC,GAAMmB,GAAO,OAAQ9B,EAAM8B,QAAYnB,KACvD,QAAgBE,GAAKiB,GAAO,OAAQ9B,EAAM8B,QAAYjB,IACtD,QAAgBI,GAAQa,GAAO,OAAQ9B,EAAM8B,QAAYb,OACzD,QAAgBC,GAAKY,GAAO,OAAQ9B,EAAM8B,QAAYZ,IArLtD,GAAInB,GAAQ,oDAqCRiB,GAAa,EAAG,EAAG,EAAG,EAAG,EAAG,EAAG,IAgE/BW,EAAU"} -------------------------------------------------------------------------------- /index.js: -------------------------------------------------------------------------------- 1 | 'use strict' 2 | 3 | // util 4 | function fillStr (s, num) { return Array(num + 1).join(s) } 5 | function isNum (x) { return typeof x === 'number' } 6 | function isStr (x) { return typeof x === 'string' } 7 | function isDef (x) { return typeof x !== 'undefined' } 8 | function midiToFreq (midi, tuning) { 9 | return Math.pow(2, (midi - 69) / 12) * (tuning || 440) 10 | } 11 | 12 | var REGEX = /^([a-gA-G])(#{1,}|b{1,}|x{1,}|)(-?\d*)\s*(.*)\s*$/ 13 | /** 14 | * A regex for matching note strings in scientific notation. 15 | * 16 | * @name regex 17 | * @function 18 | * @return {RegExp} the regexp used to parse the note name 19 | * 20 | * The note string should have the form `letter[accidentals][octave][element]` 21 | * where: 22 | * 23 | * - letter: (Required) is a letter from A to G either upper or lower case 24 | * - accidentals: (Optional) can be one or more `b` (flats), `#` (sharps) or `x` (double sharps). 25 | * They can NOT be mixed. 26 | * - octave: (Optional) a positive or negative integer 27 | * - element: (Optional) additionally anything after the duration is considered to 28 | * be the element name (for example: 'C2 dorian') 29 | * 30 | * The executed regex contains (by array index): 31 | * 32 | * - 0: the complete string 33 | * - 1: the note letter 34 | * - 2: the optional accidentals 35 | * - 3: the optional octave 36 | * - 4: the rest of the string (trimmed) 37 | * 38 | * @example 39 | * var parser = require('note-parser') 40 | * parser.regex.exec('c#4') 41 | * // => ['c#4', 'c', '#', '4', ''] 42 | * parser.regex.exec('c#4 major') 43 | * // => ['c#4major', 'c', '#', '4', 'major'] 44 | * parser.regex().exec('CMaj7') 45 | * // => ['CMaj7', 'C', '', '', 'Maj7'] 46 | */ 47 | export function regex () { return REGEX } 48 | 49 | var SEMITONES = [0, 2, 4, 5, 7, 9, 11] 50 | /** 51 | * Parse a note name in scientific notation an return it's components, 52 | * and some numeric properties including midi number and frequency. 53 | * 54 | * @name parse 55 | * @function 56 | * @param {String} note - the note string to be parsed 57 | * @param {Boolean} isTonic - true the strings it's supposed to contain a note number 58 | * and some category (for example an scale: 'C# major'). It's false by default, 59 | * but when true, en extra tonicOf property is returned with the category ('major') 60 | * @param {Float} tunning - The frequency of A4 note to calculate frequencies. 61 | * By default it 440. 62 | * @return {Object} the parsed note name or null if not a valid note 63 | * 64 | * The parsed note name object will ALWAYS contains: 65 | * - letter: the uppercase letter of the note 66 | * - acc: the accidentals of the note (only sharps or flats) 67 | * - pc: the pitch class (letter + acc) 68 | * - step: s a numeric representation of the letter. It's an integer from 0 to 6 69 | * where 0 = C, 1 = D ... 6 = B 70 | * - alt: a numeric representation of the accidentals. 0 means no alteration, 71 | * positive numbers are for sharps and negative for flats 72 | * - chroma: a numeric representation of the pitch class. It's like midi for 73 | * pitch classes. 0 = C, 1 = C#, 2 = D ... 11 = B. Can be used to find enharmonics 74 | * since, for example, chroma of 'Cb' and 'B' are both 11 75 | * 76 | * If the note has octave, the parser object will contain: 77 | * - oct: the octave number (as integer) 78 | * - midi: the midi number 79 | * - freq: the frequency (using tuning parameter as base) 80 | * 81 | * If the parameter `isTonic` is set to true, the parsed object will contain: 82 | * - tonicOf: the rest of the string that follows note name (left and right trimmed) 83 | * 84 | * @example 85 | * var parse = require('note-parser').parse 86 | * parse('Cb4') 87 | * // => { letter: 'C', acc: 'b', pc: 'Cb', step: 0, alt: -1, chroma: -1, 88 | * oct: 4, midi: 59, freq: 246.94165062806206 } 89 | * // if no octave, no midi, no freq 90 | * parse('fx') 91 | * // => { letter: 'F', acc: '##', pc: 'F##', step: 3, alt: 2, chroma: 7 }) 92 | */ 93 | export function parse (str, isTonic, tuning) { 94 | if (typeof str !== 'string') return null 95 | var m = REGEX.exec(str) 96 | if (!m || (!isTonic && m[4])) return null 97 | 98 | var p = { letter: m[1].toUpperCase(), acc: m[2].replace(/x/g, '##') } 99 | p.pc = p.letter + p.acc 100 | p.step = (p.letter.charCodeAt(0) + 3) % 7 101 | p.alt = p.acc[0] === 'b' ? -p.acc.length : p.acc.length 102 | var pos = SEMITONES[p.step] + p.alt 103 | p.chroma = pos < 0 ? 12 + pos : pos % 12 104 | if (m[3]) { // has octave 105 | p.oct = +m[3] 106 | p.midi = pos + 12 * (p.oct + 1) 107 | p.freq = midiToFreq(p.midi, tuning) 108 | } 109 | if (isTonic) p.tonicOf = m[4] 110 | return p 111 | } 112 | 113 | var LETTERS = 'CDEFGAB' 114 | function accStr (n) { return !isNum(n) ? '' : n < 0 ? fillStr('b', -n) : fillStr('#', n) } 115 | function octStr (n) { return !isNum(n) ? '' : '' + n } 116 | 117 | /** 118 | * Create a string from a parsed object or `step, alteration, octave` parameters 119 | * @param {Object} obj - the parsed data object 120 | * @return {String} a note string or null if not valid parameters 121 | * @since 1.2 122 | * @example 123 | * parser.build(parser.parse('cb2')) // => 'Cb2' 124 | * 125 | * @example 126 | * // it accepts (step, alteration, octave) parameters: 127 | * parser.build(3) // => 'F' 128 | * parser.build(3, -1) // => 'Fb' 129 | * parser.build(3, -1, 4) // => 'Fb4' 130 | */ 131 | export function build (s, a, o) { 132 | if (s === null || typeof s === 'undefined') return null 133 | if (s.step) return build(s.step, s.alt, s.oct) 134 | if (s < 0 || s > 6) return null 135 | return LETTERS.charAt(s) + accStr(a) + octStr(o) 136 | } 137 | 138 | /** 139 | * Get midi of a note 140 | * 141 | * @name midi 142 | * @function 143 | * @param {String|Integer} note - the note name or midi number 144 | * @return {Integer} the midi number of the note or null if not a valid note 145 | * or the note does NOT contains octave 146 | * @example 147 | * var parser = require('note-parser') 148 | * parser.midi('A4') // => 69 149 | * parser.midi('A') // => null 150 | * @example 151 | * // midi numbers are bypassed (even as strings) 152 | * parser.midi(60) // => 60 153 | * parser.midi('60') // => 60 154 | */ 155 | export function midi (note) { 156 | if ((isNum(note) || isStr(note)) && note >= 0 && note < 128) return +note 157 | var p = parse(note) 158 | return p && isDef(p.midi) ? p.midi : null 159 | } 160 | 161 | /** 162 | * Get freq of a note in hertzs (in a well tempered 440Hz A4) 163 | * 164 | * @name freq 165 | * @function 166 | * @param {String} note - the note name or note midi number 167 | * @param {String} tuning - (Optional) the A4 frequency (440 by default) 168 | * @return {Float} the freq of the number if hertzs or null if not valid note 169 | * @example 170 | * var parser = require('note-parser') 171 | * parser.freq('A4') // => 440 172 | * parser.freq('A') // => null 173 | * @example 174 | * // can change tuning (440 by default) 175 | * parser.freq('A4', 444) // => 444 176 | * parser.freq('A3', 444) // => 222 177 | * @example 178 | * // it accepts midi numbers (as numbers and as strings) 179 | * parser.freq(69) // => 440 180 | * parser.freq('69', 442) // => 442 181 | */ 182 | export function freq (note, tuning) { 183 | var m = midi(note) 184 | return m === null ? null : midiToFreq(m, tuning) 185 | } 186 | 187 | export function letter (src) { return (parse(src) || {}).letter } 188 | export function acc (src) { return (parse(src) || {}).acc } 189 | export function pc (src) { return (parse(src) || {}).pc } 190 | export function step (src) { return (parse(src) || {}).step } 191 | export function alt (src) { return (parse(src) || {}).alt } 192 | export function chroma (src) { return (parse(src) || {}).chroma } 193 | export function oct (src) { return (parse(src) || {}).oct } 194 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "note-parser", 3 | "version": "2.0.1", 4 | "description": "Parse music notes in scientific notation", 5 | "main": "dist/note-parser.js", 6 | "jsnext:main": "index.js", 7 | "module": "index.js", 8 | "scripts": { 9 | "pretest": "npm run build", 10 | "test": "eslint index.js && mocha", 11 | "api": "jsdoc2md index.js > API.md", 12 | "build": "rollup -cm -n NoteParser -f umd -i index.js -o dist/note-parser.js", 13 | "prepublish": "npm run build", 14 | "release": "npm run build && npm test && git commit -am $npm_package_version && git tag $npm_package_version && git push && git push --tags && npm publish" 15 | }, 16 | "repository": { 17 | "type": "git", 18 | "url": "git+https://github.com/danigb/note-parser.git" 19 | }, 20 | "keywords": [ 21 | "note", 22 | "parse", 23 | "parser", 24 | "midi", 25 | "scientific", 26 | "notation", 27 | "frequency" 28 | ], 29 | "author": "danigb ", 30 | "license": "MIT", 31 | "bugs": { 32 | "url": "https://github.com/danigb/note-parser/issues" 33 | }, 34 | "homepage": "https://github.com/danigb/note-parser#readme", 35 | "devDependencies": { 36 | "eslint": "^3.19.0", 37 | "eslint-config-standard": "^7.1.0", 38 | "eslint-plugin-import": "^2.2.0", 39 | "eslint-plugin-node": "^4.2.2", 40 | "eslint-plugin-promise": "^3.5.0", 41 | "eslint-plugin-standard": "^2.1.1", 42 | "mocha": "*", 43 | "rollup": "^0.41.6", 44 | "rollup-plugin-uglify": "^1.0.1" 45 | } 46 | } 47 | -------------------------------------------------------------------------------- /rollup.config.js: -------------------------------------------------------------------------------- 1 | import uglify from "rollup-plugin-uglify" 2 | 3 | export default { 4 | plugins: [ 5 | uglify({ 6 | compress: { 7 | collapse_vars: true, 8 | pure_funcs: ["Object.defineProperty"] 9 | } 10 | }) 11 | ] 12 | } 13 | -------------------------------------------------------------------------------- /test/note-parser-test.js: -------------------------------------------------------------------------------- 1 | /* global describe it */ 2 | 3 | var assert = require('assert') 4 | var parser = require('..') 5 | 6 | function map (fn) { 7 | return function (str) { 8 | return str.split(' ').map(fn) 9 | } 10 | } 11 | 12 | describe('note parser', function () { 13 | describe('parse', function () { 14 | var parse = parser.parse 15 | it('parse pitch classes', function () { 16 | assert.deepEqual(parse('fx'), 17 | { letter: 'F', acc: '##', pc: 'F##', step: 3, alt: 2, chroma: 7 }) 18 | }) 19 | it('parse notes', function () { 20 | assert.deepEqual(parse('Cb4'), 21 | { letter: 'C', acc: 'b', pc: 'Cb', step: 0, alt: -1, chroma: 11, 22 | oct: 4, midi: 59, freq: 246.94165062806206 }) 23 | assert.deepEqual(parse('A#4'), 24 | { letter: 'A', acc: '#', pc: 'A#', step: 5, alt: 1, chroma: 10, 25 | oct: 4, midi: 70, freq: 466.1637615180899 }) 26 | }) 27 | it('parse tonicOf', function () { 28 | assert.equal(parse('CMaj7', true).tonicOf, 'Maj7') 29 | assert.equal(parse('C4 major', true).tonicOf, 'major') 30 | assert.equal(parse('C64', true).tonicOf, '') 31 | assert.equal(parse('G7', true).tonicOf, '') 32 | }) 33 | it('different tunning', function () { 34 | assert.equal(parse('A2', false, 444).freq, 111) 35 | }) 36 | }) 37 | 38 | describe('build', function () { 39 | var build = parser.build 40 | it('build letters', function () { 41 | assert.deepEqual([0, 1, 2, 3, 4, 5, 6].map(function (s) { 42 | return build(s) 43 | }), [ 'C', 'D', 'E', 'F', 'G', 'A', 'B' ]) 44 | assert.equal(build(-1), null) 45 | }) 46 | it('build letters and accidentals', function () { 47 | assert.deepEqual([0, 1, 2, 3, 4, 5, 6].map(function (i) { 48 | return build(0, i) 49 | }), [ 'C', 'C#', 'C##', 'C###', 'C####', 'C#####', 'C######' ]) 50 | assert.deepEqual([0, 1, 2, 3, 4, 5, 6].map(function (i) { 51 | return build(0, -i) 52 | }), [ 'C', 'Cb', 'Cbb', 'Cbbb', 'Cbbbb', 'Cbbbbb', 'Cbbbbbb' ]) 53 | }) 54 | it('build letter accidentals and octaves', function () { 55 | assert.deepEqual([-4, -3, -2, -1, 0, 1, 2, 3, 4, 5, 6, 10].map(function (i) { 56 | return build(0, 0, i) 57 | }), [ 'C-4', 'C-3', 'C-2', 'C-1', 'C0', 'C1', 'C2', 'C3', 'C4', 'C5', 'C6', 'C10' ]) 58 | }) 59 | it('accepts the parsed object', function () { 60 | assert.deepEqual(['c', 'd3', 'e#', 'fx', 'gbb4', 'ab-5', 'bbbbbb-11', 'blah'].map(function (s) { 61 | return build(parser.parse(s)) 62 | }), [ 'C', 'D3', 'E#', 'F##', 'Gbb4', 'Ab-5', 'Bbbbbb-11', null ]) 63 | assert.equal(build(), null) 64 | }) 65 | }) 66 | 67 | describe('regex', function () { 68 | it('regex return a RegExp object', function () { 69 | assert(parser.regex() instanceof RegExp) 70 | }) 71 | }) 72 | describe('letter', function () { 73 | var letters = map(parser.letter) 74 | it('get note letters', function () { 75 | assert.deepEqual(letters('a b c d e f g'), 76 | [ 'A', 'B', 'C', 'D', 'E', 'F', 'G' ]) 77 | }) 78 | }) 79 | describe('acc', function () { 80 | var accs = map(parser.acc) 81 | it('get note accidentals', function () { 82 | assert.deepEqual(accs('c d e f g a b'), [ '', '', '', '', '', '', '' ]) 83 | assert.deepEqual(accs('c# d# e# f# g# a# b#'), [ '#', '#', '#', '#', '#', '#', '#' ]) 84 | assert.deepEqual(accs('c## d## e## f## g## a## b##'), [ '##', '##', '##', '##', '##', '##', '##' ]) 85 | assert.deepEqual(accs('cx dx ex fx gx ax bx'), [ '##', '##', '##', '##', '##', '##', '##' ]) 86 | assert.deepEqual(accs('cb db eb fb gb ab bb'), [ 'b', 'b', 'b', 'b', 'b', 'b', 'b' ]) 87 | assert.deepEqual(accs('cbb dbb ebb fbb gbb abb bbb'), [ 'bb', 'bb', 'bb', 'bb', 'bb', 'bb', 'bb' ]) 88 | }) 89 | }) 90 | describe('pc', function () { 91 | var pcs = map(parser.pc) 92 | it('get pitch classes', function () { 93 | assert.deepEqual(pcs('c d# e## fx gb abb bbb'), 94 | [ 'C', 'D#', 'E##', 'F##', 'Gb', 'Abb', 'Bbb' ]) 95 | }) 96 | }) 97 | describe('steps', function () { 98 | var steps = map(parser.step) 99 | it('get note steps', function () { 100 | assert.deepEqual(steps('c d e f g a b'), 101 | [ 0, 1, 2, 3, 4, 5, 6 ]) 102 | }) 103 | }) 104 | describe('alt', function () { 105 | var alts = map(parser.alt) 106 | it('get alteration', function () { 107 | assert.deepEqual(alts('c d# e## fx gb abb bbb'), 108 | [ 0, 1, 2, 2, -1, -2, -2 ]) 109 | }) 110 | }) 111 | describe('chroma', function () { 112 | var chromas = map(parser.chroma) 113 | it('get chroma', function () { 114 | assert.deepEqual(chromas('cb c db d eb e fb f gb g ab a bb b'), 115 | [ 11, 0, 1, 2, 3, 4, 4, 5, 6, 7, 8, 9, 10, 11 ]) 116 | assert.deepEqual(chromas('c c# d d# e e# f f# g g# a a# b b#'), 117 | [ 0, 1, 2, 3, 4, 5, 5, 6, 7, 8, 9, 10, 11, 0 ]) 118 | }) 119 | it('can be used to find enharmonics', function () { 120 | assert.equal(parser.chroma('Cb'), parser.chroma('B')) 121 | assert.equal(parser.chroma('B#'), parser.chroma('C')) 122 | }) 123 | }) 124 | describe('oct', function () { 125 | it('no octaves for pitch classes', function () { 126 | assert(parser.oct('c') === undefined) 127 | }) 128 | it('no max octaves', function () { 129 | assert.deepEqual(parser.oct('C9999'), 9999) 130 | }) 131 | it('no min octaves', function () { 132 | assert.deepEqual(parser.oct('C-9999'), -9999) 133 | }) 134 | it('get octaves', function () { 135 | var octs = map(parser.oct) 136 | assert.deepEqual(octs('c-1 d0 e1 f2 g3 a4 b5'), 137 | [ -1, 0, 1, 2, 3, 4, 5 ]) 138 | }) 139 | }) 140 | describe('midi', function () { 141 | it('no midi for pitch classes', function () { 142 | assert(parser.midi('c') === null) 143 | }) 144 | it('follows general midi number', function () { 145 | assert.equal(parser.midi('c-1'), 0) 146 | }) 147 | it('get midis', function () { 148 | var midis = map(parser.midi) 149 | assert.deepEqual(midis('c4 d4 e4 f4 g4 a4 b4'), 150 | [ 60, 62, 64, 65, 67, 69, 71 ]) 151 | }) 152 | it('bypasses midi numbers', function () { 153 | assert.equal(parser.midi(60), 60) 154 | assert.equal(parser.midi(-1), null) 155 | assert.equal(parser.midi(128), null) 156 | }) 157 | it('bypasses string midi numbers', function () { 158 | assert.equal(parser.midi('60'), 60) 159 | }) 160 | }) 161 | describe('freq', function () { 162 | it('no freq for pitch classes', function () { 163 | assert.equal(parser.freq('c')) 164 | }) 165 | it('get frequencies', function () { 166 | var freqs = map(function (n) { return parser.freq(n) }) 167 | assert.deepEqual(freqs('c4 d4 e4 f4 g4 a4 b4'), 168 | [ 261.6255653005986, 293.6647679174076, 329.6275569128699, 169 | 349.2282314330039, 391.99543598174927, 440, 493.8833012561241]) 170 | }) 171 | it('get frequencies with different tunning', function () { 172 | assert.equal(parser.freq('a4', 444), 444) 173 | assert.equal(parser.freq('c4', 442), 262.81477241560134) 174 | }) 175 | it('accepts midi numbers', function () { 176 | assert.equal(parser.freq(69, 440), 440) 177 | assert.equal(parser.freq('69', 444), 444) 178 | }) 179 | }) 180 | }) 181 | -------------------------------------------------------------------------------- /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@^5.0.1: 16 | version "5.0.3" 17 | resolved "https://registry.yarnpkg.com/acorn/-/acorn-5.0.3.tgz#c460df08491463f028ccb82eab3730bf01087b3d" 18 | 19 | ajv-keywords@^1.0.0: 20 | version "1.5.1" 21 | resolved "https://registry.yarnpkg.com/ajv-keywords/-/ajv-keywords-1.5.1.tgz#314dd0a4b3368fad3dfcdc54ede6171b886daf3c" 22 | 23 | ajv@^4.7.0: 24 | version "4.11.5" 25 | resolved "https://registry.yarnpkg.com/ajv/-/ajv-4.11.5.tgz#b6ee74657b993a01dce44b7944d56f485828d5bd" 26 | dependencies: 27 | co "^4.6.0" 28 | json-stable-stringify "^1.0.1" 29 | 30 | align-text@^0.1.1, align-text@^0.1.3: 31 | version "0.1.4" 32 | resolved "https://registry.yarnpkg.com/align-text/-/align-text-0.1.4.tgz#0cd90a561093f35d0a99256c22b7069433fad117" 33 | dependencies: 34 | kind-of "^3.0.2" 35 | longest "^1.0.1" 36 | repeat-string "^1.5.2" 37 | 38 | ansi-escapes@^1.1.0: 39 | version "1.4.0" 40 | resolved "https://registry.yarnpkg.com/ansi-escapes/-/ansi-escapes-1.4.0.tgz#d3a8a83b319aa67793662b13e761c7911422306e" 41 | 42 | ansi-regex@^2.0.0: 43 | version "2.1.1" 44 | resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-2.1.1.tgz#c3b33ab5ee360d86e0e628f0468ae7ef27d654df" 45 | 46 | ansi-styles@^2.2.1: 47 | version "2.2.1" 48 | resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-2.2.1.tgz#b432dd3358b634cf75e1e4664368240533c1ddbe" 49 | 50 | argparse@^1.0.7: 51 | version "1.0.9" 52 | resolved "https://registry.yarnpkg.com/argparse/-/argparse-1.0.9.tgz#73d83bc263f86e97f8cc4f6bae1b0e90a7d22c86" 53 | dependencies: 54 | sprintf-js "~1.0.2" 55 | 56 | array-union@^1.0.1: 57 | version "1.0.2" 58 | resolved "https://registry.yarnpkg.com/array-union/-/array-union-1.0.2.tgz#9a34410e4f4e3da23dea375be5be70f24778ec39" 59 | dependencies: 60 | array-uniq "^1.0.1" 61 | 62 | array-uniq@^1.0.1: 63 | version "1.0.3" 64 | resolved "https://registry.yarnpkg.com/array-uniq/-/array-uniq-1.0.3.tgz#af6ac877a25cc7f74e058894753858dfdb24fdb6" 65 | 66 | arrify@^1.0.0: 67 | version "1.0.1" 68 | resolved "https://registry.yarnpkg.com/arrify/-/arrify-1.0.1.tgz#898508da2226f380df904728456849c1501a4b0d" 69 | 70 | babel-code-frame@^6.16.0: 71 | version "6.22.0" 72 | resolved "https://registry.yarnpkg.com/babel-code-frame/-/babel-code-frame-6.22.0.tgz#027620bee567a88c32561574e7fd0801d33118e4" 73 | dependencies: 74 | chalk "^1.1.0" 75 | esutils "^2.0.2" 76 | js-tokens "^3.0.0" 77 | 78 | balanced-match@^0.4.1: 79 | version "0.4.2" 80 | resolved "https://registry.yarnpkg.com/balanced-match/-/balanced-match-0.4.2.tgz#cb3f3e3c732dc0f01ee70b403f302e61d7709838" 81 | 82 | brace-expansion@^1.0.0: 83 | version "1.1.6" 84 | resolved "https://registry.yarnpkg.com/brace-expansion/-/brace-expansion-1.1.6.tgz#7197d7eaa9b87e648390ea61fc66c84427420df9" 85 | dependencies: 86 | balanced-match "^0.4.1" 87 | concat-map "0.0.1" 88 | 89 | browser-stdout@1.3.0: 90 | version "1.3.0" 91 | resolved "https://registry.yarnpkg.com/browser-stdout/-/browser-stdout-1.3.0.tgz#f351d32969d32fa5d7a5567154263d928ae3bd1f" 92 | 93 | buffer-shims@^1.0.0: 94 | version "1.0.0" 95 | resolved "https://registry.yarnpkg.com/buffer-shims/-/buffer-shims-1.0.0.tgz#9978ce317388c649ad8793028c3477ef044a8b51" 96 | 97 | builtin-modules@^1.1.1: 98 | version "1.1.1" 99 | resolved "https://registry.yarnpkg.com/builtin-modules/-/builtin-modules-1.1.1.tgz#270f076c5a72c02f5b65a47df94c5fe3a278892f" 100 | 101 | caller-path@^0.1.0: 102 | version "0.1.0" 103 | resolved "https://registry.yarnpkg.com/caller-path/-/caller-path-0.1.0.tgz#94085ef63581ecd3daa92444a8fe94e82577751f" 104 | dependencies: 105 | callsites "^0.2.0" 106 | 107 | callsites@^0.2.0: 108 | version "0.2.0" 109 | resolved "https://registry.yarnpkg.com/callsites/-/callsites-0.2.0.tgz#afab96262910a7f33c19a5775825c69f34e350ca" 110 | 111 | camelcase@^1.0.2: 112 | version "1.2.1" 113 | resolved "https://registry.yarnpkg.com/camelcase/-/camelcase-1.2.1.tgz#9bb5304d2e0b56698b2c758b08a3eaa9daa58a39" 114 | 115 | center-align@^0.1.1: 116 | version "0.1.3" 117 | resolved "https://registry.yarnpkg.com/center-align/-/center-align-0.1.3.tgz#aa0d32629b6ee972200411cbd4461c907bc2b7ad" 118 | dependencies: 119 | align-text "^0.1.3" 120 | lazy-cache "^1.0.3" 121 | 122 | chalk@^1.0.0, chalk@^1.1.0, chalk@^1.1.1, chalk@^1.1.3: 123 | version "1.1.3" 124 | resolved "https://registry.yarnpkg.com/chalk/-/chalk-1.1.3.tgz#a8115c55e4a702fe4d150abd3872822a7e09fc98" 125 | dependencies: 126 | ansi-styles "^2.2.1" 127 | escape-string-regexp "^1.0.2" 128 | has-ansi "^2.0.0" 129 | strip-ansi "^3.0.0" 130 | supports-color "^2.0.0" 131 | 132 | circular-json@^0.3.1: 133 | version "0.3.1" 134 | resolved "https://registry.yarnpkg.com/circular-json/-/circular-json-0.3.1.tgz#be8b36aefccde8b3ca7aa2d6afc07a37242c0d2d" 135 | 136 | cli-cursor@^1.0.1: 137 | version "1.0.2" 138 | resolved "https://registry.yarnpkg.com/cli-cursor/-/cli-cursor-1.0.2.tgz#64da3f7d56a54412e59794bd62dc35295e8f2987" 139 | dependencies: 140 | restore-cursor "^1.0.1" 141 | 142 | cli-width@^2.0.0: 143 | version "2.1.0" 144 | resolved "https://registry.yarnpkg.com/cli-width/-/cli-width-2.1.0.tgz#b234ca209b29ef66fc518d9b98d5847b00edf00a" 145 | 146 | cliui@^2.1.0: 147 | version "2.1.0" 148 | resolved "https://registry.yarnpkg.com/cliui/-/cliui-2.1.0.tgz#4b475760ff80264c762c3a1719032e91c7fea0d1" 149 | dependencies: 150 | center-align "^0.1.1" 151 | right-align "^0.1.1" 152 | wordwrap "0.0.2" 153 | 154 | co@^4.6.0: 155 | version "4.6.0" 156 | resolved "https://registry.yarnpkg.com/co/-/co-4.6.0.tgz#6ea6bdf3d853ae54ccb8e47bfa0bf3f9031fb184" 157 | 158 | code-point-at@^1.0.0: 159 | version "1.1.0" 160 | resolved "https://registry.yarnpkg.com/code-point-at/-/code-point-at-1.1.0.tgz#0d070b4d043a5bea33a2f1a40e2edb3d9a4ccf77" 161 | 162 | commander@2.9.0: 163 | version "2.9.0" 164 | resolved "https://registry.yarnpkg.com/commander/-/commander-2.9.0.tgz#9c99094176e12240cb22d6c5146098400fe0f7d4" 165 | dependencies: 166 | graceful-readlink ">= 1.0.0" 167 | 168 | concat-map@0.0.1: 169 | version "0.0.1" 170 | resolved "https://registry.yarnpkg.com/concat-map/-/concat-map-0.0.1.tgz#d8a96bd77fd68df7793a73036a3ba0d5405d477b" 171 | 172 | concat-stream@^1.5.2: 173 | version "1.6.0" 174 | resolved "https://registry.yarnpkg.com/concat-stream/-/concat-stream-1.6.0.tgz#0aac662fd52be78964d5532f694784e70110acf7" 175 | dependencies: 176 | inherits "^2.0.3" 177 | readable-stream "^2.2.2" 178 | typedarray "^0.0.6" 179 | 180 | contains-path@^0.1.0: 181 | version "0.1.0" 182 | resolved "https://registry.yarnpkg.com/contains-path/-/contains-path-0.1.0.tgz#fe8cf184ff6670b6baef01a9d4861a5cbec4120a" 183 | 184 | core-util-is@~1.0.0: 185 | version "1.0.2" 186 | resolved "https://registry.yarnpkg.com/core-util-is/-/core-util-is-1.0.2.tgz#b5fd54220aa2bc5ab57aab7140c940754503c1a7" 187 | 188 | d@1: 189 | version "1.0.0" 190 | resolved "https://registry.yarnpkg.com/d/-/d-1.0.0.tgz#754bb5bfe55451da69a58b94d45f4c5b0462d58f" 191 | dependencies: 192 | es5-ext "^0.10.9" 193 | 194 | debug@2.2.0, debug@^2.1.1, debug@^2.2.0: 195 | version "2.2.0" 196 | resolved "https://registry.yarnpkg.com/debug/-/debug-2.2.0.tgz#f87057e995b1a1f6ae6a4960664137bc56f039da" 197 | dependencies: 198 | ms "0.7.1" 199 | 200 | decamelize@^1.0.0: 201 | version "1.2.0" 202 | resolved "https://registry.yarnpkg.com/decamelize/-/decamelize-1.2.0.tgz#f6534d15148269b20352e7bee26f501f9a191290" 203 | 204 | deep-is@~0.1.3: 205 | version "0.1.3" 206 | resolved "https://registry.yarnpkg.com/deep-is/-/deep-is-0.1.3.tgz#b369d6fb5dbc13eecf524f91b070feedc357cf34" 207 | 208 | del@^2.0.2: 209 | version "2.2.2" 210 | resolved "https://registry.yarnpkg.com/del/-/del-2.2.2.tgz#c12c981d067846c84bcaf862cff930d907ffd1a8" 211 | dependencies: 212 | globby "^5.0.0" 213 | is-path-cwd "^1.0.0" 214 | is-path-in-cwd "^1.0.0" 215 | object-assign "^4.0.1" 216 | pify "^2.0.0" 217 | pinkie-promise "^2.0.0" 218 | rimraf "^2.2.8" 219 | 220 | diff@1.4.0: 221 | version "1.4.0" 222 | resolved "https://registry.yarnpkg.com/diff/-/diff-1.4.0.tgz#7f28d2eb9ee7b15a97efd89ce63dcfdaa3ccbabf" 223 | 224 | doctrine@1.5.0: 225 | version "1.5.0" 226 | resolved "https://registry.yarnpkg.com/doctrine/-/doctrine-1.5.0.tgz#379dce730f6166f76cefa4e6707a159b02c5a6fa" 227 | dependencies: 228 | esutils "^2.0.2" 229 | isarray "^1.0.0" 230 | 231 | doctrine@^2.0.0: 232 | version "2.0.0" 233 | resolved "https://registry.yarnpkg.com/doctrine/-/doctrine-2.0.0.tgz#c73d8d2909d22291e1a007a395804da8b665fe63" 234 | dependencies: 235 | esutils "^2.0.2" 236 | isarray "^1.0.0" 237 | 238 | es5-ext@^0.10.14, es5-ext@^0.10.9, es5-ext@~0.10.14: 239 | version "0.10.15" 240 | resolved "https://registry.yarnpkg.com/es5-ext/-/es5-ext-0.10.15.tgz#c330a5934c1ee21284a7c081a86e5fd937c91ea6" 241 | dependencies: 242 | es6-iterator "2" 243 | es6-symbol "~3.1" 244 | 245 | es6-iterator@2, es6-iterator@^2.0.1, es6-iterator@~2.0.1: 246 | version "2.0.1" 247 | resolved "https://registry.yarnpkg.com/es6-iterator/-/es6-iterator-2.0.1.tgz#8e319c9f0453bf575d374940a655920e59ca5512" 248 | dependencies: 249 | d "1" 250 | es5-ext "^0.10.14" 251 | es6-symbol "^3.1" 252 | 253 | es6-map@^0.1.3: 254 | version "0.1.5" 255 | resolved "https://registry.yarnpkg.com/es6-map/-/es6-map-0.1.5.tgz#9136e0503dcc06a301690f0bb14ff4e364e949f0" 256 | dependencies: 257 | d "1" 258 | es5-ext "~0.10.14" 259 | es6-iterator "~2.0.1" 260 | es6-set "~0.1.5" 261 | es6-symbol "~3.1.1" 262 | event-emitter "~0.3.5" 263 | 264 | es6-set@~0.1.5: 265 | version "0.1.5" 266 | resolved "https://registry.yarnpkg.com/es6-set/-/es6-set-0.1.5.tgz#d2b3ec5d4d800ced818db538d28974db0a73ccb1" 267 | dependencies: 268 | d "1" 269 | es5-ext "~0.10.14" 270 | es6-iterator "~2.0.1" 271 | es6-symbol "3.1.1" 272 | event-emitter "~0.3.5" 273 | 274 | es6-symbol@3.1.1, es6-symbol@^3.1, es6-symbol@^3.1.1, es6-symbol@~3.1, es6-symbol@~3.1.1: 275 | version "3.1.1" 276 | resolved "https://registry.yarnpkg.com/es6-symbol/-/es6-symbol-3.1.1.tgz#bf00ef4fdab6ba1b46ecb7b629b4c7ed5715cc77" 277 | dependencies: 278 | d "1" 279 | es5-ext "~0.10.14" 280 | 281 | es6-weak-map@^2.0.1: 282 | version "2.0.2" 283 | resolved "https://registry.yarnpkg.com/es6-weak-map/-/es6-weak-map-2.0.2.tgz#5e3ab32251ffd1538a1f8e5ffa1357772f92d96f" 284 | dependencies: 285 | d "1" 286 | es5-ext "^0.10.14" 287 | es6-iterator "^2.0.1" 288 | es6-symbol "^3.1.1" 289 | 290 | escape-string-regexp@1.0.5, escape-string-regexp@^1.0.2, escape-string-regexp@^1.0.5: 291 | version "1.0.5" 292 | resolved "https://registry.yarnpkg.com/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz#1b61c0562190a8dff6ae3bb2cf0200ca130b86d4" 293 | 294 | escope@^3.6.0: 295 | version "3.6.0" 296 | resolved "https://registry.yarnpkg.com/escope/-/escope-3.6.0.tgz#e01975e812781a163a6dadfdd80398dc64c889c3" 297 | dependencies: 298 | es6-map "^0.1.3" 299 | es6-weak-map "^2.0.1" 300 | esrecurse "^4.1.0" 301 | estraverse "^4.1.1" 302 | 303 | eslint-config-standard@^7.1.0: 304 | version "7.1.0" 305 | resolved "https://registry.yarnpkg.com/eslint-config-standard/-/eslint-config-standard-7.1.0.tgz#47e769ea0739f5b2d5693b1a501c21c9650fafcf" 306 | 307 | eslint-import-resolver-node@^0.2.0: 308 | version "0.2.3" 309 | resolved "https://registry.yarnpkg.com/eslint-import-resolver-node/-/eslint-import-resolver-node-0.2.3.tgz#5add8106e8c928db2cba232bcd9efa846e3da16c" 310 | dependencies: 311 | debug "^2.2.0" 312 | object-assign "^4.0.1" 313 | resolve "^1.1.6" 314 | 315 | eslint-module-utils@^2.0.0: 316 | version "2.0.0" 317 | resolved "https://registry.yarnpkg.com/eslint-module-utils/-/eslint-module-utils-2.0.0.tgz#a6f8c21d901358759cdc35dbac1982ae1ee58bce" 318 | dependencies: 319 | debug "2.2.0" 320 | pkg-dir "^1.0.0" 321 | 322 | eslint-plugin-import@^2.2.0: 323 | version "2.2.0" 324 | resolved "https://registry.yarnpkg.com/eslint-plugin-import/-/eslint-plugin-import-2.2.0.tgz#72ba306fad305d67c4816348a4699a4229ac8b4e" 325 | dependencies: 326 | builtin-modules "^1.1.1" 327 | contains-path "^0.1.0" 328 | debug "^2.2.0" 329 | doctrine "1.5.0" 330 | eslint-import-resolver-node "^0.2.0" 331 | eslint-module-utils "^2.0.0" 332 | has "^1.0.1" 333 | lodash.cond "^4.3.0" 334 | minimatch "^3.0.3" 335 | pkg-up "^1.0.0" 336 | 337 | eslint-plugin-node@^4.2.2: 338 | version "4.2.2" 339 | resolved "https://registry.yarnpkg.com/eslint-plugin-node/-/eslint-plugin-node-4.2.2.tgz#82959ca9aed79fcbd28bb1b188d05cac04fb3363" 340 | dependencies: 341 | ignore "^3.0.11" 342 | minimatch "^3.0.2" 343 | object-assign "^4.0.1" 344 | resolve "^1.1.7" 345 | semver "5.3.0" 346 | 347 | eslint-plugin-promise@^3.5.0: 348 | version "3.5.0" 349 | resolved "https://registry.yarnpkg.com/eslint-plugin-promise/-/eslint-plugin-promise-3.5.0.tgz#78fbb6ffe047201627569e85a6c5373af2a68fca" 350 | 351 | eslint-plugin-standard@^2.1.1: 352 | version "2.1.1" 353 | resolved "https://registry.yarnpkg.com/eslint-plugin-standard/-/eslint-plugin-standard-2.1.1.tgz#97960b1537e1718bb633877d0a650050effff3b0" 354 | 355 | eslint@^3.19.0: 356 | version "3.19.0" 357 | resolved "https://registry.yarnpkg.com/eslint/-/eslint-3.19.0.tgz#c8fc6201c7f40dd08941b87c085767386a679acc" 358 | dependencies: 359 | babel-code-frame "^6.16.0" 360 | chalk "^1.1.3" 361 | concat-stream "^1.5.2" 362 | debug "^2.1.1" 363 | doctrine "^2.0.0" 364 | escope "^3.6.0" 365 | espree "^3.4.0" 366 | esquery "^1.0.0" 367 | estraverse "^4.2.0" 368 | esutils "^2.0.2" 369 | file-entry-cache "^2.0.0" 370 | glob "^7.0.3" 371 | globals "^9.14.0" 372 | ignore "^3.2.0" 373 | imurmurhash "^0.1.4" 374 | inquirer "^0.12.0" 375 | is-my-json-valid "^2.10.0" 376 | is-resolvable "^1.0.0" 377 | js-yaml "^3.5.1" 378 | json-stable-stringify "^1.0.0" 379 | levn "^0.3.0" 380 | lodash "^4.0.0" 381 | mkdirp "^0.5.0" 382 | natural-compare "^1.4.0" 383 | optionator "^0.8.2" 384 | path-is-inside "^1.0.1" 385 | pluralize "^1.2.1" 386 | progress "^1.1.8" 387 | require-uncached "^1.0.2" 388 | shelljs "^0.7.5" 389 | strip-bom "^3.0.0" 390 | strip-json-comments "~2.0.1" 391 | table "^3.7.8" 392 | text-table "~0.2.0" 393 | user-home "^2.0.0" 394 | 395 | espree@^3.4.0: 396 | version "3.4.1" 397 | resolved "https://registry.yarnpkg.com/espree/-/espree-3.4.1.tgz#28a83ab4aaed71ed8fe0f5efe61b76a05c13c4d2" 398 | dependencies: 399 | acorn "^5.0.1" 400 | acorn-jsx "^3.0.0" 401 | 402 | esprima@^3.1.1: 403 | version "3.1.3" 404 | resolved "https://registry.yarnpkg.com/esprima/-/esprima-3.1.3.tgz#fdca51cee6133895e3c88d535ce49dbff62a4633" 405 | 406 | esquery@^1.0.0: 407 | version "1.0.0" 408 | resolved "https://registry.yarnpkg.com/esquery/-/esquery-1.0.0.tgz#cfba8b57d7fba93f17298a8a006a04cda13d80fa" 409 | dependencies: 410 | estraverse "^4.0.0" 411 | 412 | esrecurse@^4.1.0: 413 | version "4.1.0" 414 | resolved "https://registry.yarnpkg.com/esrecurse/-/esrecurse-4.1.0.tgz#4713b6536adf7f2ac4f327d559e7756bff648220" 415 | dependencies: 416 | estraverse "~4.1.0" 417 | object-assign "^4.0.1" 418 | 419 | estraverse@^4.0.0, estraverse@^4.1.1, estraverse@^4.2.0: 420 | version "4.2.0" 421 | resolved "https://registry.yarnpkg.com/estraverse/-/estraverse-4.2.0.tgz#0dee3fed31fcd469618ce7342099fc1afa0bdb13" 422 | 423 | estraverse@~4.1.0: 424 | version "4.1.1" 425 | resolved "https://registry.yarnpkg.com/estraverse/-/estraverse-4.1.1.tgz#f6caca728933a850ef90661d0e17982ba47111a2" 426 | 427 | esutils@^2.0.2: 428 | version "2.0.2" 429 | resolved "https://registry.yarnpkg.com/esutils/-/esutils-2.0.2.tgz#0abf4f1caa5bcb1f7a9d8acc6dea4faaa04bac9b" 430 | 431 | event-emitter@~0.3.5: 432 | version "0.3.5" 433 | resolved "https://registry.yarnpkg.com/event-emitter/-/event-emitter-0.3.5.tgz#df8c69eef1647923c7157b9ce83840610b02cc39" 434 | dependencies: 435 | d "1" 436 | es5-ext "~0.10.14" 437 | 438 | exit-hook@^1.0.0: 439 | version "1.1.1" 440 | resolved "https://registry.yarnpkg.com/exit-hook/-/exit-hook-1.1.1.tgz#f05ca233b48c05d54fff07765df8507e95c02ff8" 441 | 442 | fast-levenshtein@~2.0.4: 443 | version "2.0.6" 444 | resolved "https://registry.yarnpkg.com/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz#3d8a5c66883a16a30ca8643e851f19baa7797917" 445 | 446 | figures@^1.3.5: 447 | version "1.7.0" 448 | resolved "https://registry.yarnpkg.com/figures/-/figures-1.7.0.tgz#cbe1e3affcf1cd44b80cadfed28dc793a9701d2e" 449 | dependencies: 450 | escape-string-regexp "^1.0.5" 451 | object-assign "^4.1.0" 452 | 453 | file-entry-cache@^2.0.0: 454 | version "2.0.0" 455 | resolved "https://registry.yarnpkg.com/file-entry-cache/-/file-entry-cache-2.0.0.tgz#c392990c3e684783d838b8c84a45d8a048458361" 456 | dependencies: 457 | flat-cache "^1.2.1" 458 | object-assign "^4.0.1" 459 | 460 | find-up@^1.0.0: 461 | version "1.1.2" 462 | resolved "https://registry.yarnpkg.com/find-up/-/find-up-1.1.2.tgz#6b2e9822b1a2ce0a60ab64d610eccad53cb24d0f" 463 | dependencies: 464 | path-exists "^2.0.0" 465 | pinkie-promise "^2.0.0" 466 | 467 | flat-cache@^1.2.1: 468 | version "1.2.2" 469 | resolved "https://registry.yarnpkg.com/flat-cache/-/flat-cache-1.2.2.tgz#fa86714e72c21db88601761ecf2f555d1abc6b96" 470 | dependencies: 471 | circular-json "^0.3.1" 472 | del "^2.0.2" 473 | graceful-fs "^4.1.2" 474 | write "^0.2.1" 475 | 476 | fs.realpath@^1.0.0: 477 | version "1.0.0" 478 | resolved "https://registry.yarnpkg.com/fs.realpath/-/fs.realpath-1.0.0.tgz#1504ad2523158caa40db4a2787cb01411994ea4f" 479 | 480 | function-bind@^1.0.2: 481 | version "1.1.0" 482 | resolved "https://registry.yarnpkg.com/function-bind/-/function-bind-1.1.0.tgz#16176714c801798e4e8f2cf7f7529467bb4a5771" 483 | 484 | generate-function@^2.0.0: 485 | version "2.0.0" 486 | resolved "https://registry.yarnpkg.com/generate-function/-/generate-function-2.0.0.tgz#6858fe7c0969b7d4e9093337647ac79f60dfbe74" 487 | 488 | generate-object-property@^1.1.0: 489 | version "1.2.0" 490 | resolved "https://registry.yarnpkg.com/generate-object-property/-/generate-object-property-1.2.0.tgz#9c0e1c40308ce804f4783618b937fa88f99d50d0" 491 | dependencies: 492 | is-property "^1.0.0" 493 | 494 | glob@7.0.5, glob@^7.0.0, glob@^7.0.3, glob@^7.0.5: 495 | version "7.0.5" 496 | resolved "https://registry.yarnpkg.com/glob/-/glob-7.0.5.tgz#b4202a69099bbb4d292a7c1b95b6682b67ebdc95" 497 | dependencies: 498 | fs.realpath "^1.0.0" 499 | inflight "^1.0.4" 500 | inherits "2" 501 | minimatch "^3.0.2" 502 | once "^1.3.0" 503 | path-is-absolute "^1.0.0" 504 | 505 | globals@^9.14.0: 506 | version "9.17.0" 507 | resolved "https://registry.yarnpkg.com/globals/-/globals-9.17.0.tgz#0c0ca696d9b9bb694d2e5470bd37777caad50286" 508 | 509 | globby@^5.0.0: 510 | version "5.0.0" 511 | resolved "https://registry.yarnpkg.com/globby/-/globby-5.0.0.tgz#ebd84667ca0dbb330b99bcfc68eac2bc54370e0d" 512 | dependencies: 513 | array-union "^1.0.1" 514 | arrify "^1.0.0" 515 | glob "^7.0.3" 516 | object-assign "^4.0.1" 517 | pify "^2.0.0" 518 | pinkie-promise "^2.0.0" 519 | 520 | graceful-fs@^4.1.2: 521 | version "4.1.11" 522 | resolved "https://registry.yarnpkg.com/graceful-fs/-/graceful-fs-4.1.11.tgz#0e8bdfe4d1ddb8854d64e04ea7c00e2a026e5658" 523 | 524 | "graceful-readlink@>= 1.0.0": 525 | version "1.0.1" 526 | resolved "https://registry.yarnpkg.com/graceful-readlink/-/graceful-readlink-1.0.1.tgz#4cafad76bc62f02fa039b2f94e9a3dd3a391a725" 527 | 528 | growl@1.9.2: 529 | version "1.9.2" 530 | resolved "https://registry.yarnpkg.com/growl/-/growl-1.9.2.tgz#0ea7743715db8d8de2c5ede1775e1b45ac85c02f" 531 | 532 | has-ansi@^2.0.0: 533 | version "2.0.0" 534 | resolved "https://registry.yarnpkg.com/has-ansi/-/has-ansi-2.0.0.tgz#34f5049ce1ecdf2b0649af3ef24e45ed35416d91" 535 | dependencies: 536 | ansi-regex "^2.0.0" 537 | 538 | has-flag@^1.0.0: 539 | version "1.0.0" 540 | resolved "https://registry.yarnpkg.com/has-flag/-/has-flag-1.0.0.tgz#9d9e793165ce017a00f00418c43f942a7b1d11fa" 541 | 542 | has@^1.0.1: 543 | version "1.0.1" 544 | resolved "https://registry.yarnpkg.com/has/-/has-1.0.1.tgz#8461733f538b0837c9361e39a9ab9e9704dc2f28" 545 | dependencies: 546 | function-bind "^1.0.2" 547 | 548 | ignore@^3.0.11, ignore@^3.2.0: 549 | version "3.2.6" 550 | resolved "https://registry.yarnpkg.com/ignore/-/ignore-3.2.6.tgz#26e8da0644be0bb4cb39516f6c79f0e0f4ffe48c" 551 | 552 | imurmurhash@^0.1.4: 553 | version "0.1.4" 554 | resolved "https://registry.yarnpkg.com/imurmurhash/-/imurmurhash-0.1.4.tgz#9218b9b2b928a238b13dc4fb6b6d576f231453ea" 555 | 556 | inflight@^1.0.4: 557 | version "1.0.6" 558 | resolved "https://registry.yarnpkg.com/inflight/-/inflight-1.0.6.tgz#49bd6331d7d02d0c09bc910a1075ba8165b56df9" 559 | dependencies: 560 | once "^1.3.0" 561 | wrappy "1" 562 | 563 | inherits@2, inherits@^2.0.3, inherits@~2.0.1: 564 | version "2.0.3" 565 | resolved "https://registry.yarnpkg.com/inherits/-/inherits-2.0.3.tgz#633c2c83e3da42a502f52466022480f4208261de" 566 | 567 | inquirer@^0.12.0: 568 | version "0.12.0" 569 | resolved "https://registry.yarnpkg.com/inquirer/-/inquirer-0.12.0.tgz#1ef2bfd63504df0bc75785fff8c2c41df12f077e" 570 | dependencies: 571 | ansi-escapes "^1.1.0" 572 | ansi-regex "^2.0.0" 573 | chalk "^1.0.0" 574 | cli-cursor "^1.0.1" 575 | cli-width "^2.0.0" 576 | figures "^1.3.5" 577 | lodash "^4.3.0" 578 | readline2 "^1.0.1" 579 | run-async "^0.1.0" 580 | rx-lite "^3.1.2" 581 | string-width "^1.0.1" 582 | strip-ansi "^3.0.0" 583 | through "^2.3.6" 584 | 585 | interpret@^1.0.0: 586 | version "1.0.2" 587 | resolved "https://registry.yarnpkg.com/interpret/-/interpret-1.0.2.tgz#f4f623f0bb7122f15f5717c8e254b8161b5c5b2d" 588 | 589 | is-buffer@^1.0.2: 590 | version "1.1.5" 591 | resolved "https://registry.yarnpkg.com/is-buffer/-/is-buffer-1.1.5.tgz#1f3b26ef613b214b88cbca23cc6c01d87961eecc" 592 | 593 | is-fullwidth-code-point@^1.0.0: 594 | version "1.0.0" 595 | resolved "https://registry.yarnpkg.com/is-fullwidth-code-point/-/is-fullwidth-code-point-1.0.0.tgz#ef9e31386f031a7f0d643af82fde50c457ef00cb" 596 | dependencies: 597 | number-is-nan "^1.0.0" 598 | 599 | is-fullwidth-code-point@^2.0.0: 600 | version "2.0.0" 601 | resolved "https://registry.yarnpkg.com/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz#a3b30a5c4f199183167aaab93beefae3ddfb654f" 602 | 603 | is-my-json-valid@^2.10.0: 604 | version "2.16.0" 605 | resolved "https://registry.yarnpkg.com/is-my-json-valid/-/is-my-json-valid-2.16.0.tgz#f079dd9bfdae65ee2038aae8acbc86ab109e3693" 606 | dependencies: 607 | generate-function "^2.0.0" 608 | generate-object-property "^1.1.0" 609 | jsonpointer "^4.0.0" 610 | xtend "^4.0.0" 611 | 612 | is-path-cwd@^1.0.0: 613 | version "1.0.0" 614 | resolved "https://registry.yarnpkg.com/is-path-cwd/-/is-path-cwd-1.0.0.tgz#d225ec23132e89edd38fda767472e62e65f1106d" 615 | 616 | is-path-in-cwd@^1.0.0: 617 | version "1.0.0" 618 | resolved "https://registry.yarnpkg.com/is-path-in-cwd/-/is-path-in-cwd-1.0.0.tgz#6477582b8214d602346094567003be8a9eac04dc" 619 | dependencies: 620 | is-path-inside "^1.0.0" 621 | 622 | is-path-inside@^1.0.0: 623 | version "1.0.0" 624 | resolved "https://registry.yarnpkg.com/is-path-inside/-/is-path-inside-1.0.0.tgz#fc06e5a1683fbda13de667aff717bbc10a48f37f" 625 | dependencies: 626 | path-is-inside "^1.0.1" 627 | 628 | is-property@^1.0.0: 629 | version "1.0.2" 630 | resolved "https://registry.yarnpkg.com/is-property/-/is-property-1.0.2.tgz#57fe1c4e48474edd65b09911f26b1cd4095dda84" 631 | 632 | is-resolvable@^1.0.0: 633 | version "1.0.0" 634 | resolved "https://registry.yarnpkg.com/is-resolvable/-/is-resolvable-1.0.0.tgz#8df57c61ea2e3c501408d100fb013cf8d6e0cc62" 635 | dependencies: 636 | tryit "^1.0.1" 637 | 638 | isarray@^1.0.0, isarray@~1.0.0: 639 | version "1.0.0" 640 | resolved "https://registry.yarnpkg.com/isarray/-/isarray-1.0.0.tgz#bb935d48582cba168c06834957a54a3e07124f11" 641 | 642 | js-tokens@^3.0.0: 643 | version "3.0.1" 644 | resolved "https://registry.yarnpkg.com/js-tokens/-/js-tokens-3.0.1.tgz#08e9f132484a2c45a30907e9dc4d5567b7f114d7" 645 | 646 | js-yaml@^3.5.1: 647 | version "3.8.2" 648 | resolved "https://registry.yarnpkg.com/js-yaml/-/js-yaml-3.8.2.tgz#02d3e2c0f6beab20248d412c352203827d786721" 649 | dependencies: 650 | argparse "^1.0.7" 651 | esprima "^3.1.1" 652 | 653 | json-stable-stringify@^1.0.0, json-stable-stringify@^1.0.1: 654 | version "1.0.1" 655 | resolved "https://registry.yarnpkg.com/json-stable-stringify/-/json-stable-stringify-1.0.1.tgz#9a759d39c5f2ff503fd5300646ed445f88c4f9af" 656 | dependencies: 657 | jsonify "~0.0.0" 658 | 659 | json3@3.3.2: 660 | version "3.3.2" 661 | resolved "https://registry.yarnpkg.com/json3/-/json3-3.3.2.tgz#3c0434743df93e2f5c42aee7b19bcb483575f4e1" 662 | 663 | jsonify@~0.0.0: 664 | version "0.0.0" 665 | resolved "https://registry.yarnpkg.com/jsonify/-/jsonify-0.0.0.tgz#2c74b6ee41d93ca51b7b5aaee8f503631d252a73" 666 | 667 | jsonpointer@^4.0.0: 668 | version "4.0.1" 669 | resolved "https://registry.yarnpkg.com/jsonpointer/-/jsonpointer-4.0.1.tgz#4fd92cb34e0e9db3c89c8622ecf51f9b978c6cb9" 670 | 671 | kind-of@^3.0.2: 672 | version "3.1.0" 673 | resolved "https://registry.yarnpkg.com/kind-of/-/kind-of-3.1.0.tgz#475d698a5e49ff5e53d14e3e732429dc8bf4cf47" 674 | dependencies: 675 | is-buffer "^1.0.2" 676 | 677 | lazy-cache@^1.0.3: 678 | version "1.0.4" 679 | resolved "https://registry.yarnpkg.com/lazy-cache/-/lazy-cache-1.0.4.tgz#a1d78fc3a50474cb80845d3b3b6e1da49a446e8e" 680 | 681 | levn@^0.3.0, levn@~0.3.0: 682 | version "0.3.0" 683 | resolved "https://registry.yarnpkg.com/levn/-/levn-0.3.0.tgz#3b09924edf9f083c0490fdd4c0bc4421e04764ee" 684 | dependencies: 685 | prelude-ls "~1.1.2" 686 | type-check "~0.3.2" 687 | 688 | lodash._baseassign@^3.0.0: 689 | version "3.2.0" 690 | resolved "https://registry.yarnpkg.com/lodash._baseassign/-/lodash._baseassign-3.2.0.tgz#8c38a099500f215ad09e59f1722fd0c52bfe0a4e" 691 | dependencies: 692 | lodash._basecopy "^3.0.0" 693 | lodash.keys "^3.0.0" 694 | 695 | lodash._basecopy@^3.0.0: 696 | version "3.0.1" 697 | resolved "https://registry.yarnpkg.com/lodash._basecopy/-/lodash._basecopy-3.0.1.tgz#8da0e6a876cf344c0ad8a54882111dd3c5c7ca36" 698 | 699 | lodash._basecreate@^3.0.0: 700 | version "3.0.3" 701 | resolved "https://registry.yarnpkg.com/lodash._basecreate/-/lodash._basecreate-3.0.3.tgz#1bc661614daa7fc311b7d03bf16806a0213cf821" 702 | 703 | lodash._getnative@^3.0.0: 704 | version "3.9.1" 705 | resolved "https://registry.yarnpkg.com/lodash._getnative/-/lodash._getnative-3.9.1.tgz#570bc7dede46d61cdcde687d65d3eecbaa3aaff5" 706 | 707 | lodash._isiterateecall@^3.0.0: 708 | version "3.0.9" 709 | resolved "https://registry.yarnpkg.com/lodash._isiterateecall/-/lodash._isiterateecall-3.0.9.tgz#5203ad7ba425fae842460e696db9cf3e6aac057c" 710 | 711 | lodash.cond@^4.3.0: 712 | version "4.5.2" 713 | resolved "https://registry.yarnpkg.com/lodash.cond/-/lodash.cond-4.5.2.tgz#f471a1da486be60f6ab955d17115523dd1d255d5" 714 | 715 | lodash.create@3.1.1: 716 | version "3.1.1" 717 | resolved "https://registry.yarnpkg.com/lodash.create/-/lodash.create-3.1.1.tgz#d7f2849f0dbda7e04682bb8cd72ab022461debe7" 718 | dependencies: 719 | lodash._baseassign "^3.0.0" 720 | lodash._basecreate "^3.0.0" 721 | lodash._isiterateecall "^3.0.0" 722 | 723 | lodash.isarguments@^3.0.0: 724 | version "3.1.0" 725 | resolved "https://registry.yarnpkg.com/lodash.isarguments/-/lodash.isarguments-3.1.0.tgz#2f573d85c6a24289ff00663b491c1d338ff3458a" 726 | 727 | lodash.isarray@^3.0.0: 728 | version "3.0.4" 729 | resolved "https://registry.yarnpkg.com/lodash.isarray/-/lodash.isarray-3.0.4.tgz#79e4eb88c36a8122af86f844aa9bcd851b5fbb55" 730 | 731 | lodash.keys@^3.0.0: 732 | version "3.1.2" 733 | resolved "https://registry.yarnpkg.com/lodash.keys/-/lodash.keys-3.1.2.tgz#4dbc0472b156be50a0b286855d1bd0b0c656098a" 734 | dependencies: 735 | lodash._getnative "^3.0.0" 736 | lodash.isarguments "^3.0.0" 737 | lodash.isarray "^3.0.0" 738 | 739 | lodash@^4.0.0, lodash@^4.3.0: 740 | version "4.17.4" 741 | resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.4.tgz#78203a4d1c328ae1d86dca6460e369b57f4055ae" 742 | 743 | longest@^1.0.1: 744 | version "1.0.1" 745 | resolved "https://registry.yarnpkg.com/longest/-/longest-1.0.1.tgz#30a0b2da38f73770e8294a0d22e6625ed77d0097" 746 | 747 | minimatch@^3.0.2, minimatch@^3.0.3: 748 | version "3.0.3" 749 | resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-3.0.3.tgz#2a4e4090b96b2db06a9d7df01055a62a77c9b774" 750 | dependencies: 751 | brace-expansion "^1.0.0" 752 | 753 | minimist@0.0.8: 754 | version "0.0.8" 755 | resolved "https://registry.yarnpkg.com/minimist/-/minimist-0.0.8.tgz#857fcabfc3397d2625b8228262e86aa7a011b05d" 756 | 757 | mkdirp@0.5.1, mkdirp@^0.5.0, mkdirp@^0.5.1: 758 | version "0.5.1" 759 | resolved "https://registry.yarnpkg.com/mkdirp/-/mkdirp-0.5.1.tgz#30057438eac6cf7f8c4767f38648d6697d75c903" 760 | dependencies: 761 | minimist "0.0.8" 762 | 763 | mocha@*: 764 | version "3.2.0" 765 | resolved "https://registry.yarnpkg.com/mocha/-/mocha-3.2.0.tgz#7dc4f45e5088075171a68896814e6ae9eb7a85e3" 766 | dependencies: 767 | browser-stdout "1.3.0" 768 | commander "2.9.0" 769 | debug "2.2.0" 770 | diff "1.4.0" 771 | escape-string-regexp "1.0.5" 772 | glob "7.0.5" 773 | growl "1.9.2" 774 | json3 "3.3.2" 775 | lodash.create "3.1.1" 776 | mkdirp "0.5.1" 777 | supports-color "3.1.2" 778 | 779 | ms@0.7.1: 780 | version "0.7.1" 781 | resolved "https://registry.yarnpkg.com/ms/-/ms-0.7.1.tgz#9cd13c03adbff25b65effde7ce864ee952017098" 782 | 783 | mute-stream@0.0.5: 784 | version "0.0.5" 785 | resolved "https://registry.yarnpkg.com/mute-stream/-/mute-stream-0.0.5.tgz#8fbfabb0a98a253d3184331f9e8deb7372fac6c0" 786 | 787 | natural-compare@^1.4.0: 788 | version "1.4.0" 789 | resolved "https://registry.yarnpkg.com/natural-compare/-/natural-compare-1.4.0.tgz#4abebfeed7541f2c27acfb29bdbbd15c8d5ba4f7" 790 | 791 | number-is-nan@^1.0.0: 792 | version "1.0.1" 793 | resolved "https://registry.yarnpkg.com/number-is-nan/-/number-is-nan-1.0.1.tgz#097b602b53422a522c1afb8790318336941a011d" 794 | 795 | object-assign@^4.0.1, object-assign@^4.1.0: 796 | version "4.1.1" 797 | resolved "https://registry.yarnpkg.com/object-assign/-/object-assign-4.1.1.tgz#2109adc7965887cfc05cbbd442cac8bfbb360863" 798 | 799 | once@^1.3.0: 800 | version "1.4.0" 801 | resolved "https://registry.yarnpkg.com/once/-/once-1.4.0.tgz#583b1aa775961d4b113ac17d9c50baef9dd76bd1" 802 | dependencies: 803 | wrappy "1" 804 | 805 | onetime@^1.0.0: 806 | version "1.1.0" 807 | resolved "https://registry.yarnpkg.com/onetime/-/onetime-1.1.0.tgz#a1f7838f8314c516f05ecefcbc4ccfe04b4ed789" 808 | 809 | optionator@^0.8.2: 810 | version "0.8.2" 811 | resolved "https://registry.yarnpkg.com/optionator/-/optionator-0.8.2.tgz#364c5e409d3f4d6301d6c0b4c05bba50180aeb64" 812 | dependencies: 813 | deep-is "~0.1.3" 814 | fast-levenshtein "~2.0.4" 815 | levn "~0.3.0" 816 | prelude-ls "~1.1.2" 817 | type-check "~0.3.2" 818 | wordwrap "~1.0.0" 819 | 820 | os-homedir@^1.0.0: 821 | version "1.0.2" 822 | resolved "https://registry.yarnpkg.com/os-homedir/-/os-homedir-1.0.2.tgz#ffbc4988336e0e833de0c168c7ef152121aa7fb3" 823 | 824 | path-exists@^2.0.0: 825 | version "2.1.0" 826 | resolved "https://registry.yarnpkg.com/path-exists/-/path-exists-2.1.0.tgz#0feb6c64f0fc518d9a754dd5efb62c7022761f4b" 827 | dependencies: 828 | pinkie-promise "^2.0.0" 829 | 830 | path-is-absolute@^1.0.0: 831 | version "1.0.1" 832 | resolved "https://registry.yarnpkg.com/path-is-absolute/-/path-is-absolute-1.0.1.tgz#174b9268735534ffbc7ace6bf53a5a9e1b5c5f5f" 833 | 834 | path-is-inside@^1.0.1: 835 | version "1.0.2" 836 | resolved "https://registry.yarnpkg.com/path-is-inside/-/path-is-inside-1.0.2.tgz#365417dede44430d1c11af61027facf074bdfc53" 837 | 838 | path-parse@^1.0.5: 839 | version "1.0.5" 840 | resolved "https://registry.yarnpkg.com/path-parse/-/path-parse-1.0.5.tgz#3c1adf871ea9cd6c9431b6ea2bd74a0ff055c4c1" 841 | 842 | pify@^2.0.0: 843 | version "2.3.0" 844 | resolved "https://registry.yarnpkg.com/pify/-/pify-2.3.0.tgz#ed141a6ac043a849ea588498e7dca8b15330e90c" 845 | 846 | pinkie-promise@^2.0.0: 847 | version "2.0.1" 848 | resolved "https://registry.yarnpkg.com/pinkie-promise/-/pinkie-promise-2.0.1.tgz#2135d6dfa7a358c069ac9b178776288228450ffa" 849 | dependencies: 850 | pinkie "^2.0.0" 851 | 852 | pinkie@^2.0.0: 853 | version "2.0.4" 854 | resolved "https://registry.yarnpkg.com/pinkie/-/pinkie-2.0.4.tgz#72556b80cfa0d48a974e80e77248e80ed4f7f870" 855 | 856 | pkg-dir@^1.0.0: 857 | version "1.0.0" 858 | resolved "https://registry.yarnpkg.com/pkg-dir/-/pkg-dir-1.0.0.tgz#7a4b508a8d5bb2d629d447056ff4e9c9314cf3d4" 859 | dependencies: 860 | find-up "^1.0.0" 861 | 862 | pkg-up@^1.0.0: 863 | version "1.0.0" 864 | resolved "https://registry.yarnpkg.com/pkg-up/-/pkg-up-1.0.0.tgz#3e08fb461525c4421624a33b9f7e6d0af5b05a26" 865 | dependencies: 866 | find-up "^1.0.0" 867 | 868 | pluralize@^1.2.1: 869 | version "1.2.1" 870 | resolved "https://registry.yarnpkg.com/pluralize/-/pluralize-1.2.1.tgz#d1a21483fd22bb41e58a12fa3421823140897c45" 871 | 872 | prelude-ls@~1.1.2: 873 | version "1.1.2" 874 | resolved "https://registry.yarnpkg.com/prelude-ls/-/prelude-ls-1.1.2.tgz#21932a549f5e52ffd9a827f570e04be62a97da54" 875 | 876 | process-nextick-args@~1.0.6: 877 | version "1.0.7" 878 | resolved "https://registry.yarnpkg.com/process-nextick-args/-/process-nextick-args-1.0.7.tgz#150e20b756590ad3f91093f25a4f2ad8bff30ba3" 879 | 880 | progress@^1.1.8: 881 | version "1.1.8" 882 | resolved "https://registry.yarnpkg.com/progress/-/progress-1.1.8.tgz#e260c78f6161cdd9b0e56cc3e0a85de17c7a57be" 883 | 884 | readable-stream@^2.2.2: 885 | version "2.2.6" 886 | resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-2.2.6.tgz#8b43aed76e71483938d12a8d46c6cf1a00b1f816" 887 | dependencies: 888 | buffer-shims "^1.0.0" 889 | core-util-is "~1.0.0" 890 | inherits "~2.0.1" 891 | isarray "~1.0.0" 892 | process-nextick-args "~1.0.6" 893 | string_decoder "~0.10.x" 894 | util-deprecate "~1.0.1" 895 | 896 | readline2@^1.0.1: 897 | version "1.0.1" 898 | resolved "https://registry.yarnpkg.com/readline2/-/readline2-1.0.1.tgz#41059608ffc154757b715d9989d199ffbf372e35" 899 | dependencies: 900 | code-point-at "^1.0.0" 901 | is-fullwidth-code-point "^1.0.0" 902 | mute-stream "0.0.5" 903 | 904 | rechoir@^0.6.2: 905 | version "0.6.2" 906 | resolved "https://registry.yarnpkg.com/rechoir/-/rechoir-0.6.2.tgz#85204b54dba82d5742e28c96756ef43af50e3384" 907 | dependencies: 908 | resolve "^1.1.6" 909 | 910 | repeat-string@^1.5.2: 911 | version "1.6.1" 912 | resolved "https://registry.yarnpkg.com/repeat-string/-/repeat-string-1.6.1.tgz#8dcae470e1c88abc2d600fff4a776286da75e637" 913 | 914 | require-uncached@^1.0.2: 915 | version "1.0.3" 916 | resolved "https://registry.yarnpkg.com/require-uncached/-/require-uncached-1.0.3.tgz#4e0d56d6c9662fd31e43011c4b95aa49955421d3" 917 | dependencies: 918 | caller-path "^0.1.0" 919 | resolve-from "^1.0.0" 920 | 921 | resolve-from@^1.0.0: 922 | version "1.0.1" 923 | resolved "https://registry.yarnpkg.com/resolve-from/-/resolve-from-1.0.1.tgz#26cbfe935d1aeeeabb29bc3fe5aeb01e93d44226" 924 | 925 | resolve@^1.1.6, resolve@^1.1.7: 926 | version "1.3.2" 927 | resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.3.2.tgz#1f0442c9e0cbb8136e87b9305f932f46c7f28235" 928 | dependencies: 929 | path-parse "^1.0.5" 930 | 931 | restore-cursor@^1.0.1: 932 | version "1.0.1" 933 | resolved "https://registry.yarnpkg.com/restore-cursor/-/restore-cursor-1.0.1.tgz#34661f46886327fed2991479152252df92daa541" 934 | dependencies: 935 | exit-hook "^1.0.0" 936 | onetime "^1.0.0" 937 | 938 | right-align@^0.1.1: 939 | version "0.1.3" 940 | resolved "https://registry.yarnpkg.com/right-align/-/right-align-0.1.3.tgz#61339b722fe6a3515689210d24e14c96148613ef" 941 | dependencies: 942 | align-text "^0.1.1" 943 | 944 | rimraf@^2.2.8: 945 | version "2.6.1" 946 | resolved "https://registry.yarnpkg.com/rimraf/-/rimraf-2.6.1.tgz#c2338ec643df7a1b7fe5c54fa86f57428a55f33d" 947 | dependencies: 948 | glob "^7.0.5" 949 | 950 | rollup-plugin-uglify@^1.0.1: 951 | version "1.0.1" 952 | resolved "https://registry.yarnpkg.com/rollup-plugin-uglify/-/rollup-plugin-uglify-1.0.1.tgz#11d0b0c8bcd2d07e6908f74fd16b0152390b922a" 953 | dependencies: 954 | uglify-js "^2.6.1" 955 | 956 | rollup@^0.41.6: 957 | version "0.41.6" 958 | resolved "https://registry.yarnpkg.com/rollup/-/rollup-0.41.6.tgz#e0d05497877a398c104d816d2733a718a7a94e2a" 959 | dependencies: 960 | source-map-support "^0.4.0" 961 | 962 | run-async@^0.1.0: 963 | version "0.1.0" 964 | resolved "https://registry.yarnpkg.com/run-async/-/run-async-0.1.0.tgz#c8ad4a5e110661e402a7d21b530e009f25f8e389" 965 | dependencies: 966 | once "^1.3.0" 967 | 968 | rx-lite@^3.1.2: 969 | version "3.1.2" 970 | resolved "https://registry.yarnpkg.com/rx-lite/-/rx-lite-3.1.2.tgz#19ce502ca572665f3b647b10939f97fd1615f102" 971 | 972 | semver@5.3.0: 973 | version "5.3.0" 974 | resolved "https://registry.yarnpkg.com/semver/-/semver-5.3.0.tgz#9b2ce5d3de02d17c6012ad326aa6b4d0cf54f94f" 975 | 976 | shelljs@^0.7.5: 977 | version "0.7.7" 978 | resolved "https://registry.yarnpkg.com/shelljs/-/shelljs-0.7.7.tgz#b2f5c77ef97148f4b4f6e22682e10bba8667cff1" 979 | dependencies: 980 | glob "^7.0.0" 981 | interpret "^1.0.0" 982 | rechoir "^0.6.2" 983 | 984 | slice-ansi@0.0.4: 985 | version "0.0.4" 986 | resolved "https://registry.yarnpkg.com/slice-ansi/-/slice-ansi-0.0.4.tgz#edbf8903f66f7ce2f8eafd6ceed65e264c831b35" 987 | 988 | source-map-support@^0.4.0: 989 | version "0.4.14" 990 | resolved "https://registry.yarnpkg.com/source-map-support/-/source-map-support-0.4.14.tgz#9d4463772598b86271b4f523f6c1f4e02a7d6aef" 991 | dependencies: 992 | source-map "^0.5.6" 993 | 994 | source-map@^0.5.6, source-map@~0.5.1: 995 | version "0.5.6" 996 | resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.5.6.tgz#75ce38f52bf0733c5a7f0c118d81334a2bb5f412" 997 | 998 | sprintf-js@~1.0.2: 999 | version "1.0.3" 1000 | resolved "https://registry.yarnpkg.com/sprintf-js/-/sprintf-js-1.0.3.tgz#04e6926f662895354f3dd015203633b857297e2c" 1001 | 1002 | string-width@^1.0.1: 1003 | version "1.0.2" 1004 | resolved "https://registry.yarnpkg.com/string-width/-/string-width-1.0.2.tgz#118bdf5b8cdc51a2a7e70d211e07e2b0b9b107d3" 1005 | dependencies: 1006 | code-point-at "^1.0.0" 1007 | is-fullwidth-code-point "^1.0.0" 1008 | strip-ansi "^3.0.0" 1009 | 1010 | string-width@^2.0.0: 1011 | version "2.0.0" 1012 | resolved "https://registry.yarnpkg.com/string-width/-/string-width-2.0.0.tgz#635c5436cc72a6e0c387ceca278d4e2eec52687e" 1013 | dependencies: 1014 | is-fullwidth-code-point "^2.0.0" 1015 | strip-ansi "^3.0.0" 1016 | 1017 | string_decoder@~0.10.x: 1018 | version "0.10.31" 1019 | resolved "https://registry.yarnpkg.com/string_decoder/-/string_decoder-0.10.31.tgz#62e203bc41766c6c28c9fc84301dab1c5310fa94" 1020 | 1021 | strip-ansi@^3.0.0: 1022 | version "3.0.1" 1023 | resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-3.0.1.tgz#6a385fb8853d952d5ff05d0e8aaf94278dc63dcf" 1024 | dependencies: 1025 | ansi-regex "^2.0.0" 1026 | 1027 | strip-bom@^3.0.0: 1028 | version "3.0.0" 1029 | resolved "https://registry.yarnpkg.com/strip-bom/-/strip-bom-3.0.0.tgz#2334c18e9c759f7bdd56fdef7e9ae3d588e68ed3" 1030 | 1031 | strip-json-comments@~2.0.1: 1032 | version "2.0.1" 1033 | resolved "https://registry.yarnpkg.com/strip-json-comments/-/strip-json-comments-2.0.1.tgz#3c531942e908c2697c0ec344858c286c7ca0a60a" 1034 | 1035 | supports-color@3.1.2: 1036 | version "3.1.2" 1037 | resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-3.1.2.tgz#72a262894d9d408b956ca05ff37b2ed8a6e2a2d5" 1038 | dependencies: 1039 | has-flag "^1.0.0" 1040 | 1041 | supports-color@^2.0.0: 1042 | version "2.0.0" 1043 | resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-2.0.0.tgz#535d045ce6b6363fa40117084629995e9df324c7" 1044 | 1045 | table@^3.7.8: 1046 | version "3.8.3" 1047 | resolved "https://registry.yarnpkg.com/table/-/table-3.8.3.tgz#2bbc542f0fda9861a755d3947fefd8b3f513855f" 1048 | dependencies: 1049 | ajv "^4.7.0" 1050 | ajv-keywords "^1.0.0" 1051 | chalk "^1.1.1" 1052 | lodash "^4.0.0" 1053 | slice-ansi "0.0.4" 1054 | string-width "^2.0.0" 1055 | 1056 | text-table@~0.2.0: 1057 | version "0.2.0" 1058 | resolved "https://registry.yarnpkg.com/text-table/-/text-table-0.2.0.tgz#7f5ee823ae805207c00af2df4a84ec3fcfa570b4" 1059 | 1060 | through@^2.3.6: 1061 | version "2.3.8" 1062 | resolved "https://registry.yarnpkg.com/through/-/through-2.3.8.tgz#0dd4c9ffaabc357960b1b724115d7e0e86a2e1f5" 1063 | 1064 | tryit@^1.0.1: 1065 | version "1.0.3" 1066 | resolved "https://registry.yarnpkg.com/tryit/-/tryit-1.0.3.tgz#393be730a9446fd1ead6da59a014308f36c289cb" 1067 | 1068 | type-check@~0.3.2: 1069 | version "0.3.2" 1070 | resolved "https://registry.yarnpkg.com/type-check/-/type-check-0.3.2.tgz#5884cab512cf1d355e3fb784f30804b2b520db72" 1071 | dependencies: 1072 | prelude-ls "~1.1.2" 1073 | 1074 | typedarray@^0.0.6: 1075 | version "0.0.6" 1076 | resolved "https://registry.yarnpkg.com/typedarray/-/typedarray-0.0.6.tgz#867ac74e3864187b1d3d47d996a78ec5c8830777" 1077 | 1078 | uglify-js@^2.6.1: 1079 | version "2.8.21" 1080 | resolved "https://registry.yarnpkg.com/uglify-js/-/uglify-js-2.8.21.tgz#1733f669ae6f82fc90c7b25ec0f5c783ee375314" 1081 | dependencies: 1082 | source-map "~0.5.1" 1083 | yargs "~3.10.0" 1084 | optionalDependencies: 1085 | uglify-to-browserify "~1.0.0" 1086 | 1087 | uglify-to-browserify@~1.0.0: 1088 | version "1.0.2" 1089 | resolved "https://registry.yarnpkg.com/uglify-to-browserify/-/uglify-to-browserify-1.0.2.tgz#6e0924d6bda6b5afe349e39a6d632850a0f882b7" 1090 | 1091 | user-home@^2.0.0: 1092 | version "2.0.0" 1093 | resolved "https://registry.yarnpkg.com/user-home/-/user-home-2.0.0.tgz#9c70bfd8169bc1dcbf48604e0f04b8b49cde9e9f" 1094 | dependencies: 1095 | os-homedir "^1.0.0" 1096 | 1097 | util-deprecate@~1.0.1: 1098 | version "1.0.2" 1099 | resolved "https://registry.yarnpkg.com/util-deprecate/-/util-deprecate-1.0.2.tgz#450d4dc9fa70de732762fbd2d4a28981419a0ccf" 1100 | 1101 | window-size@0.1.0: 1102 | version "0.1.0" 1103 | resolved "https://registry.yarnpkg.com/window-size/-/window-size-0.1.0.tgz#5438cd2ea93b202efa3a19fe8887aee7c94f9c9d" 1104 | 1105 | wordwrap@0.0.2: 1106 | version "0.0.2" 1107 | resolved "https://registry.yarnpkg.com/wordwrap/-/wordwrap-0.0.2.tgz#b79669bb42ecb409f83d583cad52ca17eaa1643f" 1108 | 1109 | wordwrap@~1.0.0: 1110 | version "1.0.0" 1111 | resolved "https://registry.yarnpkg.com/wordwrap/-/wordwrap-1.0.0.tgz#27584810891456a4171c8d0226441ade90cbcaeb" 1112 | 1113 | wrappy@1: 1114 | version "1.0.2" 1115 | resolved "https://registry.yarnpkg.com/wrappy/-/wrappy-1.0.2.tgz#b5243d8f3ec1aa35f1364605bc0d1036e30ab69f" 1116 | 1117 | write@^0.2.1: 1118 | version "0.2.1" 1119 | resolved "https://registry.yarnpkg.com/write/-/write-0.2.1.tgz#5fc03828e264cea3fe91455476f7a3c566cb0757" 1120 | dependencies: 1121 | mkdirp "^0.5.1" 1122 | 1123 | xtend@^4.0.0: 1124 | version "4.0.1" 1125 | resolved "https://registry.yarnpkg.com/xtend/-/xtend-4.0.1.tgz#a5c6d532be656e23db820efb943a1f04998d63af" 1126 | 1127 | yargs@~3.10.0: 1128 | version "3.10.0" 1129 | resolved "https://registry.yarnpkg.com/yargs/-/yargs-3.10.0.tgz#f7ee7bd857dd7c1d2d38c0e74efbd681d1431fd1" 1130 | dependencies: 1131 | camelcase "^1.0.2" 1132 | cliui "^2.1.0" 1133 | decamelize "^1.0.0" 1134 | window-size "0.1.0" 1135 | --------------------------------------------------------------------------------