Skip to content

Commit 18cffeb

Browse files
committed
Revert "update cloning link"
This reverts commit 4c771f2.
1 parent 60fe6c8 commit 18cffeb

File tree

1,791 files changed

+7747
-138307
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

1,791 files changed

+7747
-138307
lines changed

.eslintrc.js

Lines changed: 0 additions & 6 deletions
This file was deleted.

.gitignore

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1 @@
11
.vscode
2-
node_modules
3-
package-lock.json
4-
package.json
5-
.eslintrc
6-
.DS_Store

caesar/caesar.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
const caesar = function() {
22

3-
};
3+
}
44

5-
module.exports = caesar;
5+
module.exports = caesar

caesar/caesar.spec.js

Lines changed: 22 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,25 @@
11
const caesar = require("./caesar");
22

3-
test('works with single letters', () => {
4-
expect(caesar('A', 1)).toBe('B');
5-
});
6-
test.skip('works with words', () => {
7-
expect(caesar('Aaa', 1)).toBe('Bbb');
8-
});
9-
test.skip('works with phrases', () => {
10-
expect(caesar('Hello, World!', 5)).toBe('Mjqqt, Btwqi!');
11-
});
12-
test.skip('works with negative shift', () => {
13-
expect(caesar('Mjqqt, Btwqi!', -5)).toBe('Hello, World!');
14-
});
15-
test.skip('wraps', () => {
16-
expect(caesar('Z', 1)).toBe('A');
17-
});
18-
test.skip('works with large shift factors', () => {
19-
expect(caesar('Hello, World!', 75)).toBe('Ebiil, Tloia!');
20-
});
21-
test.skip('works with large negative shift factors', () => {
22-
expect(caesar('Hello, World!', -29)).toBe('Ebiil, Tloia!');
3+
describe("caesar", function () {
4+
it("works with single letters", function () {
5+
expect(caesar("A", 1)).toEqual("B");
6+
});
7+
xit("works with words", function () {
8+
expect(caesar("Aaa", 1)).toEqual("Bbb");
9+
});
10+
xit("works with phrases", function () {
11+
expect(caesar("Hello, World!", 5)).toEqual("Mjqqt, Btwqi!");
12+
});
13+
xit("works with negative shift", function () {
14+
expect(caesar("Mjqqt, Btwqi!", -5)).toEqual("Hello, World!");
15+
});
16+
xit("wraps", function () {
17+
expect(caesar("Z", 1)).toEqual("A");
18+
});
19+
xit("works with large shift factors", function () {
20+
expect(caesar("Hello, World!", 75)).toEqual("Ebiil, Tloia!");
21+
});
22+
xit("works with large negative shift factors", function () {
23+
expect(caesar("Hello, World!", -29)).toEqual("Ebiil, Tloia!");
24+
});
2325
});

calculator/calculator.js

Lines changed: 7 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,32 +1,20 @@
1-
const add = function() {
1+
function add() {}
22

3-
}
3+
function subtract() {}
44

5-
const subtract = function() {
5+
function sum() {}
66

7-
}
7+
function multiply() {}
88

9-
const sum = function() {
9+
function power() {}
1010

11-
}
12-
13-
const multiply = function() {
14-
15-
}
16-
17-
const power = function() {
18-
19-
}
20-
21-
const factorial = function() {
22-
23-
}
11+
function factorial() {}
2412

2513
module.exports = {
2614
add,
2715
subtract,
2816
sum,
2917
multiply,
3018
power,
31-
factorial
19+
factorial,
3220
};

fibonacci/fibonacci.js

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
const fibonacci = function() {
2-
3-
}
1+
const fibonacci = function () {};
42

53
module.exports = fibonacci;

fibonacci/fibonacci.spec.js

Lines changed: 19 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,31 +1,31 @@
11
const fibonacci = require("./fibonacci");
22

3-
describe('fibonacci', () => {
4-
test('4th fibonacci number is 3', () => {
5-
expect(fibonacci(4)).toBe(3);
3+
describe("fibonacci", function () {
4+
it("works", function () {
5+
expect(fibonacci(4)).toEqual(3);
66
});
7-
test.skip('6th fibonacci number is 8', () => {
8-
expect(fibonacci(6)).toBe(8);
7+
xit("works", function () {
8+
expect(fibonacci(6)).toEqual(8);
99
});
10-
test.skip('10th fibonacci number is 55', () => {
11-
expect(fibonacci(10)).toBe(55);
10+
xit("works", function () {
11+
expect(fibonacci(10)).toEqual(55);
1212
});
13-
test.skip('15th fibonacci number is 610', () => {
14-
expect(fibonacci(15)).toBe(610);
13+
xit("works", function () {
14+
expect(fibonacci(15)).toEqual(610);
1515
});
16-
test.skip('25th fibonacci number is 75025', () => {
17-
expect(fibonacci(25)).toBe(75025);
16+
xit("works", function () {
17+
expect(fibonacci(25)).toEqual(75025);
1818
});
19-
test.skip('doesn\'t accept negatives', () => {
20-
expect(fibonacci(-25)).toBe("OOPS");
19+
xit("doesn't accept negatives", function () {
20+
expect(fibonacci(-25)).toEqual("OOPS");
2121
});
22-
test.skip('DOES accept strings', () => {
23-
expect(fibonacci("1")).toBe(1);
22+
xit("DOES accept strings", function () {
23+
expect(fibonacci("1")).toEqual(1);
2424
});
25-
test.skip('DOES accept strings', () => {
26-
expect(fibonacci("2")).toBe(1);
25+
xit("DOES accept strings", function () {
26+
expect(fibonacci("2")).toEqual(1);
2727
});
28-
test.skip('DOES accept strings', () => {
29-
expect(fibonacci("8")).toBe(21);
28+
xit("DOES accept strings", function () {
29+
expect(fibonacci("8")).toEqual(21);
3030
});
3131
});

findTheOldest/README.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,4 +7,3 @@ given an array of objects representing people with a birth and death year, retur
77
- this can be done with a couple of chained array methods, or by using `reduce`.
88
- One of the tests checks for people with no death-date.. use JavaScript's Date function to get their age as of today.
99

10-

findTheOldest/findTheOldest.js

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
const findTheOldest = function() {
1+
let findTheOldest = function () {};
22

3-
}
4-
5-
module.exports = findTheOldest
3+
module.exports = findTheOldest;

findTheOldest/findTheOldest.spec.js

Lines changed: 26 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -1,64 +1,62 @@
1-
const findTheOldest = require('./findTheOldest')
1+
const findTheOldest = require("./findTheOldest");
22

3-
describe('findTheOldest', () => {
4-
test('finds the oldest person!', () => {
3+
describe("findTheOldest", () => {
4+
test("finds the oldest person!", () => {
55
const people = [
66
{
7-
name: 'Carly',
7+
name: "Carly",
88
yearOfBirth: 1942,
99
yearOfDeath: 1970,
1010
},
1111
{
12-
name: 'Ray',
12+
name: "Ray",
1313
yearOfBirth: 1962,
14-
yearOfDeath: 2011
14+
yearOfDeath: 2011,
1515
},
1616
{
17-
name: 'Jane',
17+
name: "Jane",
1818
yearOfBirth: 1912,
19-
yearOfDeath: 1941
19+
yearOfDeath: 1941,
2020
},
21-
]
22-
expect(findTheOldest(people).name).toBe('Ray');
21+
];
22+
expect(findTheOldest(people).name).toBe("Ray");
2323
});
24-
test.skip('finds the oldest person if someone is still living', () => {
24+
xit("finds the oldest person if someone is still living", function () {
2525
const people = [
2626
{
27-
name: 'Carly',
27+
name: "Carly",
2828
yearOfBirth: 2018,
2929
},
3030
{
31-
name: 'Ray',
31+
name: "Ray",
3232
yearOfBirth: 1962,
33-
yearOfDeath: 2011
33+
yearOfDeath: 2011,
3434
},
3535
{
36-
name: 'Jane',
36+
name: "Jane",
3737
yearOfBirth: 1912,
38-
yearOfDeath: 1941
38+
yearOfDeath: 1941,
3939
},
40-
]
41-
expect(findTheOldest(people).name).toBe('Ray');
40+
];
41+
expect(findTheOldest(people).name).toBe("Ray");
4242
});
43-
test.skip('finds the oldest person if the OLDEST is still living', () => {
43+
xit("finds the oldest person if the OLDEST is still living", function () {
4444
const people = [
4545
{
46-
name: 'Carly',
46+
name: "Carly",
4747
yearOfBirth: 1066,
4848
},
4949
{
50-
name: 'Ray',
50+
name: "Ray",
5151
yearOfBirth: 1962,
52-
yearOfDeath: 2011
52+
yearOfDeath: 2011,
5353
},
5454
{
55-
name: 'Jane',
55+
name: "Jane",
5656
yearOfBirth: 1912,
57-
yearOfDeath: 1941
57+
yearOfDeath: 1941,
5858
},
59-
]
60-
expect(findTheOldest(people).name).toBe('Carly');
59+
];
60+
expect(findTheOldest(people).name).toBe("Carly");
6161
});
62-
6362
});
64-

getTheTitles/README.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# GET THE TITLES!
1+
# Get the Titles!
22

33
You are given an array of objects that represent books with an author and a title that looks like this:
44

@@ -24,4 +24,3 @@ getTheTitles(books) // ['Book','Book2']
2424
## Hints
2525

2626
- You should use a built-in javascript method to do most of the work for you!
27-
<Paste>

getTheTitles/getTheTitles.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
var getTheTitles = function() {
1+
const getTheTitles = function() {
22

33
}
44

5-
module.exports = getTheTitles
5+
module.exports = getTheTitles;

getTheTitles/getTheTitles.spec.js

Lines changed: 14 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,18 @@
1-
const getTheTitles = require('./getTheTitles')
1+
const getTheTitles = require("./getTheTitles");
22

3-
describe('getTheTitles', () => {
4-
const books = [
5-
{
6-
title: 'Book',
7-
author: 'Name'
8-
},
9-
{
10-
title: 'Book2',
11-
author: 'Name2'
12-
}
13-
]
3+
describe("getTheTitles", function () {
4+
const books = [
5+
{
6+
title: "Book",
7+
author: "Name",
8+
},
9+
{
10+
title: "Book2",
11+
author: "Name2",
12+
},
13+
];
1414

15-
test('gets titles', () => {
16-
expect(getTheTitles(books)).toBe(['Book','Book2']);
15+
test("gets titles", () => {
16+
expect(getTheTitles(books)).toBe(["Book", "Book2"]);
1717
});
18-
1918
});

helloWorld/helloWorld.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
var helloWorld = function() {
1+
const helloWorld = function() {
22
return ''
33
}
44

leapYears/README.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,9 @@
22

33
Create a function that determines whether or not a given year is a leap year. Leap years are determined by the following rules:
44

5-
>There is a leap year every year whose number is perfectly divisible by four - except for years evenly divisible by 100, which are not leap years unless evenly divisible by 400. The second part of the rule affects century years. For example; the century years 1600 and 2000 are leap years, but the century years 1700, 1800, and 1900 are not.
5+
> Leap years are years divisible by four (like 1984 and 2004). However, years divisible by 100 are not leap years (such as 1800 and 1900) unless they are divisible by 400 (like 1600 and 2000, which were in fact leap years). (Yes, it's all pretty confusing)
6+
>
7+
> -- <cite>[Learn to Program](https://pine.fm/LearnToProgram/chap_06.html) by Chris Pine</cite>
68
79
```javascript
810
leapYears(2000) // is a leap year: returns true

leapYears/leapYears.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
var leapYears = function() {
1+
const leapYears = function() {
22

33
}
44

leapYears/leapYears.spec.js

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,22 @@
1-
const leapYears = require('./leapYears')
1+
const leapYears = require("./leapYears");
22

3-
describe('leapYears', () => {
4-
test('works with non century years', () => {
3+
describe("leapYears", () => {
4+
test("works with non century years", () => {
55
expect(leapYears(1996)).toBe(true);
66
});
7-
test.skip('works with non century years', () => {
8-
expect(leapYears(1997)).toBe(false);
7+
xit("works with non century years", function () {
8+
expect(leapYears(1997)).toEqual(false);
99
});
10-
test.skip('works with ridiculously futuristic non century years', () => {
11-
expect(leapYears(34992)).toBe(true);
10+
xit("works with ridiculously futuristic non century years", function () {
11+
expect(leapYears(34992)).toEqual(true);
1212
});
13-
test.skip('works with century years', () => {
14-
expect(leapYears(1900)).toBe(false);
13+
xit("works with century years", function () {
14+
expect(leapYears(1900)).toEqual(false);
1515
});
16-
test.skip('works with century years', () => {
17-
expect(leapYears(1600)).toBe(true);
16+
xit("works with century years", function () {
17+
expect(leapYears(1600)).toEqual(true);
1818
});
19-
test.skip('works with century years', () => {
20-
expect(leapYears(700)).toBe(false);
19+
xit("works with century years", function () {
20+
expect(leapYears(700)).toEqual(false);
2121
});
2222
});

node_modules/.bin/acorn

Lines changed: 0 additions & 1 deletion
This file was deleted.

node_modules/.bin/esparse

Lines changed: 0 additions & 1 deletion
This file was deleted.

node_modules/.bin/esvalidate

Lines changed: 0 additions & 1 deletion
This file was deleted.

node_modules/.bin/js-yaml

Lines changed: 0 additions & 1 deletion
This file was deleted.

node_modules/.bin/rimraf

Lines changed: 0 additions & 1 deletion
This file was deleted.

0 commit comments

Comments
 (0)