├── .editorconfig ├── .gitignore ├── .npmignore ├── LISENCE.txt ├── README.md ├── package.json ├── src └── index.ts ├── tsconfig.json ├── tslint.json └── yarn.lock /.editorconfig: -------------------------------------------------------------------------------- 1 | # This file is for unifying the coding style for different editors and IDEs 2 | # editorconfig.org 3 | root = true 4 | [*] 5 | end_of_line = lf 6 | charset = utf-8 7 | trim_trailing_whitespace = false 8 | insert_final_newline = true 9 | indent_style = tab 10 | [{*.yml,*.json}] 11 | indent_style = space 12 | indent_size = 2 13 | # Sass 14 | [*.scss] 15 | indent_size = 2 16 | # Javascript + derivatives 17 | [{*.coffee,*.js,*.ts}] 18 | indent_size = 2 19 | # Jade templates 20 | [*.pug, *.jade] 21 | indent_size = 2 -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | *.log 2 | node_modules/ 3 | dist/ 4 | .DS_Store 5 | Thumbs.db 6 | -------------------------------------------------------------------------------- /.npmignore: -------------------------------------------------------------------------------- 1 | node_modules/ 2 | *.log 3 | src/ 4 | tsconfig.json 5 | tslint.json 6 | .gitignore 7 | .editorconfig 8 | -------------------------------------------------------------------------------- /LISENCE.txt: -------------------------------------------------------------------------------- 1 | /* 2 | * 3 | * TERMS OF USE - js-easing-functions 4 | * 5 | * Open source under the BSD License. 6 | * 7 | * Copyright 2017 Ben Meyrick 8 | * All rights reserved. 9 | * 10 | * Redistribution and use in source and binary forms, with or without modification, 11 | * are permitted provided that the following conditions are met: 12 | * 13 | * Redistributions of source code must retain the above copyright notice, this list of 14 | * conditions and the following disclaimer. 15 | * Redistributions in binary form must reproduce the above copyright notice, this list 16 | * of conditions and the following disclaimer in the documentation and/or other materials 17 | * provided with the distribution. 18 | * 19 | * Neither the name of the author nor the names of contributors may be used to endorse 20 | * or promote products derived from this software without specific prior written permission. 21 | * 22 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY 23 | * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 24 | * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE 25 | * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, 26 | * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE 27 | * GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED 28 | * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 29 | * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED 30 | * OF THE POSSIBILITY OF SUCH DAMAGE. 31 | * 32 | */ 33 | 34 | 35 | /* 36 | * jQuery Easing v1.3 - http://gsgd.co.uk/sandbox/jquery/easing/ 37 | * 38 | * Uses the built in easing capabilities added In jQuery 1.1 39 | * to offer multiple easing options 40 | * 41 | * TERMS OF USE - jQuery Easing 42 | * 43 | * Open source under the BSD License. 44 | * 45 | * Copyright © 2008 George McGinley Smith 46 | * All rights reserved. 47 | * 48 | * Redistribution and use in source and binary forms, with or without modification, 49 | * are permitted provided that the following conditions are met: 50 | * 51 | * Redistributions of source code must retain the above copyright notice, this list of 52 | * conditions and the following disclaimer. 53 | * Redistributions in binary form must reproduce the above copyright notice, this list 54 | * of conditions and the following disclaimer in the documentation and/or other materials 55 | * provided with the distribution. 56 | * 57 | * Neither the name of the author nor the names of contributors may be used to endorse 58 | * or promote products derived from this software without specific prior written permission. 59 | * 60 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY 61 | * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 62 | * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE 63 | * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, 64 | * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE 65 | * GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED 66 | * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 67 | * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED 68 | * OF THE POSSIBILITY OF SUCH DAMAGE. 69 | * 70 | */ 71 | 72 | /* 73 | * 74 | * TERMS OF USE - EASING EQUATIONS 75 | * 76 | * Open source under the BSD License. 77 | * 78 | * Copyright 2001 Robert Penner 79 | * All rights reserved. 80 | * 81 | * Redistribution and use in source and binary forms, with or without modification, 82 | * are permitted provided that the following conditions are met: 83 | * 84 | * Redistributions of source code must retain the above copyright notice, this list of 85 | * conditions and the following disclaimer. 86 | * Redistributions in binary form must reproduce the above copyright notice, this list 87 | * of conditions and the following disclaimer in the documentation and/or other materials 88 | * provided with the distribution. 89 | * 90 | * Neither the name of the author nor the names of contributors may be used to endorse 91 | * or promote products derived from this software without specific prior written permission. 92 | * 93 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY 94 | * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 95 | * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE 96 | * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, 97 | * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE 98 | * GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED 99 | * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 100 | * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED 101 | * OF THE POSSIBILITY OF SUCH DAMAGE. 102 | * 103 | */ 104 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # JS Easing Functions 2 | Easing functions based upon jQuery's easing functions, using Robert Penner's easing equations. 3 | 4 | ## Install 5 | You can install via npm or yarn 6 | 7 | ### npm 8 | ```bash 9 | npm install --save js-easing-functions 10 | ``` 11 | 12 | ### yarn 13 | ```bash 14 | yarn add js-easing-functions 15 | ``` 16 | 17 | ## Usage 18 | ### Available easing functions 19 | * easeInQuad 20 | * easeOutQuad 21 | * easeInOutQuad 22 | * easeInCubic 23 | * easeOutCubic 24 | * easeInOutCubic 25 | * easeInQuart 26 | * easeOutQuart 27 | * easeInOutQuart 28 | * easeInQuint 29 | * easeOutQuint 30 | * easeInOutQuint 31 | * easeInSine 32 | * easeOutSine 33 | * easeInOutSine 34 | * easeInExpo 35 | * easeOutExpo 36 | * easeInOutExpo 37 | * easeInCirc 38 | * easeOutCirc 39 | * easeInOutCirc 40 | * easeInElastic 41 | * easeOutElastic 42 | * easeInOutElastic 43 | * easeInBack 44 | * easeOutBack 45 | * easeInOutBack 46 | * easeInBounce 47 | * easeOutBounce 48 | * easeInOutBounce 49 | 50 | These functions can be visualised at http://easings.net 51 | 52 | ### Importing 53 | You can import the easing functions you want using ES6 imports 54 | ```javascript 55 | import { easeInOutBack } from 'js-easing-functions'; 56 | ``` 57 | 58 | ### Example use 59 | A simple eased animation to translateY an element from 100px to 200px. 60 | 61 | _Note: this is a rough function to give you an idea of how to use an easing function. Your implementation will probably need more checks to ensure the final value at the end of the animation is the one you specified._ 62 | ```javascript 63 | import { easeInOutBack } from 'js-easing-functions'; 64 | 65 | const elemToAnimate = document.querySelector('.MyElem'); 66 | const duration = 2000; 67 | const startValue = 100; 68 | const amountOfChange = 100; 69 | 70 | let startTime; 71 | 72 | function tick() { 73 | const elapsed = Date.now() - startTime; 74 | this.elemToAnimate.transform = `translateY(${easeInOutBack(elapsed, startValue, amountOfChange, duration)}px)`; 75 | 76 | if (elapsed < duration) { 77 | requestAnimationFrame(tick); 78 | } 79 | } 80 | 81 | function animate() { 82 | startTime = Date.now(); 83 | tick(); 84 | } 85 | 86 | animate(); 87 | ``` 88 | 89 | 90 | ## Notes 91 | More info on easing can be found at Robert Penner's website: http://robertpenner.com/easing 92 | 93 | If anyone can tell me what the _s_ parameter in the easeInBack, easeOutBack, and easeInOutBack functions represent please let me know and I'll rename the symbols. 94 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "js-easing-functions", 3 | "version": "1.0.3", 4 | "description": "Javascript easing functions based upon jQuery's easing functions, using Robert Penner's easing equations", 5 | "main": "./dist/index.js", 6 | "types": "./dist/index.d.ts", 7 | "author": "Ben Meyrick ", 8 | "license": "BSD", 9 | "keywords": ["easings", "animation"], 10 | "repository": { 11 | "type": "git", 12 | "url": "git+https://github.com/bameyrick/js-easing-functions.git" 13 | }, 14 | "scripts": { 15 | "lint": "tslint --project src/*.ts", 16 | "lint-staged": "lint-staged", 17 | "precommit": "lint-staged", 18 | "prepublishOnly": "rm -rf ./dist && npm run lint && tsc -p ./ --outDir dist/", 19 | "postcommit": "npm run prepublishOnly", 20 | "tslint-check": "tslint-config-prettier-check ./tslint.json" 21 | }, 22 | "lint-staged": { 23 | "*.ts": [ 24 | "tslint --project", 25 | "prettier --print-width 140 --use-tabs --single-quote --trailing-comma es5 --parser typescript --write", 26 | "git add" 27 | ], 28 | "*.json": ["prettier --print-width 140 --use-tabs --single-quote --trailing-comma es5 --parser json --write", "git add"] 29 | }, 30 | "devDependencies": { 31 | "husky": "^0.14.3", 32 | "lint-staged": "^5.0.0", 33 | "prettier": "^1.8.2", 34 | "tslint": "^5.8.0", 35 | "tslint-config-prettier": "^1.6.0", 36 | "tslint-plugin-prettier": "^1.3.0", 37 | "typescript": "^2.6.1" 38 | } 39 | } 40 | -------------------------------------------------------------------------------- /src/index.ts: -------------------------------------------------------------------------------- 1 | export function easeInQuad(elapsed: number, initialValue: number, amountOfChange: number, duration: number): number { 2 | return amountOfChange * (elapsed /= duration) * elapsed + initialValue; 3 | } 4 | 5 | export function easeOutQuad(elapsed: number, initialValue: number, amountOfChange: number, duration: number): number { 6 | return -amountOfChange * (elapsed /= duration) * (elapsed - 2) + initialValue; 7 | } 8 | 9 | export function easeInOutQuad(elapsed: number, initialValue: number, amountOfChange: number, duration: number): number { 10 | if ((elapsed /= duration / 2) < 1) { 11 | return amountOfChange / 2 * elapsed * elapsed + initialValue; 12 | } 13 | return -amountOfChange / 2 * (--elapsed * (elapsed - 2) - 1) + initialValue; 14 | } 15 | 16 | export function easeInCubic(elapsed: number, initialValue: number, amountOfChange: number, duration: number): number { 17 | return amountOfChange * (elapsed /= duration) * elapsed * elapsed + initialValue; 18 | } 19 | 20 | export function easeOutCubic(elapsed: number, initialValue: number, amountOfChange: number, duration: number): number { 21 | return amountOfChange * ((elapsed = elapsed / duration - 1) * elapsed * elapsed + 1) + initialValue; 22 | } 23 | 24 | export function easeInOutCubic(elapsed: number, initialValue: number, amountOfChange: number, duration: number): number { 25 | if ((elapsed /= duration / 2) < 1) { 26 | return amountOfChange / 2 * elapsed * elapsed * elapsed + initialValue; 27 | } 28 | return amountOfChange / 2 * ((elapsed -= 2) * elapsed * elapsed + 2) + initialValue; 29 | } 30 | 31 | export function easeInQuart(elapsed: number, initialValue: number, amountOfChange: number, duration: number): number { 32 | return amountOfChange * (elapsed /= duration) * elapsed * elapsed * elapsed + initialValue; 33 | } 34 | 35 | export function easeOutQuart(elapsed: number, initialValue: number, amountOfChange: number, duration: number): number { 36 | return -amountOfChange * ((elapsed = elapsed / duration - 1) * elapsed * elapsed * elapsed - 1) + initialValue; 37 | } 38 | 39 | export function easeInOutQuart(elapsed: number, initialValue: number, amountOfChange: number, duration: number): number { 40 | if ((elapsed /= duration / 2) < 1) { 41 | return amountOfChange / 2 * elapsed * elapsed * elapsed * elapsed + initialValue; 42 | } 43 | return -amountOfChange / 2 * ((elapsed -= 2) * elapsed * elapsed * elapsed - 2) + initialValue; 44 | } 45 | 46 | export function easeInQuint(elapsed: number, initialValue: number, amountOfChange: number, duration: number): number { 47 | return amountOfChange * (elapsed /= duration) * elapsed * elapsed * elapsed * elapsed + initialValue; 48 | } 49 | 50 | export function easeOutQuint(elapsed: number, initialValue: number, amountOfChange: number, duration: number): number { 51 | return amountOfChange * ((elapsed = elapsed / duration - 1) * elapsed * elapsed * elapsed * elapsed + 1) + initialValue; 52 | } 53 | 54 | export function easeInOutQuint(elapsed: number, initialValue: number, amountOfChange: number, duration: number): number { 55 | if ((elapsed /= duration / 2) < 1) { 56 | return amountOfChange / 2 * elapsed * elapsed * elapsed * elapsed * elapsed + initialValue; 57 | } 58 | return amountOfChange / 2 * ((elapsed -= 2) * elapsed * elapsed * elapsed * elapsed + 2) + initialValue; 59 | } 60 | 61 | export function easeInSine(elapsed: number, initialValue: number, amountOfChange: number, duration: number): number { 62 | return -amountOfChange * Math.cos(elapsed / duration * (Math.PI / 2)) + amountOfChange + initialValue; 63 | } 64 | 65 | export function easeOutSine(elapsed: number, initialValue: number, amountOfChange: number, duration: number): number { 66 | return amountOfChange * Math.sin(elapsed / duration * (Math.PI / 2)) + initialValue; 67 | } 68 | 69 | export function easeInOutSine(elapsed: number, initialValue: number, amountOfChange: number, duration: number): number { 70 | return -amountOfChange / 2 * (Math.cos(Math.PI * elapsed / duration) - 1) + initialValue; 71 | } 72 | 73 | export function easeInExpo(elapsed: number, initialValue: number, amountOfChange: number, duration: number): number { 74 | return elapsed === 0 ? initialValue : amountOfChange * Math.pow(2, 10 * (elapsed / duration - 1)) + initialValue; 75 | } 76 | 77 | export function easeOutExpo(elapsed: number, initialValue: number, amountOfChange: number, duration: number): number { 78 | return elapsed === duration 79 | ? initialValue + amountOfChange 80 | : amountOfChange * (-Math.pow(2, -10 * elapsed / duration) + 1) + initialValue; 81 | } 82 | 83 | export function easeInOutExpo(elapsed: number, initialValue: number, amountOfChange: number, duration: number): number { 84 | if (elapsed === 0) { 85 | return initialValue; 86 | } 87 | if (elapsed === duration) { 88 | return initialValue + amountOfChange; 89 | } 90 | if ((elapsed /= duration / 2) < 1) { 91 | return amountOfChange / 2 * Math.pow(2, 10 * (elapsed - 1)) + initialValue; 92 | } 93 | return amountOfChange / 2 * (-Math.pow(2, -10 * --elapsed) + 2) + initialValue; 94 | } 95 | 96 | export function easeInCirc(elapsed: number, initialValue: number, amountOfChange: number, duration: number): number { 97 | return -amountOfChange * (Math.sqrt(1 - (elapsed /= duration) * elapsed) - 1) + initialValue; 98 | } 99 | 100 | export function easeOutCirc(elapsed: number, initialValue: number, amountOfChange: number, duration: number): number { 101 | return amountOfChange * Math.sqrt(1 - (elapsed = elapsed / duration - 1) * elapsed) + initialValue; 102 | } 103 | 104 | export function easeInOutCirc(elapsed: number, initialValue: number, amountOfChange: number, duration: number): number { 105 | if ((elapsed /= duration / 2) < 1) { 106 | return -amountOfChange / 2 * (Math.sqrt(1 - elapsed * elapsed) - 1) + initialValue; 107 | } 108 | return amountOfChange / 2 * (Math.sqrt(1 - (elapsed -= 2) * elapsed) + 1) + initialValue; 109 | } 110 | 111 | export function easeInElastic(elapsed: number, initialValue: number, amountOfChange: number, duration: number): number { 112 | let s = 1.70158; 113 | let p = 0; 114 | let a = amountOfChange; 115 | if (elapsed === 0) { 116 | return initialValue; 117 | } 118 | if ((elapsed /= duration) === 1) { 119 | return initialValue + amountOfChange; 120 | } 121 | if (!p) { 122 | p = duration * 0.3; 123 | } 124 | if (a < Math.abs(amountOfChange)) { 125 | a = amountOfChange; 126 | s = p / 4; 127 | } else { 128 | s = p / (2 * Math.PI) * Math.asin(amountOfChange / a); 129 | } 130 | return -(a * Math.pow(2, 10 * (elapsed -= 1)) * Math.sin((elapsed * duration - s) * (2 * Math.PI) / p)) + initialValue; 131 | } 132 | 133 | export function easeOutElastic(elapsed: number, initialValue: number, amountOfChange: number, duration: number): number { 134 | let s = 1.70158; 135 | let p = 0; 136 | let a = amountOfChange; 137 | if (elapsed === 0) { 138 | return initialValue; 139 | } 140 | if ((elapsed /= duration) === 1) { 141 | return initialValue + amountOfChange; 142 | } 143 | if (!p) { 144 | p = duration * 0.3; 145 | } 146 | if (a < Math.abs(amountOfChange)) { 147 | a = amountOfChange; 148 | s = p / 4; 149 | } else { 150 | s = p / (2 * Math.PI) * Math.asin(amountOfChange / a); 151 | } 152 | return a * Math.pow(2, -10 * elapsed) * Math.sin((elapsed * duration - s) * (2 * Math.PI) / p) + amountOfChange + initialValue; 153 | } 154 | 155 | export function easeInOutElastic(elapsed: number, initialValue: number, amountOfChange: number, duration: number): number { 156 | let s = 1.70158; 157 | let p = 0; 158 | let a = amountOfChange; 159 | if (elapsed === 0) { 160 | return initialValue; 161 | } 162 | if ((elapsed /= duration / 2) === 2) { 163 | return initialValue + amountOfChange; 164 | } 165 | if (!p) { 166 | p = duration * (0.3 * 1.5); 167 | } 168 | if (a < Math.abs(amountOfChange)) { 169 | a = amountOfChange; 170 | s = p / 4; 171 | } else { 172 | s = p / (2 * Math.PI) * Math.asin(amountOfChange / a); 173 | } 174 | if (elapsed < 1) { 175 | return -0.5 * (a * Math.pow(2, 10 * (elapsed -= 1)) * Math.sin((elapsed * duration - s) * (2 * Math.PI) / p)) + initialValue; 176 | } 177 | return ( 178 | a * Math.pow(2, -10 * (elapsed -= 1)) * Math.sin((elapsed * duration - s) * (2 * Math.PI) / p) * 0.5 + amountOfChange + initialValue 179 | ); 180 | } 181 | 182 | export function easeInBack(elapsed: number, initialValue: number, amountOfChange: number, duration: number, s: number = 1.70158): number { 183 | return amountOfChange * (elapsed /= duration) * elapsed * ((s + 1) * elapsed - s) + initialValue; 184 | } 185 | 186 | export function easeOutBack(elapsed: number, initialValue: number, amountOfChange: number, duration: number, s: number = 1.70158): number { 187 | return amountOfChange * ((elapsed = elapsed / duration - 1) * elapsed * ((s + 1) * elapsed + s) + 1) + initialValue; 188 | } 189 | 190 | export function easeInOutBack( 191 | elapsed: number, 192 | initialValue: number, 193 | amountOfChange: number, 194 | duration: number, 195 | s: number = 1.70158 196 | ): number { 197 | if ((elapsed /= duration / 2) < 1) { 198 | return amountOfChange / 2 * (elapsed * elapsed * (((s *= 1.525) + 1) * elapsed - s)) + initialValue; 199 | } 200 | return amountOfChange / 2 * ((elapsed -= 2) * elapsed * (((s *= 1.525) + 1) * elapsed + s) + 2) + initialValue; 201 | } 202 | 203 | export function easeInBounce(elapsed: number, initialValue: number, amountOfChange: number, duration: number): number { 204 | return amountOfChange - easeOutBounce(duration - elapsed, 0, amountOfChange, duration) + initialValue; 205 | } 206 | 207 | export function easeOutBounce(elapsed: number, initialValue: number, amountOfChange: number, duration: number): number { 208 | if ((elapsed /= duration) < 1 / 2.75) { 209 | return amountOfChange * (7.5625 * elapsed * elapsed) + initialValue; 210 | } else if (elapsed < 2 / 2.75) { 211 | return amountOfChange * (7.5625 * (elapsed -= 1.5 / 2.75) * elapsed + 0.75) + initialValue; 212 | } else if (elapsed < 2.5 / 2.75) { 213 | return amountOfChange * (7.5625 * (elapsed -= 2.25 / 2.75) * elapsed + 0.9375) + initialValue; 214 | } else { 215 | return amountOfChange * (7.5625 * (elapsed -= 2.625 / 2.75) * elapsed + 0.984375) + initialValue; 216 | } 217 | } 218 | 219 | export function easeInOutBounce(elapsed: number, initialValue: number, amountOfChange: number, duration: number): number { 220 | if (elapsed < duration / 2) { 221 | return easeInBounce(elapsed * 2, 0, amountOfChange, duration) * 0.5 + initialValue; 222 | } 223 | return easeOutBounce(elapsed * 2 - duration, 0, amountOfChange, duration) * 0.5 + amountOfChange * 0.5 + initialValue; 224 | } 225 | -------------------------------------------------------------------------------- /tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "moduleResolution": "node", 4 | "module": "commonjs", 5 | "target": "ES5", 6 | "sourceMap": false, 7 | "experimentalDecorators": true, 8 | "noImplicitAny": false, 9 | "noImplicitThis": true, 10 | "strictNullChecks": true, 11 | "declaration": true, 12 | "lib": ["es2017.object", "es2015", "es2017", "dom"] 13 | }, 14 | "exclude": ["node_modules", "dist/"] 15 | } 16 | -------------------------------------------------------------------------------- /tslint.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": ["tslint-config-prettier"], 3 | "rulesDirectory": ["tslint-plugin-prettier"], 4 | "rules": { 5 | "arrow-return-shorthand": true, 6 | "callable-types": true, 7 | "class-name": true, 8 | "comment-format": [true, "check-space"], 9 | "curly": true, 10 | "eofline": true, 11 | "forin": true, 12 | "import-blacklist": [true, "rxjs"], 13 | "import-spacing": true, 14 | "indent": [true, "tabs"], 15 | "interface-over-type-literal": true, 16 | "label-position": true, 17 | "max-line-length": [true, 140], 18 | "member-access": false, 19 | "member-ordering": [ 20 | true, 21 | { 22 | "order": ["static-field", "instance-field", "static-method", "instance-method"] 23 | }, 24 | "variables-before-functions" 25 | ], 26 | "no-arg": true, 27 | "no-bitwise": true, 28 | "no-console": [true, "debug", "info", "time", "timeEnd", "trace"], 29 | "no-construct": true, 30 | "no-debugger": true, 31 | "no-duplicate-super": true, 32 | "no-duplicate-variable": true, 33 | "no-empty": false, 34 | "no-empty-interface": true, 35 | "no-eval": true, 36 | "no-misused-new": true, 37 | "no-non-null-assertion": true, 38 | "no-shadowed-variable": true, 39 | "no-string-literal": false, 40 | "no-string-throw": true, 41 | "no-switch-case-fall-through": true, 42 | "no-trailing-whitespace": true, 43 | "no-unnecessary-initializer": true, 44 | "no-unused-expression": true, 45 | "no-unused-variable": [true, "check-parameters"], 46 | "no-use-before-declare": true, 47 | "no-var-keyword": true, 48 | "object-literal-sort-keys": false, 49 | "one-line": [true, "check-open-brace", "check-catch", "check-else", "check-whitespace"], 50 | "prefer-const": true, 51 | "prettier": [ 52 | true, 53 | { 54 | "printWidth": 140, 55 | "useTabs": true, 56 | "singleQuote": true, 57 | "trailingComma": "es5" 58 | } 59 | ], 60 | "quotemark": [true, "single"], 61 | "radix": true, 62 | "semicolon": [true, "always"], 63 | "triple-equals": [true, "allow-null-check"], 64 | "typedef": [ 65 | true, 66 | "call-signature", 67 | "arrow-call-signature", 68 | "parameter", 69 | "arrow-parameter", 70 | "property-declaration", 71 | "member-variable-declaration" 72 | ], 73 | "typedef-whitespace": [ 74 | true, 75 | { 76 | "call-signature": "nospace", 77 | "index-signature": "nospace", 78 | "parameter": "nospace", 79 | "property-declaration": "nospace", 80 | "variable-declaration": "nospace" 81 | } 82 | ], 83 | "typeof-compare": true, 84 | "unified-signatures": true, 85 | "variable-name": false, 86 | "whitespace": [true, "check-branch", "check-decl", "check-operator", "check-separator", "check-type"] 87 | } 88 | } 89 | -------------------------------------------------------------------------------- /yarn.lock: -------------------------------------------------------------------------------- 1 | # THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY. 2 | # yarn lockfile v1 3 | 4 | 5 | ansi-escapes@^1.0.0: 6 | version "1.4.0" 7 | resolved "https://registry.yarnpkg.com/ansi-escapes/-/ansi-escapes-1.4.0.tgz#d3a8a83b319aa67793662b13e761c7911422306e" 8 | 9 | ansi-regex@^2.0.0: 10 | version "2.1.1" 11 | resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-2.1.1.tgz#c3b33ab5ee360d86e0e628f0468ae7ef27d654df" 12 | 13 | ansi-regex@^3.0.0: 14 | version "3.0.0" 15 | resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-3.0.0.tgz#ed0317c322064f79466c02966bddb605ab37d998" 16 | 17 | ansi-styles@^2.2.1: 18 | version "2.2.1" 19 | resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-2.2.1.tgz#b432dd3358b634cf75e1e4664368240533c1ddbe" 20 | 21 | ansi-styles@^3.1.0, ansi-styles@^3.2.0: 22 | version "3.2.0" 23 | resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-3.2.0.tgz#c159b8d5be0f9e5a6f346dab94f16ce022161b88" 24 | dependencies: 25 | color-convert "^1.9.0" 26 | 27 | any-observable@^0.2.0: 28 | version "0.2.0" 29 | resolved "https://registry.yarnpkg.com/any-observable/-/any-observable-0.2.0.tgz#c67870058003579009083f54ac0abafb5c33d242" 30 | 31 | app-root-path@^2.0.0: 32 | version "2.0.1" 33 | resolved "https://registry.yarnpkg.com/app-root-path/-/app-root-path-2.0.1.tgz#cd62dcf8e4fd5a417efc664d2e5b10653c651b46" 34 | 35 | argparse@^1.0.7: 36 | version "1.0.10" 37 | resolved "https://registry.yarnpkg.com/argparse/-/argparse-1.0.10.tgz#bcd6791ea5ae09725e17e5ad988134cd40b3d911" 38 | dependencies: 39 | sprintf-js "~1.0.2" 40 | 41 | babel-code-frame@^6.22.0: 42 | version "6.26.0" 43 | resolved "https://registry.yarnpkg.com/babel-code-frame/-/babel-code-frame-6.26.0.tgz#63fd43f7dc1e3bb7ce35947db8fe369a3f58c74b" 44 | dependencies: 45 | chalk "^1.1.3" 46 | esutils "^2.0.2" 47 | js-tokens "^3.0.2" 48 | 49 | balanced-match@^1.0.0: 50 | version "1.0.0" 51 | resolved "https://registry.yarnpkg.com/balanced-match/-/balanced-match-1.0.0.tgz#89b4d199ab2bee49de164ea02b89ce462d71b767" 52 | 53 | brace-expansion@^1.1.7: 54 | version "1.1.8" 55 | resolved "https://registry.yarnpkg.com/brace-expansion/-/brace-expansion-1.1.8.tgz#c07b211c7c952ec1f8efd51a77ef0d1d3990a292" 56 | dependencies: 57 | balanced-match "^1.0.0" 58 | concat-map "0.0.1" 59 | 60 | builtin-modules@^1.1.1: 61 | version "1.1.1" 62 | resolved "https://registry.yarnpkg.com/builtin-modules/-/builtin-modules-1.1.1.tgz#270f076c5a72c02f5b65a47df94c5fe3a278892f" 63 | 64 | chalk@^1.0.0, chalk@^1.1.1, chalk@^1.1.3: 65 | version "1.1.3" 66 | resolved "https://registry.yarnpkg.com/chalk/-/chalk-1.1.3.tgz#a8115c55e4a702fe4d150abd3872822a7e09fc98" 67 | dependencies: 68 | ansi-styles "^2.2.1" 69 | escape-string-regexp "^1.0.2" 70 | has-ansi "^2.0.0" 71 | strip-ansi "^3.0.0" 72 | supports-color "^2.0.0" 73 | 74 | chalk@^2.0.1, chalk@^2.1.0: 75 | version "2.3.0" 76 | resolved "https://registry.yarnpkg.com/chalk/-/chalk-2.3.0.tgz#b5ea48efc9c1793dccc9b4767c93914d3f2d52ba" 77 | dependencies: 78 | ansi-styles "^3.1.0" 79 | escape-string-regexp "^1.0.5" 80 | supports-color "^4.0.0" 81 | 82 | ci-info@^1.0.0: 83 | version "1.1.2" 84 | resolved "https://registry.yarnpkg.com/ci-info/-/ci-info-1.1.2.tgz#03561259db48d0474c8bdc90f5b47b068b6bbfb4" 85 | 86 | cli-cursor@^1.0.2: 87 | version "1.0.2" 88 | resolved "https://registry.yarnpkg.com/cli-cursor/-/cli-cursor-1.0.2.tgz#64da3f7d56a54412e59794bd62dc35295e8f2987" 89 | dependencies: 90 | restore-cursor "^1.0.1" 91 | 92 | cli-spinners@^0.1.2: 93 | version "0.1.2" 94 | resolved "https://registry.yarnpkg.com/cli-spinners/-/cli-spinners-0.1.2.tgz#bb764d88e185fb9e1e6a2a1f19772318f605e31c" 95 | 96 | cli-truncate@^0.2.1: 97 | version "0.2.1" 98 | resolved "https://registry.yarnpkg.com/cli-truncate/-/cli-truncate-0.2.1.tgz#9f15cfbb0705005369216c626ac7d05ab90dd574" 99 | dependencies: 100 | slice-ansi "0.0.4" 101 | string-width "^1.0.1" 102 | 103 | code-point-at@^1.0.0: 104 | version "1.1.0" 105 | resolved "https://registry.yarnpkg.com/code-point-at/-/code-point-at-1.1.0.tgz#0d070b4d043a5bea33a2f1a40e2edb3d9a4ccf77" 106 | 107 | color-convert@^1.9.0: 108 | version "1.9.1" 109 | resolved "https://registry.yarnpkg.com/color-convert/-/color-convert-1.9.1.tgz#c1261107aeb2f294ebffec9ed9ecad529a6097ed" 110 | dependencies: 111 | color-name "^1.1.1" 112 | 113 | color-name@^1.1.1: 114 | version "1.1.3" 115 | resolved "https://registry.yarnpkg.com/color-name/-/color-name-1.1.3.tgz#a7d0558bd89c42f795dd42328f740831ca53bc25" 116 | 117 | commander@^2.11.0, commander@^2.9.0: 118 | version "2.11.0" 119 | resolved "https://registry.yarnpkg.com/commander/-/commander-2.11.0.tgz#157152fd1e7a6c8d98a5b715cf376df928004563" 120 | 121 | concat-map@0.0.1: 122 | version "0.0.1" 123 | resolved "https://registry.yarnpkg.com/concat-map/-/concat-map-0.0.1.tgz#d8a96bd77fd68df7793a73036a3ba0d5405d477b" 124 | 125 | cosmiconfig@^3.1.0: 126 | version "3.1.0" 127 | resolved "https://registry.yarnpkg.com/cosmiconfig/-/cosmiconfig-3.1.0.tgz#640a94bf9847f321800403cd273af60665c73397" 128 | dependencies: 129 | is-directory "^0.3.1" 130 | js-yaml "^3.9.0" 131 | parse-json "^3.0.0" 132 | require-from-string "^2.0.1" 133 | 134 | cross-spawn@^5.0.1: 135 | version "5.1.0" 136 | resolved "https://registry.yarnpkg.com/cross-spawn/-/cross-spawn-5.1.0.tgz#e8bd0efee58fcff6f8f94510a0a554bbfa235449" 137 | dependencies: 138 | lru-cache "^4.0.1" 139 | shebang-command "^1.2.0" 140 | which "^1.2.9" 141 | 142 | date-fns@^1.27.2: 143 | version "1.29.0" 144 | resolved "https://registry.yarnpkg.com/date-fns/-/date-fns-1.29.0.tgz#12e609cdcb935127311d04d33334e2960a2a54e6" 145 | 146 | dedent@^0.7.0: 147 | version "0.7.0" 148 | resolved "https://registry.yarnpkg.com/dedent/-/dedent-0.7.0.tgz#2495ddbaf6eb874abb0e1be9df22d2e5a544326c" 149 | 150 | diff@^3.2.0: 151 | version "3.5.0" 152 | resolved "https://registry.yarnpkg.com/diff/-/diff-3.5.0.tgz#800c0dd1e0a8bfbc95835c202ad220fe317e5a12" 153 | 154 | elegant-spinner@^1.0.1: 155 | version "1.0.1" 156 | resolved "https://registry.yarnpkg.com/elegant-spinner/-/elegant-spinner-1.0.1.tgz#db043521c95d7e303fd8f345bedc3349cfb0729e" 157 | 158 | error-ex@^1.3.1: 159 | version "1.3.1" 160 | resolved "https://registry.yarnpkg.com/error-ex/-/error-ex-1.3.1.tgz#f855a86ce61adc4e8621c3cda21e7a7612c3a8dc" 161 | dependencies: 162 | is-arrayish "^0.2.1" 163 | 164 | escape-string-regexp@^1.0.2, escape-string-regexp@^1.0.5: 165 | version "1.0.5" 166 | resolved "https://registry.yarnpkg.com/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz#1b61c0562190a8dff6ae3bb2cf0200ca130b86d4" 167 | 168 | eslint-plugin-prettier@^2.2.0: 169 | version "2.3.1" 170 | resolved "https://registry.yarnpkg.com/eslint-plugin-prettier/-/eslint-plugin-prettier-2.3.1.tgz#e7a746c67e716f335274b88295a9ead9f544e44d" 171 | dependencies: 172 | fast-diff "^1.1.1" 173 | jest-docblock "^21.0.0" 174 | 175 | esprima@^4.0.0: 176 | version "4.0.1" 177 | resolved "https://registry.yarnpkg.com/esprima/-/esprima-4.0.1.tgz#13b04cdb3e6c5d19df91ab6987a8695619b0aa71" 178 | 179 | esutils@^2.0.2: 180 | version "2.0.2" 181 | resolved "https://registry.yarnpkg.com/esutils/-/esutils-2.0.2.tgz#0abf4f1caa5bcb1f7a9d8acc6dea4faaa04bac9b" 182 | 183 | execa@^0.8.0: 184 | version "0.8.0" 185 | resolved "https://registry.yarnpkg.com/execa/-/execa-0.8.0.tgz#d8d76bbc1b55217ed190fd6dd49d3c774ecfc8da" 186 | dependencies: 187 | cross-spawn "^5.0.1" 188 | get-stream "^3.0.0" 189 | is-stream "^1.1.0" 190 | npm-run-path "^2.0.0" 191 | p-finally "^1.0.0" 192 | signal-exit "^3.0.0" 193 | strip-eof "^1.0.0" 194 | 195 | exit-hook@^1.0.0: 196 | version "1.1.1" 197 | resolved "https://registry.yarnpkg.com/exit-hook/-/exit-hook-1.1.1.tgz#f05ca233b48c05d54fff07765df8507e95c02ff8" 198 | 199 | fast-diff@^1.1.1: 200 | version "1.1.2" 201 | resolved "https://registry.yarnpkg.com/fast-diff/-/fast-diff-1.1.2.tgz#4b62c42b8e03de3f848460b639079920695d0154" 202 | 203 | figures@^1.7.0: 204 | version "1.7.0" 205 | resolved "https://registry.yarnpkg.com/figures/-/figures-1.7.0.tgz#cbe1e3affcf1cd44b80cadfed28dc793a9701d2e" 206 | dependencies: 207 | escape-string-regexp "^1.0.5" 208 | object-assign "^4.1.0" 209 | 210 | find-parent-dir@^0.3.0: 211 | version "0.3.0" 212 | resolved "https://registry.yarnpkg.com/find-parent-dir/-/find-parent-dir-0.3.0.tgz#33c44b429ab2b2f0646299c5f9f718f376ff8d54" 213 | 214 | fs.realpath@^1.0.0: 215 | version "1.0.0" 216 | resolved "https://registry.yarnpkg.com/fs.realpath/-/fs.realpath-1.0.0.tgz#1504ad2523158caa40db4a2787cb01411994ea4f" 217 | 218 | get-own-enumerable-property-symbols@^2.0.1: 219 | version "2.0.1" 220 | resolved "https://registry.yarnpkg.com/get-own-enumerable-property-symbols/-/get-own-enumerable-property-symbols-2.0.1.tgz#5c4ad87f2834c4b9b4e84549dc1e0650fb38c24b" 221 | 222 | get-stream@^3.0.0: 223 | version "3.0.0" 224 | resolved "https://registry.yarnpkg.com/get-stream/-/get-stream-3.0.0.tgz#8e943d1358dc37555054ecbe2edb05aa174ede14" 225 | 226 | glob@^7.1.1: 227 | version "7.1.2" 228 | resolved "https://registry.yarnpkg.com/glob/-/glob-7.1.2.tgz#c19c9df9a028702d678612384a6552404c636d15" 229 | dependencies: 230 | fs.realpath "^1.0.0" 231 | inflight "^1.0.4" 232 | inherits "2" 233 | minimatch "^3.0.4" 234 | once "^1.3.0" 235 | path-is-absolute "^1.0.0" 236 | 237 | has-ansi@^2.0.0: 238 | version "2.0.0" 239 | resolved "https://registry.yarnpkg.com/has-ansi/-/has-ansi-2.0.0.tgz#34f5049ce1ecdf2b0649af3ef24e45ed35416d91" 240 | dependencies: 241 | ansi-regex "^2.0.0" 242 | 243 | has-flag@^2.0.0: 244 | version "2.0.0" 245 | resolved "https://registry.yarnpkg.com/has-flag/-/has-flag-2.0.0.tgz#e8207af1cc7b30d446cc70b734b5e8be18f88d51" 246 | 247 | husky@^0.14.3: 248 | version "0.14.3" 249 | resolved "https://registry.yarnpkg.com/husky/-/husky-0.14.3.tgz#c69ed74e2d2779769a17ba8399b54ce0b63c12c3" 250 | dependencies: 251 | is-ci "^1.0.10" 252 | normalize-path "^1.0.0" 253 | strip-indent "^2.0.0" 254 | 255 | indent-string@^2.1.0: 256 | version "2.1.0" 257 | resolved "https://registry.yarnpkg.com/indent-string/-/indent-string-2.1.0.tgz#8e2d48348742121b4a8218b7a137e9a52049dc80" 258 | dependencies: 259 | repeating "^2.0.0" 260 | 261 | indent-string@^3.0.0: 262 | version "3.2.0" 263 | resolved "https://registry.yarnpkg.com/indent-string/-/indent-string-3.2.0.tgz#4a5fd6d27cc332f37e5419a504dbb837105c9289" 264 | 265 | inflight@^1.0.4: 266 | version "1.0.6" 267 | resolved "https://registry.yarnpkg.com/inflight/-/inflight-1.0.6.tgz#49bd6331d7d02d0c09bc910a1075ba8165b56df9" 268 | dependencies: 269 | once "^1.3.0" 270 | wrappy "1" 271 | 272 | inherits@2: 273 | version "2.0.3" 274 | resolved "https://registry.yarnpkg.com/inherits/-/inherits-2.0.3.tgz#633c2c83e3da42a502f52466022480f4208261de" 275 | 276 | is-arrayish@^0.2.1: 277 | version "0.2.1" 278 | resolved "https://registry.yarnpkg.com/is-arrayish/-/is-arrayish-0.2.1.tgz#77c99840527aa8ecb1a8ba697b80645a7a926a9d" 279 | 280 | is-ci@^1.0.10: 281 | version "1.0.10" 282 | resolved "https://registry.yarnpkg.com/is-ci/-/is-ci-1.0.10.tgz#f739336b2632365061a9d48270cd56ae3369318e" 283 | dependencies: 284 | ci-info "^1.0.0" 285 | 286 | is-directory@^0.3.1: 287 | version "0.3.1" 288 | resolved "https://registry.yarnpkg.com/is-directory/-/is-directory-0.3.1.tgz#61339b6f2475fc772fd9c9d83f5c8575dc154ae1" 289 | 290 | is-extglob@^2.1.1: 291 | version "2.1.1" 292 | resolved "https://registry.yarnpkg.com/is-extglob/-/is-extglob-2.1.1.tgz#a88c02535791f02ed37c76a1b9ea9773c833f8c2" 293 | 294 | is-finite@^1.0.0: 295 | version "1.0.2" 296 | resolved "https://registry.yarnpkg.com/is-finite/-/is-finite-1.0.2.tgz#cc6677695602be550ef11e8b4aa6305342b6d0aa" 297 | dependencies: 298 | number-is-nan "^1.0.0" 299 | 300 | is-fullwidth-code-point@^1.0.0: 301 | version "1.0.0" 302 | resolved "https://registry.yarnpkg.com/is-fullwidth-code-point/-/is-fullwidth-code-point-1.0.0.tgz#ef9e31386f031a7f0d643af82fde50c457ef00cb" 303 | dependencies: 304 | number-is-nan "^1.0.0" 305 | 306 | is-glob@^4.0.0: 307 | version "4.0.0" 308 | resolved "https://registry.yarnpkg.com/is-glob/-/is-glob-4.0.0.tgz#9521c76845cc2610a85203ddf080a958c2ffabc0" 309 | dependencies: 310 | is-extglob "^2.1.1" 311 | 312 | is-obj@^1.0.1: 313 | version "1.0.1" 314 | resolved "https://registry.yarnpkg.com/is-obj/-/is-obj-1.0.1.tgz#3e4729ac1f5fde025cd7d83a896dab9f4f67db0f" 315 | 316 | is-observable@^0.2.0: 317 | version "0.2.0" 318 | resolved "https://registry.yarnpkg.com/is-observable/-/is-observable-0.2.0.tgz#b361311d83c6e5d726cabf5e250b0237106f5ae2" 319 | dependencies: 320 | symbol-observable "^0.2.2" 321 | 322 | is-promise@^2.1.0: 323 | version "2.1.0" 324 | resolved "https://registry.yarnpkg.com/is-promise/-/is-promise-2.1.0.tgz#79a2a9ece7f096e80f36d2b2f3bc16c1ff4bf3fa" 325 | 326 | is-regexp@^1.0.0: 327 | version "1.0.0" 328 | resolved "https://registry.yarnpkg.com/is-regexp/-/is-regexp-1.0.0.tgz#fd2d883545c46bac5a633e7b9a09e87fa2cb5069" 329 | 330 | is-stream@^1.1.0: 331 | version "1.1.0" 332 | resolved "https://registry.yarnpkg.com/is-stream/-/is-stream-1.1.0.tgz#12d4a3dd4e68e0b79ceb8dbc84173ae80d91ca44" 333 | 334 | isexe@^2.0.0: 335 | version "2.0.0" 336 | resolved "https://registry.yarnpkg.com/isexe/-/isexe-2.0.0.tgz#e8fbf374dc556ff8947a10dcb0572d633f2cfa10" 337 | 338 | jest-docblock@^21.0.0: 339 | version "21.2.0" 340 | resolved "https://registry.yarnpkg.com/jest-docblock/-/jest-docblock-21.2.0.tgz#51529c3b30d5fd159da60c27ceedc195faf8d414" 341 | 342 | jest-get-type@^21.2.0: 343 | version "21.2.0" 344 | resolved "https://registry.yarnpkg.com/jest-get-type/-/jest-get-type-21.2.0.tgz#f6376ab9db4b60d81e39f30749c6c466f40d4a23" 345 | 346 | jest-validate@^21.1.0: 347 | version "21.2.1" 348 | resolved "https://registry.yarnpkg.com/jest-validate/-/jest-validate-21.2.1.tgz#cc0cbca653cd54937ba4f2a111796774530dd3c7" 349 | dependencies: 350 | chalk "^2.0.1" 351 | jest-get-type "^21.2.0" 352 | leven "^2.1.0" 353 | pretty-format "^21.2.1" 354 | 355 | js-tokens@^3.0.2: 356 | version "3.0.2" 357 | resolved "https://registry.yarnpkg.com/js-tokens/-/js-tokens-3.0.2.tgz#9866df395102130e38f7f996bceb65443209c25b" 358 | 359 | js-yaml@^3.9.0: 360 | version "3.13.1" 361 | resolved "https://registry.yarnpkg.com/js-yaml/-/js-yaml-3.13.1.tgz#aff151b30bfdfa8e49e05da22e7415e9dfa37847" 362 | dependencies: 363 | argparse "^1.0.7" 364 | esprima "^4.0.0" 365 | 366 | leven@^2.1.0: 367 | version "2.1.0" 368 | resolved "https://registry.yarnpkg.com/leven/-/leven-2.1.0.tgz#c2e7a9f772094dee9d34202ae8acce4687875580" 369 | 370 | lint-staged@^5.0.0: 371 | version "5.0.0" 372 | resolved "https://registry.yarnpkg.com/lint-staged/-/lint-staged-5.0.0.tgz#f1c670e03e2fdf3f3d0eb81f72d3bcf658770e54" 373 | dependencies: 374 | app-root-path "^2.0.0" 375 | chalk "^2.1.0" 376 | commander "^2.11.0" 377 | cosmiconfig "^3.1.0" 378 | dedent "^0.7.0" 379 | execa "^0.8.0" 380 | find-parent-dir "^0.3.0" 381 | is-glob "^4.0.0" 382 | jest-validate "^21.1.0" 383 | listr "^0.13.0" 384 | lodash "^4.17.4" 385 | log-symbols "^2.0.0" 386 | minimatch "^3.0.0" 387 | npm-which "^3.0.1" 388 | p-map "^1.1.1" 389 | path-is-inside "^1.0.2" 390 | pify "^3.0.0" 391 | staged-git-files "0.0.4" 392 | stringify-object "^3.2.0" 393 | 394 | listr-silent-renderer@^1.1.1: 395 | version "1.1.1" 396 | resolved "https://registry.yarnpkg.com/listr-silent-renderer/-/listr-silent-renderer-1.1.1.tgz#924b5a3757153770bf1a8e3fbf74b8bbf3f9242e" 397 | 398 | listr-update-renderer@^0.4.0: 399 | version "0.4.0" 400 | resolved "https://registry.yarnpkg.com/listr-update-renderer/-/listr-update-renderer-0.4.0.tgz#344d980da2ca2e8b145ba305908f32ae3f4cc8a7" 401 | dependencies: 402 | chalk "^1.1.3" 403 | cli-truncate "^0.2.1" 404 | elegant-spinner "^1.0.1" 405 | figures "^1.7.0" 406 | indent-string "^3.0.0" 407 | log-symbols "^1.0.2" 408 | log-update "^1.0.2" 409 | strip-ansi "^3.0.1" 410 | 411 | listr-verbose-renderer@^0.4.0: 412 | version "0.4.1" 413 | resolved "https://registry.yarnpkg.com/listr-verbose-renderer/-/listr-verbose-renderer-0.4.1.tgz#8206f4cf6d52ddc5827e5fd14989e0e965933a35" 414 | dependencies: 415 | chalk "^1.1.3" 416 | cli-cursor "^1.0.2" 417 | date-fns "^1.27.2" 418 | figures "^1.7.0" 419 | 420 | listr@^0.13.0: 421 | version "0.13.0" 422 | resolved "https://registry.yarnpkg.com/listr/-/listr-0.13.0.tgz#20bb0ba30bae660ee84cc0503df4be3d5623887d" 423 | dependencies: 424 | chalk "^1.1.3" 425 | cli-truncate "^0.2.1" 426 | figures "^1.7.0" 427 | indent-string "^2.1.0" 428 | is-observable "^0.2.0" 429 | is-promise "^2.1.0" 430 | is-stream "^1.1.0" 431 | listr-silent-renderer "^1.1.1" 432 | listr-update-renderer "^0.4.0" 433 | listr-verbose-renderer "^0.4.0" 434 | log-symbols "^1.0.2" 435 | log-update "^1.0.2" 436 | ora "^0.2.3" 437 | p-map "^1.1.1" 438 | rxjs "^5.4.2" 439 | stream-to-observable "^0.2.0" 440 | strip-ansi "^3.0.1" 441 | 442 | lodash@^4.17.4: 443 | version "4.17.21" 444 | resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.21.tgz#679591c564c3bffaae8454cf0b3df370c3d6911c" 445 | 446 | log-symbols@^1.0.2: 447 | version "1.0.2" 448 | resolved "https://registry.yarnpkg.com/log-symbols/-/log-symbols-1.0.2.tgz#376ff7b58ea3086a0f09facc74617eca501e1a18" 449 | dependencies: 450 | chalk "^1.0.0" 451 | 452 | log-symbols@^2.0.0: 453 | version "2.1.0" 454 | resolved "https://registry.yarnpkg.com/log-symbols/-/log-symbols-2.1.0.tgz#f35fa60e278832b538dc4dddcbb478a45d3e3be6" 455 | dependencies: 456 | chalk "^2.0.1" 457 | 458 | log-update@^1.0.2: 459 | version "1.0.2" 460 | resolved "https://registry.yarnpkg.com/log-update/-/log-update-1.0.2.tgz#19929f64c4093d2d2e7075a1dad8af59c296b8d1" 461 | dependencies: 462 | ansi-escapes "^1.0.0" 463 | cli-cursor "^1.0.2" 464 | 465 | lru-cache@^4.0.1: 466 | version "4.1.1" 467 | resolved "https://registry.yarnpkg.com/lru-cache/-/lru-cache-4.1.1.tgz#622e32e82488b49279114a4f9ecf45e7cd6bba55" 468 | dependencies: 469 | pseudomap "^1.0.2" 470 | yallist "^2.1.2" 471 | 472 | minimatch@^3.0.0, minimatch@^3.0.4: 473 | version "3.0.4" 474 | resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-3.0.4.tgz#5166e286457f03306064be5497e8dbb0c3d32083" 475 | dependencies: 476 | brace-expansion "^1.1.7" 477 | 478 | normalize-path@^1.0.0: 479 | version "1.0.0" 480 | resolved "https://registry.yarnpkg.com/normalize-path/-/normalize-path-1.0.0.tgz#32d0e472f91ff345701c15a8311018d3b0a90379" 481 | 482 | npm-path@^2.0.2: 483 | version "2.0.3" 484 | resolved "https://registry.yarnpkg.com/npm-path/-/npm-path-2.0.3.tgz#15cff4e1c89a38da77f56f6055b24f975dfb2bbe" 485 | dependencies: 486 | which "^1.2.10" 487 | 488 | npm-run-path@^2.0.0: 489 | version "2.0.2" 490 | resolved "https://registry.yarnpkg.com/npm-run-path/-/npm-run-path-2.0.2.tgz#35a9232dfa35d7067b4cb2ddf2357b1871536c5f" 491 | dependencies: 492 | path-key "^2.0.0" 493 | 494 | npm-which@^3.0.1: 495 | version "3.0.1" 496 | resolved "https://registry.yarnpkg.com/npm-which/-/npm-which-3.0.1.tgz#9225f26ec3a285c209cae67c3b11a6b4ab7140aa" 497 | dependencies: 498 | commander "^2.9.0" 499 | npm-path "^2.0.2" 500 | which "^1.2.10" 501 | 502 | number-is-nan@^1.0.0: 503 | version "1.0.1" 504 | resolved "https://registry.yarnpkg.com/number-is-nan/-/number-is-nan-1.0.1.tgz#097b602b53422a522c1afb8790318336941a011d" 505 | 506 | object-assign@^4.0.1, object-assign@^4.1.0: 507 | version "4.1.1" 508 | resolved "https://registry.yarnpkg.com/object-assign/-/object-assign-4.1.1.tgz#2109adc7965887cfc05cbbd442cac8bfbb360863" 509 | 510 | once@^1.3.0: 511 | version "1.4.0" 512 | resolved "https://registry.yarnpkg.com/once/-/once-1.4.0.tgz#583b1aa775961d4b113ac17d9c50baef9dd76bd1" 513 | dependencies: 514 | wrappy "1" 515 | 516 | onetime@^1.0.0: 517 | version "1.1.0" 518 | resolved "https://registry.yarnpkg.com/onetime/-/onetime-1.1.0.tgz#a1f7838f8314c516f05ecefcbc4ccfe04b4ed789" 519 | 520 | ora@^0.2.3: 521 | version "0.2.3" 522 | resolved "https://registry.yarnpkg.com/ora/-/ora-0.2.3.tgz#37527d220adcd53c39b73571d754156d5db657a4" 523 | dependencies: 524 | chalk "^1.1.1" 525 | cli-cursor "^1.0.2" 526 | cli-spinners "^0.1.2" 527 | object-assign "^4.0.1" 528 | 529 | p-finally@^1.0.0: 530 | version "1.0.0" 531 | resolved "https://registry.yarnpkg.com/p-finally/-/p-finally-1.0.0.tgz#3fbcfb15b899a44123b34b6dcc18b724336a2cae" 532 | 533 | p-map@^1.1.1: 534 | version "1.2.0" 535 | resolved "https://registry.yarnpkg.com/p-map/-/p-map-1.2.0.tgz#e4e94f311eabbc8633a1e79908165fca26241b6b" 536 | 537 | parse-json@^3.0.0: 538 | version "3.0.0" 539 | resolved "https://registry.yarnpkg.com/parse-json/-/parse-json-3.0.0.tgz#fa6f47b18e23826ead32f263e744d0e1e847fb13" 540 | dependencies: 541 | error-ex "^1.3.1" 542 | 543 | path-is-absolute@^1.0.0: 544 | version "1.0.1" 545 | resolved "https://registry.yarnpkg.com/path-is-absolute/-/path-is-absolute-1.0.1.tgz#174b9268735534ffbc7ace6bf53a5a9e1b5c5f5f" 546 | 547 | path-is-inside@^1.0.2: 548 | version "1.0.2" 549 | resolved "https://registry.yarnpkg.com/path-is-inside/-/path-is-inside-1.0.2.tgz#365417dede44430d1c11af61027facf074bdfc53" 550 | 551 | path-key@^2.0.0: 552 | version "2.0.1" 553 | resolved "https://registry.yarnpkg.com/path-key/-/path-key-2.0.1.tgz#411cadb574c5a140d3a4b1910d40d80cc9f40b40" 554 | 555 | path-parse@^1.0.5: 556 | version "1.0.7" 557 | resolved "https://registry.yarnpkg.com/path-parse/-/path-parse-1.0.7.tgz#fbc114b60ca42b30d9daf5858e4bd68bbedb6735" 558 | 559 | pify@^3.0.0: 560 | version "3.0.0" 561 | resolved "https://registry.yarnpkg.com/pify/-/pify-3.0.0.tgz#e5a4acd2c101fdf3d9a4d07f0dbc4db49dd28176" 562 | 563 | prettier@^1.8.2: 564 | version "1.8.2" 565 | resolved "https://registry.yarnpkg.com/prettier/-/prettier-1.8.2.tgz#bff83e7fd573933c607875e5ba3abbdffb96aeb8" 566 | 567 | pretty-format@^21.2.1: 568 | version "21.2.1" 569 | resolved "https://registry.yarnpkg.com/pretty-format/-/pretty-format-21.2.1.tgz#ae5407f3cf21066cd011aa1ba5fce7b6a2eddb36" 570 | dependencies: 571 | ansi-regex "^3.0.0" 572 | ansi-styles "^3.2.0" 573 | 574 | pseudomap@^1.0.2: 575 | version "1.0.2" 576 | resolved "https://registry.yarnpkg.com/pseudomap/-/pseudomap-1.0.2.tgz#f052a28da70e618917ef0a8ac34c1ae5a68286b3" 577 | 578 | repeating@^2.0.0: 579 | version "2.0.1" 580 | resolved "https://registry.yarnpkg.com/repeating/-/repeating-2.0.1.tgz#5214c53a926d3552707527fbab415dbc08d06dda" 581 | dependencies: 582 | is-finite "^1.0.0" 583 | 584 | require-from-string@^2.0.1: 585 | version "2.0.1" 586 | resolved "https://registry.yarnpkg.com/require-from-string/-/require-from-string-2.0.1.tgz#c545233e9d7da6616e9d59adfb39fc9f588676ff" 587 | 588 | resolve@^1.3.2: 589 | version "1.5.0" 590 | resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.5.0.tgz#1f09acce796c9a762579f31b2c1cc4c3cddf9f36" 591 | dependencies: 592 | path-parse "^1.0.5" 593 | 594 | restore-cursor@^1.0.1: 595 | version "1.0.1" 596 | resolved "https://registry.yarnpkg.com/restore-cursor/-/restore-cursor-1.0.1.tgz#34661f46886327fed2991479152252df92daa541" 597 | dependencies: 598 | exit-hook "^1.0.0" 599 | onetime "^1.0.0" 600 | 601 | rxjs@^5.4.2: 602 | version "5.5.2" 603 | resolved "https://registry.yarnpkg.com/rxjs/-/rxjs-5.5.2.tgz#28d403f0071121967f18ad665563255d54236ac3" 604 | dependencies: 605 | symbol-observable "^1.0.1" 606 | 607 | semver@^5.3.0: 608 | version "5.7.2" 609 | resolved "https://registry.yarnpkg.com/semver/-/semver-5.7.2.tgz#48d55db737c3287cd4835e17fa13feace1c41ef8" 610 | 611 | shebang-command@^1.2.0: 612 | version "1.2.0" 613 | resolved "https://registry.yarnpkg.com/shebang-command/-/shebang-command-1.2.0.tgz#44aac65b695b03398968c39f363fee5deafdf1ea" 614 | dependencies: 615 | shebang-regex "^1.0.0" 616 | 617 | shebang-regex@^1.0.0: 618 | version "1.0.0" 619 | resolved "https://registry.yarnpkg.com/shebang-regex/-/shebang-regex-1.0.0.tgz#da42f49740c0b42db2ca9728571cb190c98efea3" 620 | 621 | signal-exit@^3.0.0: 622 | version "3.0.2" 623 | resolved "https://registry.yarnpkg.com/signal-exit/-/signal-exit-3.0.2.tgz#b5fdc08f1287ea1178628e415e25132b73646c6d" 624 | 625 | slice-ansi@0.0.4: 626 | version "0.0.4" 627 | resolved "https://registry.yarnpkg.com/slice-ansi/-/slice-ansi-0.0.4.tgz#edbf8903f66f7ce2f8eafd6ceed65e264c831b35" 628 | 629 | sprintf-js@~1.0.2: 630 | version "1.0.3" 631 | resolved "https://registry.yarnpkg.com/sprintf-js/-/sprintf-js-1.0.3.tgz#04e6926f662895354f3dd015203633b857297e2c" 632 | 633 | staged-git-files@0.0.4: 634 | version "0.0.4" 635 | resolved "https://registry.yarnpkg.com/staged-git-files/-/staged-git-files-0.0.4.tgz#d797e1b551ca7a639dec0237dc6eb4bb9be17d35" 636 | 637 | stream-to-observable@^0.2.0: 638 | version "0.2.0" 639 | resolved "https://registry.yarnpkg.com/stream-to-observable/-/stream-to-observable-0.2.0.tgz#59d6ea393d87c2c0ddac10aa0d561bc6ba6f0e10" 640 | dependencies: 641 | any-observable "^0.2.0" 642 | 643 | string-width@^1.0.1: 644 | version "1.0.2" 645 | resolved "https://registry.yarnpkg.com/string-width/-/string-width-1.0.2.tgz#118bdf5b8cdc51a2a7e70d211e07e2b0b9b107d3" 646 | dependencies: 647 | code-point-at "^1.0.0" 648 | is-fullwidth-code-point "^1.0.0" 649 | strip-ansi "^3.0.0" 650 | 651 | stringify-object@^3.2.0: 652 | version "3.2.1" 653 | resolved "https://registry.yarnpkg.com/stringify-object/-/stringify-object-3.2.1.tgz#2720c2eff940854c819f6ee252aaeb581f30624d" 654 | dependencies: 655 | get-own-enumerable-property-symbols "^2.0.1" 656 | is-obj "^1.0.1" 657 | is-regexp "^1.0.0" 658 | 659 | strip-ansi@^3.0.0, strip-ansi@^3.0.1: 660 | version "3.0.1" 661 | resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-3.0.1.tgz#6a385fb8853d952d5ff05d0e8aaf94278dc63dcf" 662 | dependencies: 663 | ansi-regex "^2.0.0" 664 | 665 | strip-eof@^1.0.0: 666 | version "1.0.0" 667 | resolved "https://registry.yarnpkg.com/strip-eof/-/strip-eof-1.0.0.tgz#bb43ff5598a6eb05d89b59fcd129c983313606bf" 668 | 669 | strip-indent@^2.0.0: 670 | version "2.0.0" 671 | resolved "https://registry.yarnpkg.com/strip-indent/-/strip-indent-2.0.0.tgz#5ef8db295d01e6ed6cbf7aab96998d7822527b68" 672 | 673 | supports-color@^2.0.0: 674 | version "2.0.0" 675 | resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-2.0.0.tgz#535d045ce6b6363fa40117084629995e9df324c7" 676 | 677 | supports-color@^4.0.0: 678 | version "4.5.0" 679 | resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-4.5.0.tgz#be7a0de484dec5c5cddf8b3d59125044912f635b" 680 | dependencies: 681 | has-flag "^2.0.0" 682 | 683 | symbol-observable@^0.2.2: 684 | version "0.2.4" 685 | resolved "https://registry.yarnpkg.com/symbol-observable/-/symbol-observable-0.2.4.tgz#95a83db26186d6af7e7a18dbd9760a2f86d08f40" 686 | 687 | symbol-observable@^1.0.1: 688 | version "1.0.4" 689 | resolved "https://registry.yarnpkg.com/symbol-observable/-/symbol-observable-1.0.4.tgz#29bf615d4aa7121bdd898b22d4b3f9bc4e2aa03d" 690 | 691 | tslib@^1.7.1: 692 | version "1.8.0" 693 | resolved "https://registry.yarnpkg.com/tslib/-/tslib-1.8.0.tgz#dc604ebad64bcbf696d613da6c954aa0e7ea1eb6" 694 | 695 | tslint-config-prettier@^1.6.0: 696 | version "1.6.0" 697 | resolved "https://registry.yarnpkg.com/tslint-config-prettier/-/tslint-config-prettier-1.6.0.tgz#fec1ee8fb07e8f033c63fed6b135af997f31962a" 698 | 699 | tslint-plugin-prettier@^1.3.0: 700 | version "1.3.0" 701 | resolved "https://registry.yarnpkg.com/tslint-plugin-prettier/-/tslint-plugin-prettier-1.3.0.tgz#7eb65d19ea786a859501a42491b78c5de2031a3f" 702 | dependencies: 703 | eslint-plugin-prettier "^2.2.0" 704 | tslib "^1.7.1" 705 | 706 | tslint@^5.8.0: 707 | version "5.8.0" 708 | resolved "https://registry.yarnpkg.com/tslint/-/tslint-5.8.0.tgz#1f49ad5b2e77c76c3af4ddcae552ae4e3612eb13" 709 | dependencies: 710 | babel-code-frame "^6.22.0" 711 | builtin-modules "^1.1.1" 712 | chalk "^2.1.0" 713 | commander "^2.9.0" 714 | diff "^3.2.0" 715 | glob "^7.1.1" 716 | minimatch "^3.0.4" 717 | resolve "^1.3.2" 718 | semver "^5.3.0" 719 | tslib "^1.7.1" 720 | tsutils "^2.12.1" 721 | 722 | tsutils@^2.12.1: 723 | version "2.12.2" 724 | resolved "https://registry.yarnpkg.com/tsutils/-/tsutils-2.12.2.tgz#ad58a4865d17ec3ddb6631b6ca53be14a5656ff3" 725 | dependencies: 726 | tslib "^1.7.1" 727 | 728 | typescript@^2.6.1: 729 | version "2.6.1" 730 | resolved "https://registry.yarnpkg.com/typescript/-/typescript-2.6.1.tgz#ef39cdea27abac0b500242d6726ab90e0c846631" 731 | 732 | which@^1.2.10, which@^1.2.9: 733 | version "1.3.0" 734 | resolved "https://registry.yarnpkg.com/which/-/which-1.3.0.tgz#ff04bdfc010ee547d780bec38e1ac1c2777d253a" 735 | dependencies: 736 | isexe "^2.0.0" 737 | 738 | wrappy@1: 739 | version "1.0.2" 740 | resolved "https://registry.yarnpkg.com/wrappy/-/wrappy-1.0.2.tgz#b5243d8f3ec1aa35f1364605bc0d1036e30ab69f" 741 | 742 | yallist@^2.1.2: 743 | version "2.1.2" 744 | resolved "https://registry.yarnpkg.com/yallist/-/yallist-2.1.2.tgz#1c11f9218f076089a47dd512f93c6699a6a81d52" 745 | --------------------------------------------------------------------------------