nucleoid

1.5.9 • Public • Published

logo

NPM Version

簡介 (Summary)

Nucleoid是基於Promise的一個流程控制系統,早期目的就是為了處裡server less中cloud function太難追蹤堆棧和錯誤的問題,但現在它具有一個完整的生命週期與友善的非同步操作、堆棧追蹤等,能協助各種模式。

安裝 (Install)

html

<script src="https://khc-zhihao.github.io/Nucleoid/dist/index.js"></script>

webpack

import Nucleoid from 'nucleoid'

node

npm i nucleoid

開始 (How to use?)

教學文件 (base gitbook)

const Nucleoid = require('nucleoid')
Nucleoid.createGene('my first gene', {
    templates: {
        'first template': (base, enzy, next, exit, fail) => {
            base.start = true
            next()
        },
        'next template': (base, enzy, next, exit, fail) => {
            base.next = true
            next()
        }
    }
}).transcription().then((messenger) => {
    console.log(messenger.base.start) // true
})

其他

版本日誌

開發者文件

Package Sidebar

Install

npm i nucleoid

Weekly Downloads

1

Version

1.5.9

License

ISC

Unpacked Size

72.6 kB

Total Files

5

Last publish

Collaborators

  • khczhihao