├── .npmignore ├── .gitignore ├── .editorconfig ├── publish_docs.sh ├── tsconfig.json ├── package.json ├── README.md ├── LICENSE ├── src └── index.ts └── yarn.lock /.npmignore: -------------------------------------------------------------------------------- 1 | src 2 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | docs 2 | node_modules 3 | -------------------------------------------------------------------------------- /.editorconfig: -------------------------------------------------------------------------------- 1 | root = true 2 | 3 | [*] 4 | end_of_line = crlf 5 | charset = utf-8 6 | trim_trailing_whitespace = true 7 | insert_final_newline = true 8 | indent_style = space 9 | indent_size = 4 10 | -------------------------------------------------------------------------------- /publish_docs.sh: -------------------------------------------------------------------------------- 1 | yarn docs 2 | cd docs 3 | git init . 4 | git remote add origin https://github.com/gamestdio/mathf.git 5 | git checkout -b docs 6 | git add . 7 | git commit -m "update docs" 8 | git push origin docs:gh-pages --force 9 | -------------------------------------------------------------------------------- /tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "target": "es5", 4 | "module": "commonjs", 5 | "outDir": "./lib", 6 | "declaration": true, 7 | "lib": ["es2015"], 8 | "strict": true, 9 | "typeRoots": [] 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "@gamestdio/mathf", 3 | "version": "1.0.1", 4 | "description": "A collection of common math functions.", 5 | "main": "lib/index.js", 6 | "repository": { 7 | "type": "git", 8 | "url": "git://github.com/gamestdio/mathf.git" 9 | }, 10 | "author": "Endel Dreyer", 11 | "license": "MIT", 12 | "scripts": { 13 | "docs": "typedoc --out docs --mode file --entryPoint index", 14 | "prepublish": "tsc" 15 | }, 16 | "devDependencies": { 17 | "typedoc": "^0.8.0", 18 | "typescript": "^2.4.2" 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # @gamestdio/mathf 2 | 3 | A collection of common math functions for JavaScript/TypeScript. 4 | 5 | ## Installation 6 | 7 | ``` 8 | npm install @gamestdio/mathf 9 | ``` 10 | 11 | ## Usage 12 | 13 | ```typescript 14 | import { lerpAngle, rad2Deg, deg2Rad } from "@gamestdio/mathf"; 15 | 16 | let targetAngle = Math.PI * rad2Deg; 17 | sprite.rotation = lerpAngle(sprite.rotation * rad2Deg, targetAngle, 0.1) * deg2Rad; 18 | ``` 19 | 20 | ## References 21 | - https://github.com/likerRr/mathf-js 22 | - https://docs.unity3d.com/ScriptReference/Mathf.html 23 | 24 | ## License 25 | 26 | MIT 27 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | Copyright © 2017 Endel Dreyer 2 | 3 | MIT License: 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 13 | all 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 21 | THE SOFTWARE. 22 | -------------------------------------------------------------------------------- /src/index.ts: -------------------------------------------------------------------------------- 1 | const FULL_ANGLE = 360; 2 | const STRAIGHT_ANGLE = 180; 3 | const GAMMA_TO_LINEAR = 2.2; 4 | const LINEAR_TO_GAMMA = 0.45454545; 5 | const IS_INTEGER = 0.5; 6 | 7 | export const deg2Rad = Math.PI * 2 / FULL_ANGLE; 8 | export const rad2Deg = FULL_ANGLE / (Math.PI * 2); 9 | 10 | function toInt(value: number) { 11 | return value >> 0; 12 | } 13 | 14 | /** 15 | * Compares two floating point values if they are similar 16 | * 17 | * @see http://docs.unity3d.com/ScriptReference/Mathf.Approximately.html 18 | */ 19 | export function approximately(f1: number, f2: number) { 20 | return Math.abs(f1 - f2) < Number.EPSILON; 21 | } 22 | 23 | /** 24 | * Clamps a value between a minimum float and maximum float value 25 | * 26 | * @see http://docs.unity3d.com/ScriptReference/Mathf.Clamp.html 27 | */ 28 | export function clamp(value: number, min: number, max: number) { 29 | return value < min ? min : value > max ? max : value; 30 | } 31 | 32 | /** 33 | * Clamps value between 0 and 1 and returns value 34 | * 35 | * @see http://docs.unity3d.com/ScriptReference/Mathf.Clamp01.html 36 | */ 37 | export function clamp01(value: number) { 38 | return value < 0 ? 0 : value > 1 ? 1 : value; 39 | } 40 | 41 | /** 42 | * Returns the closest power of two value 43 | * 44 | * @see http://docs.unity3d.com/ScriptReference/Mathf.ClosestPowerOfTwo.html 45 | */ 46 | export function closestPowerOfTwo(value: number) { 47 | let nextValue = nextPowerOfTwo(value); 48 | 49 | // if value is between nextPowerOfTwo and pre-pre nextPowerOfTwo 50 | if (nextValue - value > nextValue >> 2) { 51 | // prev power of two 52 | return nextValue >> 1; 53 | } 54 | 55 | return nextValue; 56 | } 57 | 58 | /** 59 | * Returns the closest power of two long value (useful for more then 32 bit numbers) 60 | * 61 | * @see http://docs.unity3d.com/ScriptReference/Mathf.ClosestPowerOfTwo.html 62 | */ 63 | export function closestPowerOfTwoLong(value: number) { 64 | value = toInt(value); 65 | 66 | if (value < 0) return 0; 67 | 68 | // algorithm to find next power of two for long integers 69 | let nextPowerOfTwo = 2 << Math.floor(Math.log2(value)); 70 | 71 | // if value is between nextPowerOfTwo and pre-pre nextPowerOfTwo 72 | if (nextPowerOfTwo - value > nextPowerOfTwo >> 2) { 73 | // prev power of two 74 | return nextPowerOfTwo >> 1; 75 | } 76 | 77 | return nextPowerOfTwo; 78 | } 79 | 80 | /** 81 | * Calculates the shortest difference between two given angles given in degrees 82 | * 83 | * @see http://docs.unity3d.com/ScriptReference/Mathf.DeltaAngle.html 84 | */ 85 | export function deltaAngle(current: number, target: number) { 86 | if (Math.abs(current) > FULL_ANGLE) { 87 | current %= FULL_ANGLE; 88 | } 89 | 90 | if (Math.abs(target) > FULL_ANGLE) { 91 | target %= FULL_ANGLE; 92 | } 93 | 94 | return target - current; 95 | } 96 | 97 | /** 98 | * Converts the given value from gamma (sRGB) to linear color space 99 | * 100 | * @see http://docs.unity3d.com/ScriptReference/Mathf.GammaToLinearSpace.html 101 | */ 102 | export function gammaToLinearSpace(value: number) { 103 | return Math.pow(value, GAMMA_TO_LINEAR); 104 | } 105 | 106 | /** 107 | * Calculates the linear parameter t that produces the interpolant value within the range [a, b] 108 | * 109 | * @see http://docs.unity3d.com/ScriptReference/Mathf.InverseLerp.html 110 | */ 111 | export function inverseLerp(a: number, b: number, value: number) { 112 | return (clamp(value, Math.min(a, b), Math.max(a, b)) - a) / (b - a); 113 | } 114 | 115 | /** 116 | * Returns true if the value is power of two 117 | * 118 | * @see http://docs.unity3d.com/ScriptReference/Mathf.IsPowerOfTwo.html 119 | */ 120 | export function isPowerOfTwo(value: number) { 121 | value = toInt(value); 122 | 123 | return (value & (value - 1)) === 0; 124 | } 125 | 126 | /** 127 | * Linearly interpolates between a and b by t 128 | * 129 | * @see http://docs.unity3d.com/ScriptReference/Mathf.Lerp.html 130 | */ 131 | export function lerp(a: number, b: number, t: number) { 132 | return (b - a) * clamp01(t) + a; 133 | } 134 | 135 | /** 136 | * Same as Lerp but makes sure the values interpolate correctly when they wrap around 360 degrees 137 | * 138 | * @see http://docs.unity3d.com/ScriptReference/Mathf.LerpAngle.html 139 | */ 140 | export function lerpAngle(a: number, b: number, t: number) { 141 | while (a > b + STRAIGHT_ANGLE) { 142 | b += FULL_ANGLE; 143 | } 144 | 145 | while (b > a + STRAIGHT_ANGLE) { 146 | b -= FULL_ANGLE; 147 | } 148 | 149 | return lerp(a, b, t); 150 | } 151 | 152 | /** 153 | * Linearly interpolates between a and b by t 154 | * 155 | * @see http://docs.unity3d.com/ScriptReference/Mathf.LerpUnclamped.html 156 | */ 157 | export function lerpUnclamped(a: number, b: number, t: number) { 158 | if (t < 0 || t > 1) { 159 | return a + Math.abs(b - a) * t; 160 | } 161 | 162 | return (b - a) * clamp01(t) + a; 163 | } 164 | 165 | /** 166 | * Converts the given value from linear to gamma (sRGB) color space 167 | * 168 | * @see http://docs.unity3d.com/ScriptReference/Mathf.LinearToGammaSpace.html 169 | */ 170 | export function linearToGammaSpace(value: number) { 171 | return Math.pow(value, LINEAR_TO_GAMMA); 172 | } 173 | 174 | /** 175 | * Moves a value current towards target 176 | * 177 | * @see http://docs.unity3d.com/ScriptReference/Mathf.MoveTowards.html 178 | */ 179 | export function moveTowards(current: number, target: number, maxDelta: number) { 180 | if (maxDelta > 0) { 181 | if (target < current && current - maxDelta < target) return target; 182 | else if (target > current && current + maxDelta > target) return target; 183 | } 184 | 185 | if (current > target) { 186 | return current - maxDelta; 187 | } 188 | 189 | return current + maxDelta; 190 | } 191 | 192 | /** 193 | * TODO: 194 | * Same as MoveTowards but makes sure the values interpolate correctly when they wrap around 360 degrees 195 | * 196 | * @see http://docs.unity3d.com/ScriptReference/Mathf.MoveTowardsAngle.html 197 | * @deprecated 198 | */ 199 | function moveTowardsAngle(current: number, target: number, maxDelta: number) {} 200 | 201 | /** 202 | * Returns the next power of two value 203 | * 204 | * @see http://docs.unity3d.com/ScriptReference/Mathf.NextPowerOfTwo.html 205 | */ 206 | export function nextPowerOfTwo(value: number): number { 207 | value = toInt(value); 208 | 209 | if (value < 0) return 0; 210 | 211 | --value; 212 | value |= value >> 1; 213 | value |= value >> 2; 214 | value |= value >> 4; 215 | value |= value >> 8; 216 | value |= value >> 16; 217 | value += 1; 218 | 219 | return value; 220 | } 221 | 222 | /** 223 | * PingPongs the value t, so that it is never larger than length and never smaller than 0 224 | * 225 | * @see http://docs.unity3d.com/ScriptReference/Mathf.PingPong.html 226 | */ 227 | export function pingPong(t: number, length: number) { 228 | if (t < 0) t = -t; 229 | var mod = t % length; 230 | // if mod is even 231 | if (Math.ceil(t / length) % 2 === 0) { 232 | return mod === 0 ? 0 : length - mod; 233 | } 234 | 235 | return mod === 0 ? length : mod; 236 | } 237 | 238 | /** 239 | * Loops the value t, so that it is never larger than length and never smaller than 0 240 | * 241 | * @see http://docs.unity3d.com/ScriptReference/Mathf.Repeat.html 242 | */ 243 | export function repeat(t: number, length: number) { 244 | if (t > 0) return t % length; 245 | 246 | return length + t % length; 247 | } 248 | 249 | /** 250 | * Returns f rounded to the nearest integer 251 | * 252 | * @see http://docs.unity3d.com/ScriptReference/Mathf.Round.html 253 | */ 254 | export function round(f: number) { 255 | let ceilVal = f + IS_INTEGER; 256 | 257 | if (ceilVal === Math.ceil(f)) { 258 | return ceilVal % 2 === 0 ? f + IS_INTEGER : f - IS_INTEGER; 259 | } 260 | 261 | return Math.round(f); 262 | } 263 | 264 | /** 265 | * Returns the sign of f 266 | * 267 | * @see http://docs.unity3d.com/ScriptReference/Mathf.Sign.html 268 | */ 269 | export function sign(f: number) { 270 | return f >= 0 ? 1 : -1; 271 | } 272 | 273 | /** 274 | * TODO: 275 | * Gradually changes a value towards a desired goal over time 276 | * 277 | * @see http://docs.unity3d.com/ScriptReference/Mathf.SmoothDamp.html 278 | * @deprecated 279 | */ 280 | function smoothDamp( 281 | current: number, 282 | target: number, 283 | currentVelocity: number, 284 | smoothTime: number, 285 | maxSpeed: number, 286 | deltaTime: number 287 | ) {} 288 | 289 | /** 290 | * TODO: 291 | * Gradually changes an angle given in degrees towards a desired goal angle over time 292 | * 293 | * @see http://docs.unity3d.com/ScriptReference/Mathf.SmoothDampAngle.html 294 | */ 295 | function smoothDampAngle( 296 | current: number, 297 | target: number, 298 | currentVelocity: number, 299 | smoothTime: number, 300 | maxSpeed: number, 301 | deltaTime: number, 302 | ) {} 303 | 304 | /** 305 | * TODO: 306 | * Interpolates between min and max with smoothing at the limits 307 | * 308 | * @see http://docs.unity3d.com/ScriptReference/Mathf.SmoothStep.html 309 | * @deprecated 310 | */ 311 | function smoothStep(a: number, b: number, t: number) {} 312 | -------------------------------------------------------------------------------- /yarn.lock: -------------------------------------------------------------------------------- 1 | # THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY. 2 | # yarn lockfile v1 3 | 4 | 5 | "@types/fs-extra@^4.0.0": 6 | version "4.0.0" 7 | resolved "https://registry.yarnpkg.com/@types/fs-extra/-/fs-extra-4.0.0.tgz#1dd742ad5c9bce308f7a52d02ebc01421bc9102f" 8 | dependencies: 9 | "@types/node" "*" 10 | 11 | "@types/glob@*": 12 | version "5.0.30" 13 | resolved "https://registry.yarnpkg.com/@types/glob/-/glob-5.0.30.tgz#1026409c5625a8689074602808d082b2867b8a51" 14 | dependencies: 15 | "@types/minimatch" "*" 16 | "@types/node" "*" 17 | 18 | "@types/handlebars@^4.0.31": 19 | version "4.0.35" 20 | resolved "https://registry.yarnpkg.com/@types/handlebars/-/handlebars-4.0.35.tgz#409eb97a3ad6970daba4d586cb6afe3f5e082c01" 21 | 22 | "@types/highlight.js@^9.1.8": 23 | version "9.1.9" 24 | resolved "https://registry.yarnpkg.com/@types/highlight.js/-/highlight.js-9.1.9.tgz#ed6336955eaf233b75eb7923b9b1f373d045ef01" 25 | 26 | "@types/lodash@^4.14.37": 27 | version "4.14.71" 28 | resolved "https://registry.yarnpkg.com/@types/lodash/-/lodash-4.14.71.tgz#0dc383f78981216ac76e2f2c3afd998e0450e4c1" 29 | 30 | "@types/marked@0.0.28": 31 | version "0.0.28" 32 | resolved "https://registry.yarnpkg.com/@types/marked/-/marked-0.0.28.tgz#44ba754e9fa51432583e8eb30a7c4dd249b52faa" 33 | 34 | "@types/minimatch@*", "@types/minimatch@^2.0.29": 35 | version "2.0.29" 36 | resolved "https://registry.yarnpkg.com/@types/minimatch/-/minimatch-2.0.29.tgz#5002e14f75e2d71e564281df0431c8c1b4a2a36a" 37 | 38 | "@types/node@*": 39 | version "8.0.19" 40 | resolved "https://registry.yarnpkg.com/@types/node/-/node-8.0.19.tgz#e46e2b0243de7d03f15b26b45c59ebb84f657a4e" 41 | 42 | "@types/shelljs@^0.7.0": 43 | version "0.7.4" 44 | resolved "https://registry.yarnpkg.com/@types/shelljs/-/shelljs-0.7.4.tgz#137b5f31306eaff4de120ffe5b9d74b297809cfc" 45 | dependencies: 46 | "@types/glob" "*" 47 | "@types/node" "*" 48 | 49 | align-text@^0.1.1, align-text@^0.1.3: 50 | version "0.1.4" 51 | resolved "https://registry.yarnpkg.com/align-text/-/align-text-0.1.4.tgz#0cd90a561093f35d0a99256c22b7069433fad117" 52 | dependencies: 53 | kind-of "^3.0.2" 54 | longest "^1.0.1" 55 | repeat-string "^1.5.2" 56 | 57 | amdefine@>=0.0.4: 58 | version "1.0.1" 59 | resolved "https://registry.yarnpkg.com/amdefine/-/amdefine-1.0.1.tgz#4a5282ac164729e93619bcfd3ad151f817ce91f5" 60 | 61 | async@^1.4.0: 62 | version "1.5.2" 63 | resolved "https://registry.yarnpkg.com/async/-/async-1.5.2.tgz#ec6a61ae56480c0c3cb241c95618e20892f9672a" 64 | 65 | balanced-match@^1.0.0: 66 | version "1.0.0" 67 | resolved "https://registry.yarnpkg.com/balanced-match/-/balanced-match-1.0.0.tgz#89b4d199ab2bee49de164ea02b89ce462d71b767" 68 | 69 | brace-expansion@^1.1.7: 70 | version "1.1.8" 71 | resolved "https://registry.yarnpkg.com/brace-expansion/-/brace-expansion-1.1.8.tgz#c07b211c7c952ec1f8efd51a77ef0d1d3990a292" 72 | dependencies: 73 | balanced-match "^1.0.0" 74 | concat-map "0.0.1" 75 | 76 | camelcase@^1.0.2: 77 | version "1.2.1" 78 | resolved "https://registry.yarnpkg.com/camelcase/-/camelcase-1.2.1.tgz#9bb5304d2e0b56698b2c758b08a3eaa9daa58a39" 79 | 80 | center-align@^0.1.1: 81 | version "0.1.3" 82 | resolved "https://registry.yarnpkg.com/center-align/-/center-align-0.1.3.tgz#aa0d32629b6ee972200411cbd4461c907bc2b7ad" 83 | dependencies: 84 | align-text "^0.1.3" 85 | lazy-cache "^1.0.3" 86 | 87 | cliui@^2.1.0: 88 | version "2.1.0" 89 | resolved "https://registry.yarnpkg.com/cliui/-/cliui-2.1.0.tgz#4b475760ff80264c762c3a1719032e91c7fea0d1" 90 | dependencies: 91 | center-align "^0.1.1" 92 | right-align "^0.1.1" 93 | wordwrap "0.0.2" 94 | 95 | concat-map@0.0.1: 96 | version "0.0.1" 97 | resolved "https://registry.yarnpkg.com/concat-map/-/concat-map-0.0.1.tgz#d8a96bd77fd68df7793a73036a3ba0d5405d477b" 98 | 99 | decamelize@^1.0.0: 100 | version "1.2.0" 101 | resolved "https://registry.yarnpkg.com/decamelize/-/decamelize-1.2.0.tgz#f6534d15148269b20352e7bee26f501f9a191290" 102 | 103 | fs-extra@^4.0.0: 104 | version "4.0.1" 105 | resolved "https://registry.yarnpkg.com/fs-extra/-/fs-extra-4.0.1.tgz#7fc0c6c8957f983f57f306a24e5b9ddd8d0dd880" 106 | dependencies: 107 | graceful-fs "^4.1.2" 108 | jsonfile "^3.0.0" 109 | universalify "^0.1.0" 110 | 111 | fs.realpath@^1.0.0: 112 | version "1.0.0" 113 | resolved "https://registry.yarnpkg.com/fs.realpath/-/fs.realpath-1.0.0.tgz#1504ad2523158caa40db4a2787cb01411994ea4f" 114 | 115 | glob@^7.0.0: 116 | version "7.1.2" 117 | resolved "https://registry.yarnpkg.com/glob/-/glob-7.1.2.tgz#c19c9df9a028702d678612384a6552404c636d15" 118 | dependencies: 119 | fs.realpath "^1.0.0" 120 | inflight "^1.0.4" 121 | inherits "2" 122 | minimatch "^3.0.4" 123 | once "^1.3.0" 124 | path-is-absolute "^1.0.0" 125 | 126 | graceful-fs@^4.1.2, graceful-fs@^4.1.6: 127 | version "4.1.11" 128 | resolved "https://registry.yarnpkg.com/graceful-fs/-/graceful-fs-4.1.11.tgz#0e8bdfe4d1ddb8854d64e04ea7c00e2a026e5658" 129 | 130 | handlebars@^4.0.6: 131 | version "4.0.10" 132 | resolved "https://registry.yarnpkg.com/handlebars/-/handlebars-4.0.10.tgz#3d30c718b09a3d96f23ea4cc1f403c4d3ba9ff4f" 133 | dependencies: 134 | async "^1.4.0" 135 | optimist "^0.6.1" 136 | source-map "^0.4.4" 137 | optionalDependencies: 138 | uglify-js "^2.6" 139 | 140 | highlight.js@^9.0.0: 141 | version "9.12.0" 142 | resolved "https://registry.yarnpkg.com/highlight.js/-/highlight.js-9.12.0.tgz#e6d9dbe57cbefe60751f02af336195870c90c01e" 143 | 144 | inflight@^1.0.4: 145 | version "1.0.6" 146 | resolved "https://registry.yarnpkg.com/inflight/-/inflight-1.0.6.tgz#49bd6331d7d02d0c09bc910a1075ba8165b56df9" 147 | dependencies: 148 | once "^1.3.0" 149 | wrappy "1" 150 | 151 | inherits@2: 152 | version "2.0.3" 153 | resolved "https://registry.yarnpkg.com/inherits/-/inherits-2.0.3.tgz#633c2c83e3da42a502f52466022480f4208261de" 154 | 155 | interpret@^1.0.0: 156 | version "1.0.3" 157 | resolved "https://registry.yarnpkg.com/interpret/-/interpret-1.0.3.tgz#cbc35c62eeee73f19ab7b10a801511401afc0f90" 158 | 159 | is-buffer@^1.1.5: 160 | version "1.1.5" 161 | resolved "https://registry.yarnpkg.com/is-buffer/-/is-buffer-1.1.5.tgz#1f3b26ef613b214b88cbca23cc6c01d87961eecc" 162 | 163 | jsonfile@^3.0.0: 164 | version "3.0.1" 165 | resolved "https://registry.yarnpkg.com/jsonfile/-/jsonfile-3.0.1.tgz#a5ecc6f65f53f662c4415c7675a0331d0992ec66" 166 | optionalDependencies: 167 | graceful-fs "^4.1.6" 168 | 169 | kind-of@^3.0.2: 170 | version "3.2.2" 171 | resolved "https://registry.yarnpkg.com/kind-of/-/kind-of-3.2.2.tgz#31ea21a734bab9bbb0f32466d893aea51e4a3c64" 172 | dependencies: 173 | is-buffer "^1.1.5" 174 | 175 | lazy-cache@^1.0.3: 176 | version "1.0.4" 177 | resolved "https://registry.yarnpkg.com/lazy-cache/-/lazy-cache-1.0.4.tgz#a1d78fc3a50474cb80845d3b3b6e1da49a446e8e" 178 | 179 | lodash@^4.13.1: 180 | version "4.17.4" 181 | resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.4.tgz#78203a4d1c328ae1d86dca6460e369b57f4055ae" 182 | 183 | longest@^1.0.1: 184 | version "1.0.1" 185 | resolved "https://registry.yarnpkg.com/longest/-/longest-1.0.1.tgz#30a0b2da38f73770e8294a0d22e6625ed77d0097" 186 | 187 | marked@^0.3.5: 188 | version "0.3.6" 189 | resolved "https://registry.yarnpkg.com/marked/-/marked-0.3.6.tgz#b2c6c618fccece4ef86c4fc6cb8a7cbf5aeda8d7" 190 | 191 | minimatch@^3.0.0, minimatch@^3.0.4: 192 | version "3.0.4" 193 | resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-3.0.4.tgz#5166e286457f03306064be5497e8dbb0c3d32083" 194 | dependencies: 195 | brace-expansion "^1.1.7" 196 | 197 | minimist@~0.0.1: 198 | version "0.0.10" 199 | resolved "https://registry.yarnpkg.com/minimist/-/minimist-0.0.10.tgz#de3f98543dbf96082be48ad1a0c7cda836301dcf" 200 | 201 | once@^1.3.0: 202 | version "1.4.0" 203 | resolved "https://registry.yarnpkg.com/once/-/once-1.4.0.tgz#583b1aa775961d4b113ac17d9c50baef9dd76bd1" 204 | dependencies: 205 | wrappy "1" 206 | 207 | optimist@^0.6.1: 208 | version "0.6.1" 209 | resolved "https://registry.yarnpkg.com/optimist/-/optimist-0.6.1.tgz#da3ea74686fa21a19a111c326e90eb15a0196686" 210 | dependencies: 211 | minimist "~0.0.1" 212 | wordwrap "~0.0.2" 213 | 214 | path-is-absolute@^1.0.0: 215 | version "1.0.1" 216 | resolved "https://registry.yarnpkg.com/path-is-absolute/-/path-is-absolute-1.0.1.tgz#174b9268735534ffbc7ace6bf53a5a9e1b5c5f5f" 217 | 218 | path-parse@^1.0.5: 219 | version "1.0.5" 220 | resolved "https://registry.yarnpkg.com/path-parse/-/path-parse-1.0.5.tgz#3c1adf871ea9cd6c9431b6ea2bd74a0ff055c4c1" 221 | 222 | progress@^2.0.0: 223 | version "2.0.0" 224 | resolved "https://registry.yarnpkg.com/progress/-/progress-2.0.0.tgz#8a1be366bf8fc23db2bd23f10c6fe920b4389d1f" 225 | 226 | rechoir@^0.6.2: 227 | version "0.6.2" 228 | resolved "https://registry.yarnpkg.com/rechoir/-/rechoir-0.6.2.tgz#85204b54dba82d5742e28c96756ef43af50e3384" 229 | dependencies: 230 | resolve "^1.1.6" 231 | 232 | repeat-string@^1.5.2: 233 | version "1.6.1" 234 | resolved "https://registry.yarnpkg.com/repeat-string/-/repeat-string-1.6.1.tgz#8dcae470e1c88abc2d600fff4a776286da75e637" 235 | 236 | resolve@^1.1.6: 237 | version "1.4.0" 238 | resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.4.0.tgz#a75be01c53da25d934a98ebd0e4c4a7312f92a86" 239 | dependencies: 240 | path-parse "^1.0.5" 241 | 242 | right-align@^0.1.1: 243 | version "0.1.3" 244 | resolved "https://registry.yarnpkg.com/right-align/-/right-align-0.1.3.tgz#61339b722fe6a3515689210d24e14c96148613ef" 245 | dependencies: 246 | align-text "^0.1.1" 247 | 248 | shelljs@^0.7.0: 249 | version "0.7.8" 250 | resolved "https://registry.yarnpkg.com/shelljs/-/shelljs-0.7.8.tgz#decbcf874b0d1e5fb72e14b164a9683048e9acb3" 251 | dependencies: 252 | glob "^7.0.0" 253 | interpret "^1.0.0" 254 | rechoir "^0.6.2" 255 | 256 | source-map@^0.4.4: 257 | version "0.4.4" 258 | resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.4.4.tgz#eba4f5da9c0dc999de68032d8b4f76173652036b" 259 | dependencies: 260 | amdefine ">=0.0.4" 261 | 262 | source-map@~0.5.1: 263 | version "0.5.6" 264 | resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.5.6.tgz#75ce38f52bf0733c5a7f0c118d81334a2bb5f412" 265 | 266 | typedoc-default-themes@^0.5.0: 267 | version "0.5.0" 268 | resolved "https://registry.yarnpkg.com/typedoc-default-themes/-/typedoc-default-themes-0.5.0.tgz#6dc2433e78ed8bea8e887a3acde2f31785bd6227" 269 | 270 | typedoc@^0.8.0: 271 | version "0.8.0" 272 | resolved "https://registry.yarnpkg.com/typedoc/-/typedoc-0.8.0.tgz#d7172bc6a29964f451b7609c005beadadefe2361" 273 | dependencies: 274 | "@types/fs-extra" "^4.0.0" 275 | "@types/handlebars" "^4.0.31" 276 | "@types/highlight.js" "^9.1.8" 277 | "@types/lodash" "^4.14.37" 278 | "@types/marked" "0.0.28" 279 | "@types/minimatch" "^2.0.29" 280 | "@types/shelljs" "^0.7.0" 281 | fs-extra "^4.0.0" 282 | handlebars "^4.0.6" 283 | highlight.js "^9.0.0" 284 | lodash "^4.13.1" 285 | marked "^0.3.5" 286 | minimatch "^3.0.0" 287 | progress "^2.0.0" 288 | shelljs "^0.7.0" 289 | typedoc-default-themes "^0.5.0" 290 | typescript "2.4.1" 291 | 292 | typescript@2.4.1: 293 | version "2.4.1" 294 | resolved "https://registry.yarnpkg.com/typescript/-/typescript-2.4.1.tgz#c3ccb16ddaa0b2314de031e7e6fee89e5ba346bc" 295 | 296 | typescript@^2.4.2: 297 | version "2.4.2" 298 | resolved "https://registry.yarnpkg.com/typescript/-/typescript-2.4.2.tgz#f8395f85d459276067c988aa41837a8f82870844" 299 | 300 | uglify-js@^2.6: 301 | version "2.8.29" 302 | resolved "https://registry.yarnpkg.com/uglify-js/-/uglify-js-2.8.29.tgz#29c5733148057bb4e1f75df35b7a9cb72e6a59dd" 303 | dependencies: 304 | source-map "~0.5.1" 305 | yargs "~3.10.0" 306 | optionalDependencies: 307 | uglify-to-browserify "~1.0.0" 308 | 309 | uglify-to-browserify@~1.0.0: 310 | version "1.0.2" 311 | resolved "https://registry.yarnpkg.com/uglify-to-browserify/-/uglify-to-browserify-1.0.2.tgz#6e0924d6bda6b5afe349e39a6d632850a0f882b7" 312 | 313 | universalify@^0.1.0: 314 | version "0.1.1" 315 | resolved "https://registry.yarnpkg.com/universalify/-/universalify-0.1.1.tgz#fa71badd4437af4c148841e3b3b165f9e9e590b7" 316 | 317 | window-size@0.1.0: 318 | version "0.1.0" 319 | resolved "https://registry.yarnpkg.com/window-size/-/window-size-0.1.0.tgz#5438cd2ea93b202efa3a19fe8887aee7c94f9c9d" 320 | 321 | wordwrap@0.0.2: 322 | version "0.0.2" 323 | resolved "https://registry.yarnpkg.com/wordwrap/-/wordwrap-0.0.2.tgz#b79669bb42ecb409f83d583cad52ca17eaa1643f" 324 | 325 | wordwrap@~0.0.2: 326 | version "0.0.3" 327 | resolved "https://registry.yarnpkg.com/wordwrap/-/wordwrap-0.0.3.tgz#a3d5da6cd5c0bc0008d37234bbaf1bed63059107" 328 | 329 | wrappy@1: 330 | version "1.0.2" 331 | resolved "https://registry.yarnpkg.com/wrappy/-/wrappy-1.0.2.tgz#b5243d8f3ec1aa35f1364605bc0d1036e30ab69f" 332 | 333 | yargs@~3.10.0: 334 | version "3.10.0" 335 | resolved "https://registry.yarnpkg.com/yargs/-/yargs-3.10.0.tgz#f7ee7bd857dd7c1d2d38c0e74efbd681d1431fd1" 336 | dependencies: 337 | camelcase "^1.0.2" 338 | cliui "^2.1.0" 339 | decamelize "^1.0.0" 340 | window-size "0.1.0" 341 | --------------------------------------------------------------------------------