archieve-projects/微信机器人/node_modules/xstate/es/registry.js

20 lines
370 B
JavaScript
Executable File

var children = /*#__PURE__*/new Map();
var sessionIdIndex = 0;
var registry = {
bookId: function () {
return "x:".concat(sessionIdIndex++);
},
register: function (id, actor) {
children.set(id, actor);
return id;
},
get: function (id) {
return children.get(id);
},
free: function (id) {
children.delete(id);
}
};
export { registry };