@oawu/dog

1.0.1ย โ€ขย Publicย โ€ขย Published

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)

Readme

Keywords

Package Sidebar

Install

npm i @oawu/dog

Weekly Downloads

2

Version

1.0.1

License

MIT

Unpacked Size

3.13 kB

Total Files

4

Last publish

Collaborators

  • oawu