Skip to content

Commit 53a4961

Browse files
committed
wip
1 parent 118e059 commit 53a4961

File tree

4 files changed

+21028
-6983
lines changed

4 files changed

+21028
-6983
lines changed

exercises/82 - npm modules - FINISHED/index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
</head>
1010

1111
<body>
12-
<script src="./index.js"></script>
12+
<script src="./index.js" type="module"></script>
1313
</body>
1414

1515
</html>

exercises/82 - npm modules - FINISHED/index.js

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,17 @@
11
import wait from 'waait';
2-
import { name } from 'faker';
2+
import { faker } from '@faker-js/faker';
33
import { formatDistance, format } from 'date-fns';
44
import axios from 'axios';
55
import { intersection, isEqual } from 'lodash';
66
import to from 'await-to-js';
77

88
const fakeNames = Array.from(
99
{ length: 10 },
10-
() => `${name.firstName()} ${name.lastName()}`
10+
() => `${faker.name.firstName()} ${faker.name.lastName()}`
1111
);
1212

13+
console.log(fakeNames);
14+
1315
async function go() {
1416
console.log('Going!');
1517
await wait(200);
@@ -36,7 +38,7 @@ async function getJoke() {
3638
console.log(data);
3739
}
3840

39-
// getJoke();
41+
getJoke();
4042

4143
const a = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10];
4244
const b = [5, 3, 8, 3, 7, 453, 34];
@@ -50,7 +52,7 @@ const person2 = { name: 'wes' };
5052
console.log(isEqual(person1, person2));
5153

5254
function checkIfNameIsCool(firstName) {
53-
return new Promise(function(resolve, reject) {
55+
return new Promise((resolve, reject) => {
5456
if (firstName === 'Wes') {
5557
resolve('Cool name');
5658
return;

0 commit comments

Comments
 (0)