File tree 4 files changed +45
-56
lines changed
4 files changed +45
-56
lines changed Original file line number Diff line number Diff line change 1
- * text =auto
2
- * .js text eol =lf
1
+ * text =auto eol =lf
Original file line number Diff line number Diff line change 1
1
language : node_js
2
2
node_js :
3
+ - ' 10'
3
4
- ' 8'
4
5
- ' 6'
5
- - ' 4'
Original file line number Diff line number Diff line change 1
1
{
2
- "name" : " read-pkg" ,
3
- "version" : " 3.0.0" ,
4
- "description" : " Read a package.json file" ,
5
- "license" : " MIT" ,
6
- "repository" : " sindresorhus/read-pkg" ,
7
- "author" : {
8
- "name" : " Sindre Sorhus" ,
9
-
10
- "url" : " sindresorhus.com"
11
- },
12
- "engines" : {
13
- "node" : " >=4 "
14
- },
15
- "scripts" : {
16
- "test" : " xo && ava"
17
- },
18
- "files" : [
19
- " index.js"
20
- ],
21
- "keywords" : [
22
- " json" ,
23
- " read" ,
24
- " parse" ,
25
- " file" ,
26
- " fs" ,
27
- " graceful" ,
28
- " load" ,
29
- " pkg" ,
30
- " package" ,
31
- " normalize"
32
- ],
33
- "dependencies" : {
34
- "load-json-file" : " ^4 .0.0" ,
35
- "normalize-package-data" : " ^2.3.2" ,
36
- "path-type" : " ^3.0.0"
37
- },
38
- "devDependencies" : {
39
- "ava" : " *" ,
40
- "xo" : " *"
41
- }
2
+ "name" : " read-pkg" ,
3
+ "version" : " 3.0.0" ,
4
+ "description" : " Read a package.json file" ,
5
+ "license" : " MIT" ,
6
+ "repository" : " sindresorhus/read-pkg" ,
7
+ "author" : {
8
+ "name" : " Sindre Sorhus" ,
9
+
10
+ "url" : " sindresorhus.com"
11
+ },
12
+ "engines" : {
13
+ "node" : " >=6 "
14
+ },
15
+ "scripts" : {
16
+ "test" : " xo && ava"
17
+ },
18
+ "files" : [
19
+ " index.js"
20
+ ],
21
+ "keywords" : [
22
+ " json" ,
23
+ " read" ,
24
+ " parse" ,
25
+ " file" ,
26
+ " fs" ,
27
+ " graceful" ,
28
+ " load" ,
29
+ " pkg" ,
30
+ " package" ,
31
+ " normalize"
32
+ ],
33
+ "dependencies" : {
34
+ "load-json-file" : " ^5 .0.0" ,
35
+ "normalize-package-data" : " ^2.3.2" ,
36
+ "path-type" : " ^3.0.0"
37
+ },
38
+ "devDependencies" : {
39
+ "ava" : " *" ,
40
+ "xo" : " *"
41
+ }
42
42
}
Original file line number Diff line number Diff line change @@ -23,20 +23,10 @@ $ npm install read-pkg
23
23
``` js
24
24
const readPkg = require (' read-pkg' );
25
25
26
- readPkg (). then ( pkg => {
27
- console .log (pkg );
26
+ ( async () => {
27
+ console .log ( await readPkg () );
28
28
// => {name: 'read-pkg', ...}
29
- });
30
-
31
- readPkg (__dirname ).then (pkg => {
32
- console .log (pkg);
33
- // => {name: 'read-pkg', ...}
34
- });
35
-
36
- readPkg (path .join (' unicorn' , ' package.json' )).then (pkg => {
37
- console .log (pkg);
38
- // => {name: 'read-pkg', ...}
39
- });
29
+ })();
40
30
```
41
31
42
32
You can’t perform that action at this time.
0 commit comments