@oawu/dog
v1.0.1
Published
๐ถ ๆ็็้็
Downloads
11
Readme
OA's Node.js Dog
ๆ็็้็ ๐ถ
่ชชๆ
ๅพ็ฐกๅฎๅฐฑๆฏไธๅ Watch ๆฉๅถใ
ๅฎ่ฃ
npm install @oawu/dog
ไฝฟ็จ
ๅผๅ
ฅ require('@oawu/dog')
ๅณๅฏไฝฟ็จ dog ๅ่ฝ๏ผๅฆไธ็ฏไพ๏ผ
const Dog = require('@oawu/dog')
const dog = Dog().bite(food => {
// ็ถๅฐ็ๅฌๅฐๆฑ่ฅฟๆ๏ผๅณๅฏๅๅบ้ฃ็ฉ
console.error(food)
})
Promise.all([
new Promise((resolve, reject) => {
setTimeout(_ => resolve(1), 1000)
}),
new Promise((resolve, reject) => {
setTimeout(_ => resolve(2), 1200)
}),
])
.then(results => dog.eat(results)) // ้คต็ตฆๅฐ็้ฃ็ฉ
.catch(dog.eat)