文件名称:timeful-state:带时间戳的不可变状态
文件大小:4KB
文件格式:ZIP
更新时间:2024-05-18 06:13:15
JavaScript
时态 带时间戳的不可变状态。 用法 var States = require ( 'timeful-state' ) ; var transitions = { // called when 'birth' state is triggered 'birth' : function ( fromState , toState ) { toState . birthday = fromState . time ; // birthday is the from states time/date toState . age = 0 ; } , // called when switching from 'birth' to 'dead' state 'birth:dead' : function ( fromState , toState , duratio
【文件预览】:
timeful-state-master
----index.test.js(5KB)
----.travis.yml(149B)
----README.md(2KB)
----.gitignore(544B)
----index.js(2KB)
----package.json(592B)
----.kopa-ci.yml(34B)