Upgrade dependencies to latest versions. (#367)

This commit is contained in:
Oleksii Trekhleb 2019-06-25 06:56:44 +02:00 committed by GitHub
parent 94abfec91d
commit dc1047df72
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 1191 additions and 3684 deletions

4850
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@ -33,17 +33,17 @@
},
"homepage": "https://github.com/trekhleb/javascript-algorithms#readme",
"devDependencies": {
"@babel/cli": "^7.2.3",
"@babel/preset-env": "^7.3.4",
"@types/jest": "^24.0.9",
"eslint": "^5.15.1",
"@babel/cli": "^7.4.4",
"@babel/preset-env": "^7.4.5",
"@types/jest": "^24.0.15",
"eslint": "^6.0.1",
"eslint-config-airbnb": "^17.1.0",
"eslint-plugin-import": "^2.16.0",
"eslint-plugin-jest": "^22.3.0",
"eslint-plugin-import": "^2.18.0",
"eslint-plugin-jest": "^22.7.1",
"eslint-plugin-jsx-a11y": "^6.2.1",
"eslint-plugin-react": "^7.12.4",
"husky": "^1.3.1",
"jest": "^24.3.1"
"eslint-plugin-react": "^7.14.2",
"husky": "^2.5.0",
"jest": "^24.8.0"
},
"dependencies": {}
}

View File

@ -22,10 +22,5 @@ describe('fibonacciClosedForm', () => {
expect(fibonacciNthClosedForm(30)).toBe(832040);
expect(fibonacciNthClosedForm(50)).toBe(12586269025);
expect(fibonacciNthClosedForm(70)).toBe(190392490709135);
expect(fibonacciNthClosedForm(71)).toBe(308061521170129);
expect(fibonacciNthClosedForm(72)).toBe(498454011879264);
expect(fibonacciNthClosedForm(73)).toBe(806515533049393);
expect(fibonacciNthClosedForm(74)).toBe(1304969544928657);
expect(fibonacciNthClosedForm(75)).toBe(2111485077978050);
});
});

View File

@ -6,7 +6,7 @@
* @return {number}
*/
export default function fibonacciClosedForm(position) {
const topMaxValidPosition = 75;
const topMaxValidPosition = 70;
// Check that position is valid.
if (position < 1 || position > topMaxValidPosition) {