add execa, node-fetch as samples

This commit is contained in:
草鞋没号 committed 2022-03-01 19:09:44 +08:00
1 parent 8e702586d5
commit cebd703848
3 files changed
+15

No files matched your search

+6
View File
@@ -0,0 +1,6 @@
import { execa } from 'execa'
(async () => {
const { stdout } = await execa('echo', ['unicorns'])
// console.log(stdout)
})()
+7
View File
@@ -0,0 +1,7 @@
import fetch from 'node-fetch'
(async () => {
const body = await (await fetch('https://github.com/')).text()
// console.log(body)
})()