@chengaoyuan/yield

基于Promise的yield

Usage no npm install needed!

<script type="module">
  import chengaoyuanYield from 'https://cdn.skypack.dev/@chengaoyuan/yield';
</script>

README

yield

npm version install size NPM Downloads Build Status Coverage Status

Installation

$ npm install @chengaoyuan/yield

Usage

import async_yield from "@chengaoyuan/yield";
async function func() {
    console.log(Date.now());
    await async_yield();
    console.log(Date.now());
}
func();

Testing

$ npm test