├── .gitignore ├── .npmignore ├── LICENSE ├── README.md ├── package.json ├── src ├── AnyDice.ts ├── Util.ts └── error │ └── index.ts ├── tsconfig.json └── yarn.lock /.gitignore: -------------------------------------------------------------------------------- 1 | *.log 2 | node_modules/ 3 | .vscode/ 4 | settings.json 5 | **/*.js 6 | **/*.js.map 7 | **/*.sqlite 8 | **/*.d.ts 9 | -------------------------------------------------------------------------------- /.npmignore: -------------------------------------------------------------------------------- 1 | src/ 2 | tsconfig.json 3 | *.tgz 4 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2017 Mark Old 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 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | anydice.js 2 | ========== 3 | 4 | [![npm](https://img.shields.io/npm/v/anydice.svg)](https://www.npmjs.com/package/anydice) 5 | 6 | Note: AnyDice is not particularly _fast_; results can take a second or two to come back 7 | 8 | ## API 9 | 10 | ### Simple 11 | 12 | ```javascript 13 | const { roll } = require("anydice"); 14 | // import { roll } from "anydice"; 15 | 16 | // later... 17 | 18 | console.log(await roll("output [highest 1 of 2d20]+10")); 19 | ``` 20 | 21 | ### Advanced 22 | 23 | ```javascript 24 | const { AnyDice } = require("anydice"); 25 | 26 | // later... 27 | 28 | const input = `output [highest 1 of 2d20]+10 29 | output 3d6 named "result 2"`; 30 | 31 | const result = await AnyDice.run(input); 32 | const rolls = result.roll(result.first(), 10); // [highest 1 of 2d20]+10 33 | const possibleValues = result.possibleValues("result 2"); // 3d6 34 | console.log(rolls); 35 | console.log(possibleValues); 36 | ``` 37 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "anydice", 3 | "version": "1.1.0", 4 | "description": "anydice roller", 5 | "main": "lib/AnyDice.js", 6 | "types": "lib/AnyDice.d.ts", 7 | "scripts": { 8 | "build": "tsc", 9 | "watch": "tsc --watch", 10 | "prepare": "tsc" 11 | }, 12 | "repository": { 13 | "type": "git", 14 | "url": "git+https://github.com/dlom/anydice.git" 15 | }, 16 | "keywords": [ 17 | "dice", 18 | "die", 19 | "roll", 20 | "random" 21 | ], 22 | "author": "Mark Old", 23 | "license": "MIT", 24 | "bugs": { 25 | "url": "https://github.com/dlom/anydice/issues" 26 | }, 27 | "homepage": "https://github.com/dlom/anydice#readme", 28 | "devDependencies": { 29 | "@types/chalk": "^0.4.31", 30 | "@types/node": "^8.0.26", 31 | "@types/request": "^2.0.3", 32 | "typescript": "^2.4.2" 33 | }, 34 | "dependencies": { 35 | "chalk": "^2.1.0", 36 | "request": "^2.81.0" 37 | }, 38 | "engines": { 39 | "node": ">= 6.0.0" 40 | } 41 | } 42 | -------------------------------------------------------------------------------- /src/AnyDice.ts: -------------------------------------------------------------------------------- 1 | import * as request from "request"; 2 | 3 | import { AnyDiceError, prettify } from "./error"; 4 | import { random } from "./Util"; 5 | 6 | export type AnyDiceDistribution = [number, number][]; 7 | 8 | export interface AnyDiceDistributions { 9 | data: AnyDiceDistribution[], 10 | labels: string[], 11 | minX: number, 12 | maxX: number, 13 | minY: number, 14 | maxY: number 15 | } 16 | 17 | export interface AnyDiceResponse { 18 | distributions?: AnyDiceDistributions, 19 | error?: AnyDiceError 20 | } 21 | 22 | const anyDiceRequest = (program: string, endpoint: string): Promise => { 23 | const api = "https://anydice.com"; 24 | const promise = new Promise((resolve, reject) => { 25 | request.post(`${api}${endpoint}`, { 26 | form: { program }, 27 | json: true 28 | }, (err, response, body) => { 29 | if (err) return reject(err); 30 | resolve(body); 31 | }); 32 | }); 33 | return promise; 34 | } 35 | 36 | class AnyDice { 37 | private results: Map; 38 | 39 | private constructor(private expression: string, private link: string, distributions: AnyDiceDistributions) { 40 | this.results = new Map(); 41 | distributions.labels.forEach((label, index) => { 42 | this.results.set(label, distributions.data[index]); 43 | }); 44 | } 45 | 46 | public first(): string { 47 | return Array.from(this.results.keys())[0]; 48 | } 49 | 50 | public default(): string { 51 | return this.first(); 52 | } 53 | 54 | public get(name: string): AnyDiceDistribution { 55 | const distribution = this.results.get(name); 56 | if (distribution == undefined) { 57 | return []; 58 | } 59 | return distribution; 60 | } 61 | 62 | public roll(name: string): number[]; 63 | public roll(name: string, times: number): number[]; 64 | public roll(name: string, times?: number): number[] { 65 | if (times == null) { 66 | times = 1; 67 | } 68 | const distribution = this.get(name); 69 | const rolls: number[] = []; 70 | for (let r = 0; r < times; r++) { 71 | const roll = random() * 100; 72 | let odds = 0; 73 | for (let i = 0; i < distribution.length; i++) { 74 | odds += distribution[i][1]; 75 | if (odds >= roll) { 76 | rolls.push(distribution[i][0]); 77 | break; 78 | } 79 | } 80 | } 81 | return rolls; 82 | } 83 | 84 | public possibleValues(name: string): number[] { 85 | return this.get(name).map((value) => { 86 | return value[0]; 87 | }); 88 | } 89 | 90 | public max(name: string): number { 91 | const max = this.possibleValues(name).slice(-1)[0]; 92 | return (max == null) ? 0 : max; 93 | } 94 | 95 | public min(name: string): number { 96 | const min = this.possibleValues(name).slice(0, 1)[0]; 97 | return (min == null) ? 0 : min; 98 | } 99 | 100 | public analyze(): string { 101 | return this.link; 102 | } 103 | 104 | public static async analyze(expression: string): Promise { 105 | const response = await anyDiceRequest(expression, "/createLink.php"); 106 | return response as string; 107 | } 108 | 109 | public static async raw(expression: string): Promise { 110 | const response = await anyDiceRequest(expression, "/calculator_limited.php"); 111 | return response as AnyDiceResponse; 112 | } 113 | 114 | public static async run(expression: string): Promise; 115 | public static async run(expression: string, pretty: boolean): Promise; 116 | public static async run(expression: string, pretty?: boolean): Promise { 117 | if (pretty == null) pretty = false; 118 | const response = await AnyDice.raw(expression); 119 | if (response.error != null) { 120 | response.error.message = response.error.message.replace("
", " "); 121 | if (pretty) { 122 | throw new Error(prettify(response.error, expression)); 123 | } else { 124 | throw new Error(response.error.message); 125 | } 126 | } else if (response.distributions != null) { 127 | const link = await AnyDice.analyze(expression); 128 | return new AnyDice(expression, link, response.distributions); 129 | } else { 130 | throw new Error("Bad response from AnyDice"); 131 | } 132 | } 133 | 134 | public static async roll(expression: string): Promise { 135 | const anydice = await AnyDice.run(expression, true); 136 | return anydice.roll(anydice.default(), 1)[0]; 137 | } 138 | } 139 | 140 | const run: { 141 | (expression: string): Promise; 142 | (expression: string, pretty: boolean): Promise; 143 | } = (expression: string, pretty?: boolean): Promise => { 144 | return AnyDice.run(expression, pretty!); 145 | }; 146 | 147 | const roll = (expression: string): Promise => { 148 | return AnyDice.roll(expression); 149 | }; 150 | 151 | export { AnyDice, run, roll }; 152 | -------------------------------------------------------------------------------- /src/Util.ts: -------------------------------------------------------------------------------- 1 | import * as crypto from "crypto"; 2 | 3 | export const randomInt = (min: number, max: number): number => { 4 | const range = max - min; 5 | 6 | const bitLength = Math.ceil(Math.log2(range)); 7 | if (bitLength > 31) { 8 | throw new Error("Cannot randomly generate numbers using more than 31 bits."); 9 | } 10 | const byteLength = Math.ceil(bitLength / 8); 11 | const mask = Math.pow(2, bitLength) - 1; 12 | 13 | const byteArray = crypto.randomBytes(byteLength); 14 | 15 | const sum = byteArray.reduce((sum, value, index) => { 16 | return sum + (value * Math.pow(256, index)); 17 | }, 0); 18 | 19 | const masked = sum & mask; 20 | if (masked >= range) { 21 | return randomInt(min, max); 22 | } 23 | 24 | return min + masked; 25 | } 26 | 27 | export const random = (): number => { 28 | const precision = 0x7FFFFFFF; 29 | return randomInt(0, precision) / precision; 30 | } 31 | -------------------------------------------------------------------------------- /src/error/index.ts: -------------------------------------------------------------------------------- 1 | import * as chalk from "chalk"; 2 | 3 | export interface AnyDiceError { 4 | message: string, 5 | type: string, 6 | index?: number, 7 | token?: string 8 | } 9 | 10 | const indexToRowAndCol = (lines: string[], index: number): [number, number] => { 11 | let row = 0; 12 | let col = index; 13 | for (const line of lines) { 14 | if (col > line.length) { 15 | col -= (line.length + 1); // newline too 16 | row += 1; 17 | } else { 18 | break; 19 | } 20 | } 21 | return [row, col]; 22 | } 23 | 24 | const createIndicator = (offset: number, length: number): string => { 25 | const space = ' '; 26 | const carat = '^'; 27 | const tilde = '~'; 28 | 29 | return `${space.repeat(offset)}${carat}${tilde.repeat(length - 1)}`; 30 | } 31 | 32 | export const prettify = (error: AnyDiceError, code: string): string => { 33 | if (error.index != null && error.token != null) { 34 | const token = (error.token === " end of input ") ? " " : error.token; 35 | const start = error.index - token.length; 36 | const lines = code.split("\n"); 37 | let [row, col] = indexToRowAndCol(lines, start); 38 | const line = lines[row]; 39 | 40 | const top = chalk.bold(`${row}:${col}: ${chalk.red(`${error.type}:`)} ${error.message})`); 41 | const middle = `${line}`; 42 | const bottom = chalk.bold.green(`${createIndicator(col, token.length)}`); 43 | 44 | return `${top}\n${middle}\n${bottom}`; 45 | } else { 46 | return chalk.bold(`${chalk.red(`${error.type}:`)} ${error.message})`); 47 | } 48 | } 49 | -------------------------------------------------------------------------------- /tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "module": "commonjs", 4 | "target": "es6", 5 | "sourceMap": true, 6 | "outDir": "lib", 7 | "strict": true, 8 | "declaration": true 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /yarn.lock: -------------------------------------------------------------------------------- 1 | # THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY. 2 | # yarn lockfile v1 3 | 4 | 5 | "@types/chalk@^0.4.31": 6 | version "0.4.31" 7 | resolved "https://registry.yarnpkg.com/@types/chalk/-/chalk-0.4.31.tgz#a31d74241a6b1edbb973cf36d97a2896834a51f9" 8 | 9 | "@types/form-data@*": 10 | version "2.2.0" 11 | resolved "https://registry.yarnpkg.com/@types/form-data/-/form-data-2.2.0.tgz#a98aac91dc99857b6af24caef7ca6df302f31565" 12 | dependencies: 13 | "@types/node" "*" 14 | 15 | "@types/node@*", "@types/node@^8.0.26": 16 | version "8.0.26" 17 | resolved "https://registry.yarnpkg.com/@types/node/-/node-8.0.26.tgz#4d58be925306fd22b1141085535a0268b8beb189" 18 | 19 | "@types/request@^2.0.3": 20 | version "2.0.3" 21 | resolved "https://registry.yarnpkg.com/@types/request/-/request-2.0.3.tgz#bdf0fba9488c822f77e97de3dd8fe357b2fb8c06" 22 | dependencies: 23 | "@types/form-data" "*" 24 | "@types/node" "*" 25 | 26 | ajv@^4.9.1: 27 | version "4.11.8" 28 | resolved "https://registry.yarnpkg.com/ajv/-/ajv-4.11.8.tgz#82ffb02b29e662ae53bdc20af15947706739c536" 29 | dependencies: 30 | co "^4.6.0" 31 | json-stable-stringify "^1.0.1" 32 | 33 | ansi-styles@^3.1.0: 34 | version "3.2.0" 35 | resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-3.2.0.tgz#c159b8d5be0f9e5a6f346dab94f16ce022161b88" 36 | dependencies: 37 | color-convert "^1.9.0" 38 | 39 | asn1@~0.2.3: 40 | version "0.2.3" 41 | resolved "https://registry.yarnpkg.com/asn1/-/asn1-0.2.3.tgz#dac8787713c9966849fc8180777ebe9c1ddf3b86" 42 | 43 | assert-plus@1.0.0, assert-plus@^1.0.0: 44 | version "1.0.0" 45 | resolved "https://registry.yarnpkg.com/assert-plus/-/assert-plus-1.0.0.tgz#f12e0f3c5d77b0b1cdd9146942e4e96c1e4dd525" 46 | 47 | assert-plus@^0.2.0: 48 | version "0.2.0" 49 | resolved "https://registry.yarnpkg.com/assert-plus/-/assert-plus-0.2.0.tgz#d74e1b87e7affc0db8aadb7021f3fe48101ab234" 50 | 51 | asynckit@^0.4.0: 52 | version "0.4.0" 53 | resolved "https://registry.yarnpkg.com/asynckit/-/asynckit-0.4.0.tgz#c79ed97f7f34cb8f2ba1bc9790bcc366474b4b79" 54 | 55 | aws-sign2@~0.6.0: 56 | version "0.6.0" 57 | resolved "https://registry.yarnpkg.com/aws-sign2/-/aws-sign2-0.6.0.tgz#14342dd38dbcc94d0e5b87d763cd63612c0e794f" 58 | 59 | aws4@^1.2.1: 60 | version "1.6.0" 61 | resolved "https://registry.yarnpkg.com/aws4/-/aws4-1.6.0.tgz#83ef5ca860b2b32e4a0deedee8c771b9db57471e" 62 | 63 | bcrypt-pbkdf@^1.0.0: 64 | version "1.0.1" 65 | resolved "https://registry.yarnpkg.com/bcrypt-pbkdf/-/bcrypt-pbkdf-1.0.1.tgz#63bc5dcb61331b92bc05fd528953c33462a06f8d" 66 | dependencies: 67 | tweetnacl "^0.14.3" 68 | 69 | boom@2.x.x: 70 | version "2.10.1" 71 | resolved "https://registry.yarnpkg.com/boom/-/boom-2.10.1.tgz#39c8918ceff5799f83f9492a848f625add0c766f" 72 | dependencies: 73 | hoek "2.x.x" 74 | 75 | caseless@~0.12.0: 76 | version "0.12.0" 77 | resolved "https://registry.yarnpkg.com/caseless/-/caseless-0.12.0.tgz#1b681c21ff84033c826543090689420d187151dc" 78 | 79 | chalk@^2.1.0: 80 | version "2.1.0" 81 | resolved "https://registry.yarnpkg.com/chalk/-/chalk-2.1.0.tgz#ac5becf14fa21b99c6c92ca7a7d7cfd5b17e743e" 82 | dependencies: 83 | ansi-styles "^3.1.0" 84 | escape-string-regexp "^1.0.5" 85 | supports-color "^4.0.0" 86 | 87 | co@^4.6.0: 88 | version "4.6.0" 89 | resolved "https://registry.yarnpkg.com/co/-/co-4.6.0.tgz#6ea6bdf3d853ae54ccb8e47bfa0bf3f9031fb184" 90 | 91 | color-convert@^1.9.0: 92 | version "1.9.0" 93 | resolved "https://registry.yarnpkg.com/color-convert/-/color-convert-1.9.0.tgz#1accf97dd739b983bf994d56fec8f95853641b7a" 94 | dependencies: 95 | color-name "^1.1.1" 96 | 97 | color-name@^1.1.1: 98 | version "1.1.3" 99 | resolved "https://registry.yarnpkg.com/color-name/-/color-name-1.1.3.tgz#a7d0558bd89c42f795dd42328f740831ca53bc25" 100 | 101 | combined-stream@^1.0.5, combined-stream@~1.0.5: 102 | version "1.0.5" 103 | resolved "https://registry.yarnpkg.com/combined-stream/-/combined-stream-1.0.5.tgz#938370a57b4a51dea2c77c15d5c5fdf895164009" 104 | dependencies: 105 | delayed-stream "~1.0.0" 106 | 107 | core-util-is@1.0.2: 108 | version "1.0.2" 109 | resolved "https://registry.yarnpkg.com/core-util-is/-/core-util-is-1.0.2.tgz#b5fd54220aa2bc5ab57aab7140c940754503c1a7" 110 | 111 | cryptiles@2.x.x: 112 | version "2.0.5" 113 | resolved "https://registry.yarnpkg.com/cryptiles/-/cryptiles-2.0.5.tgz#3bdfecdc608147c1c67202fa291e7dca59eaa3b8" 114 | dependencies: 115 | boom "2.x.x" 116 | 117 | dashdash@^1.12.0: 118 | version "1.14.1" 119 | resolved "https://registry.yarnpkg.com/dashdash/-/dashdash-1.14.1.tgz#853cfa0f7cbe2fed5de20326b8dd581035f6e2f0" 120 | dependencies: 121 | assert-plus "^1.0.0" 122 | 123 | delayed-stream@~1.0.0: 124 | version "1.0.0" 125 | resolved "https://registry.yarnpkg.com/delayed-stream/-/delayed-stream-1.0.0.tgz#df3ae199acadfb7d440aaae0b29e2272b24ec619" 126 | 127 | ecc-jsbn@~0.1.1: 128 | version "0.1.1" 129 | resolved "https://registry.yarnpkg.com/ecc-jsbn/-/ecc-jsbn-0.1.1.tgz#0fc73a9ed5f0d53c38193398523ef7e543777505" 130 | dependencies: 131 | jsbn "~0.1.0" 132 | 133 | escape-string-regexp@^1.0.5: 134 | version "1.0.5" 135 | resolved "https://registry.yarnpkg.com/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz#1b61c0562190a8dff6ae3bb2cf0200ca130b86d4" 136 | 137 | extend@~3.0.0: 138 | version "3.0.1" 139 | resolved "https://registry.yarnpkg.com/extend/-/extend-3.0.1.tgz#a755ea7bc1adfcc5a31ce7e762dbaadc5e636444" 140 | 141 | extsprintf@1.3.0, extsprintf@^1.2.0: 142 | version "1.3.0" 143 | resolved "https://registry.yarnpkg.com/extsprintf/-/extsprintf-1.3.0.tgz#96918440e3041a7a414f8c52e3c574eb3c3e1e05" 144 | 145 | forever-agent@~0.6.1: 146 | version "0.6.1" 147 | resolved "https://registry.yarnpkg.com/forever-agent/-/forever-agent-0.6.1.tgz#fbc71f0c41adeb37f96c577ad1ed42d8fdacca91" 148 | 149 | form-data@~2.1.1: 150 | version "2.1.4" 151 | resolved "https://registry.yarnpkg.com/form-data/-/form-data-2.1.4.tgz#33c183acf193276ecaa98143a69e94bfee1750d1" 152 | dependencies: 153 | asynckit "^0.4.0" 154 | combined-stream "^1.0.5" 155 | mime-types "^2.1.12" 156 | 157 | getpass@^0.1.1: 158 | version "0.1.7" 159 | resolved "https://registry.yarnpkg.com/getpass/-/getpass-0.1.7.tgz#5eff8e3e684d569ae4cb2b1282604e8ba62149fa" 160 | dependencies: 161 | assert-plus "^1.0.0" 162 | 163 | har-schema@^1.0.5: 164 | version "1.0.5" 165 | resolved "https://registry.yarnpkg.com/har-schema/-/har-schema-1.0.5.tgz#d263135f43307c02c602afc8fe95970c0151369e" 166 | 167 | har-validator@~4.2.1: 168 | version "4.2.1" 169 | resolved "https://registry.yarnpkg.com/har-validator/-/har-validator-4.2.1.tgz#33481d0f1bbff600dd203d75812a6a5fba002e2a" 170 | dependencies: 171 | ajv "^4.9.1" 172 | har-schema "^1.0.5" 173 | 174 | has-flag@^2.0.0: 175 | version "2.0.0" 176 | resolved "https://registry.yarnpkg.com/has-flag/-/has-flag-2.0.0.tgz#e8207af1cc7b30d446cc70b734b5e8be18f88d51" 177 | 178 | hawk@~3.1.3: 179 | version "3.1.3" 180 | resolved "https://registry.yarnpkg.com/hawk/-/hawk-3.1.3.tgz#078444bd7c1640b0fe540d2c9b73d59678e8e1c4" 181 | dependencies: 182 | boom "2.x.x" 183 | cryptiles "2.x.x" 184 | hoek "2.x.x" 185 | sntp "1.x.x" 186 | 187 | hoek@2.x.x: 188 | version "2.16.3" 189 | resolved "https://registry.yarnpkg.com/hoek/-/hoek-2.16.3.tgz#20bb7403d3cea398e91dc4710a8ff1b8274a25ed" 190 | 191 | http-signature@~1.1.0: 192 | version "1.1.1" 193 | resolved "https://registry.yarnpkg.com/http-signature/-/http-signature-1.1.1.tgz#df72e267066cd0ac67fb76adf8e134a8fbcf91bf" 194 | dependencies: 195 | assert-plus "^0.2.0" 196 | jsprim "^1.2.2" 197 | sshpk "^1.7.0" 198 | 199 | is-typedarray@~1.0.0: 200 | version "1.0.0" 201 | resolved "https://registry.yarnpkg.com/is-typedarray/-/is-typedarray-1.0.0.tgz#e479c80858df0c1b11ddda6940f96011fcda4a9a" 202 | 203 | isstream@~0.1.2: 204 | version "0.1.2" 205 | resolved "https://registry.yarnpkg.com/isstream/-/isstream-0.1.2.tgz#47e63f7af55afa6f92e1500e690eb8b8529c099a" 206 | 207 | jsbn@~0.1.0: 208 | version "0.1.1" 209 | resolved "https://registry.yarnpkg.com/jsbn/-/jsbn-0.1.1.tgz#a5e654c2e5a2deb5f201d96cefbca80c0ef2f513" 210 | 211 | json-schema@0.2.3: 212 | version "0.2.3" 213 | resolved "https://registry.yarnpkg.com/json-schema/-/json-schema-0.2.3.tgz#b480c892e59a2f05954ce727bd3f2a4e882f9e13" 214 | 215 | json-stable-stringify@^1.0.1: 216 | version "1.0.1" 217 | resolved "https://registry.yarnpkg.com/json-stable-stringify/-/json-stable-stringify-1.0.1.tgz#9a759d39c5f2ff503fd5300646ed445f88c4f9af" 218 | dependencies: 219 | jsonify "~0.0.0" 220 | 221 | json-stringify-safe@~5.0.1: 222 | version "5.0.1" 223 | resolved "https://registry.yarnpkg.com/json-stringify-safe/-/json-stringify-safe-5.0.1.tgz#1296a2d58fd45f19a0f6ce01d65701e2c735b6eb" 224 | 225 | jsonify@~0.0.0: 226 | version "0.0.0" 227 | resolved "https://registry.yarnpkg.com/jsonify/-/jsonify-0.0.0.tgz#2c74b6ee41d93ca51b7b5aaee8f503631d252a73" 228 | 229 | jsprim@^1.2.2: 230 | version "1.4.1" 231 | resolved "https://registry.yarnpkg.com/jsprim/-/jsprim-1.4.1.tgz#313e66bc1e5cc06e438bc1b7499c2e5c56acb6a2" 232 | dependencies: 233 | assert-plus "1.0.0" 234 | extsprintf "1.3.0" 235 | json-schema "0.2.3" 236 | verror "1.10.0" 237 | 238 | mime-db@~1.29.0: 239 | version "1.29.0" 240 | resolved "https://registry.yarnpkg.com/mime-db/-/mime-db-1.29.0.tgz#48d26d235589651704ac5916ca06001914266878" 241 | 242 | mime-types@^2.1.12, mime-types@~2.1.7: 243 | version "2.1.16" 244 | resolved "https://registry.yarnpkg.com/mime-types/-/mime-types-2.1.16.tgz#2b858a52e5ecd516db897ac2be87487830698e23" 245 | dependencies: 246 | mime-db "~1.29.0" 247 | 248 | oauth-sign@~0.8.1: 249 | version "0.8.2" 250 | resolved "https://registry.yarnpkg.com/oauth-sign/-/oauth-sign-0.8.2.tgz#46a6ab7f0aead8deae9ec0565780b7d4efeb9d43" 251 | 252 | performance-now@^0.2.0: 253 | version "0.2.0" 254 | resolved "https://registry.yarnpkg.com/performance-now/-/performance-now-0.2.0.tgz#33ef30c5c77d4ea21c5a53869d91b56d8f2555e5" 255 | 256 | punycode@^1.4.1: 257 | version "1.4.1" 258 | resolved "https://registry.yarnpkg.com/punycode/-/punycode-1.4.1.tgz#c0d5a63b2718800ad8e1eb0fa5269c84dd41845e" 259 | 260 | qs@~6.4.0: 261 | version "6.4.0" 262 | resolved "https://registry.yarnpkg.com/qs/-/qs-6.4.0.tgz#13e26d28ad6b0ffaa91312cd3bf708ed351e7233" 263 | 264 | request@^2.81.0: 265 | version "2.81.0" 266 | resolved "https://registry.yarnpkg.com/request/-/request-2.81.0.tgz#c6928946a0e06c5f8d6f8a9333469ffda46298a0" 267 | dependencies: 268 | aws-sign2 "~0.6.0" 269 | aws4 "^1.2.1" 270 | caseless "~0.12.0" 271 | combined-stream "~1.0.5" 272 | extend "~3.0.0" 273 | forever-agent "~0.6.1" 274 | form-data "~2.1.1" 275 | har-validator "~4.2.1" 276 | hawk "~3.1.3" 277 | http-signature "~1.1.0" 278 | is-typedarray "~1.0.0" 279 | isstream "~0.1.2" 280 | json-stringify-safe "~5.0.1" 281 | mime-types "~2.1.7" 282 | oauth-sign "~0.8.1" 283 | performance-now "^0.2.0" 284 | qs "~6.4.0" 285 | safe-buffer "^5.0.1" 286 | stringstream "~0.0.4" 287 | tough-cookie "~2.3.0" 288 | tunnel-agent "^0.6.0" 289 | uuid "^3.0.0" 290 | 291 | safe-buffer@^5.0.1: 292 | version "5.1.1" 293 | resolved "https://registry.yarnpkg.com/safe-buffer/-/safe-buffer-5.1.1.tgz#893312af69b2123def71f57889001671eeb2c853" 294 | 295 | sntp@1.x.x: 296 | version "1.0.9" 297 | resolved "https://registry.yarnpkg.com/sntp/-/sntp-1.0.9.tgz#6541184cc90aeea6c6e7b35e2659082443c66198" 298 | dependencies: 299 | hoek "2.x.x" 300 | 301 | sshpk@^1.7.0: 302 | version "1.13.1" 303 | resolved "https://registry.yarnpkg.com/sshpk/-/sshpk-1.13.1.tgz#512df6da6287144316dc4c18fe1cf1d940739be3" 304 | dependencies: 305 | asn1 "~0.2.3" 306 | assert-plus "^1.0.0" 307 | dashdash "^1.12.0" 308 | getpass "^0.1.1" 309 | optionalDependencies: 310 | bcrypt-pbkdf "^1.0.0" 311 | ecc-jsbn "~0.1.1" 312 | jsbn "~0.1.0" 313 | tweetnacl "~0.14.0" 314 | 315 | stringstream@~0.0.4: 316 | version "0.0.5" 317 | resolved "https://registry.yarnpkg.com/stringstream/-/stringstream-0.0.5.tgz#4e484cd4de5a0bbbee18e46307710a8a81621878" 318 | 319 | supports-color@^4.0.0: 320 | version "4.2.1" 321 | resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-4.2.1.tgz#65a4bb2631e90e02420dba5554c375a4754bb836" 322 | dependencies: 323 | has-flag "^2.0.0" 324 | 325 | tough-cookie@~2.3.0: 326 | version "2.3.2" 327 | resolved "https://registry.yarnpkg.com/tough-cookie/-/tough-cookie-2.3.2.tgz#f081f76e4c85720e6c37a5faced737150d84072a" 328 | dependencies: 329 | punycode "^1.4.1" 330 | 331 | tunnel-agent@^0.6.0: 332 | version "0.6.0" 333 | resolved "https://registry.yarnpkg.com/tunnel-agent/-/tunnel-agent-0.6.0.tgz#27a5dea06b36b04a0a9966774b290868f0fc40fd" 334 | dependencies: 335 | safe-buffer "^5.0.1" 336 | 337 | tweetnacl@^0.14.3, tweetnacl@~0.14.0: 338 | version "0.14.5" 339 | resolved "https://registry.yarnpkg.com/tweetnacl/-/tweetnacl-0.14.5.tgz#5ae68177f192d4456269d108afa93ff8743f4f64" 340 | 341 | typescript@^2.4.2: 342 | version "2.5.1" 343 | resolved "https://registry.yarnpkg.com/typescript/-/typescript-2.5.1.tgz#ce7cc93ada3de19475cc9d17e3adea7aee1832aa" 344 | 345 | uuid@^3.0.0: 346 | version "3.1.0" 347 | resolved "https://registry.yarnpkg.com/uuid/-/uuid-3.1.0.tgz#3dd3d3e790abc24d7b0d3a034ffababe28ebbc04" 348 | 349 | verror@1.10.0: 350 | version "1.10.0" 351 | resolved "https://registry.yarnpkg.com/verror/-/verror-1.10.0.tgz#3a105ca17053af55d6e270c1f8288682e18da400" 352 | dependencies: 353 | assert-plus "^1.0.0" 354 | core-util-is "1.0.2" 355 | extsprintf "^1.2.0" 356 | --------------------------------------------------------------------------------