weit

0.0.1 • Public • Published

weit

WEIT for a condition THEN do (javascript)

a simple no dependancy plugin

// usage
weit(_ => condition)
  .then(_ => action)
 
// example
let i
 
weit(_ => i)
  .then(_ => console.log('yes'))
  .catch(e => {throw e})
 
// wait a few seconds
= true
// outputs "yes"

try me in the web console

Install

the same routine as always

There are NO dependancies

cross compatibility node/browser thanks to moment.js template

  • Usable in browser
<script type="text/javascript" src="path/to/weit/index.js"></script>

There is no CDN for now but it might come if you ask for it.

  • Usable in node
npm install weit
const frum = require('weit')

/weit/

    Package Sidebar

    Install

    npm i weit

    Weekly Downloads

    3

    Version

    0.0.1

    License

    MIT

    Unpacked Size

    5.08 kB

    Total Files

    5

    Last publish

    Collaborators

    • gui3