Skip to content

Commit 026b4a9

Browse files
committed
add .editorconfig
1 parent af1b00e commit 026b4a9

File tree

2 files changed

+28
-0
lines changed

2 files changed

+28
-0
lines changed

.editorconfig

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
# This file is for unifying the coding style for different editors and IDEs
2+
# editorconfig.org
3+
root = true
4+
5+
[*]
6+
end_of_line = lf
7+
charset = utf-8
8+
trim_trailing_whitespace = false
9+
insert_final_newline = true
10+
indent_style = space
11+
indent_size = 2
12+
13+
[{*.yml,*.json}]
14+
indent_style = space
15+
indent_size = 2

01-first-async-await-function.js

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
const fetch = require('node-fetch');
2+
3+
function getZhihuColumn(id) {
4+
const url = `https://zhuanlan.zhihu.com/api/columns/${id}`;
5+
fetch(url)
6+
.then(response => response.json())
7+
.then(column => {
8+
console.log(`NAME: ${column.name}`);
9+
console.log(`INTRO: ${column.intro}`);
10+
});
11+
}
12+
13+
getZhihuColumn('feweekly');

0 commit comments

Comments
 (0)