sortinghat:将 Firebase 事件排序为工作器事件

时间:2021-06-15 00:44:17
【文件属性】:
文件名称:sortinghat:将 Firebase 事件排序为工作器事件
文件大小:3KB
文件格式:ZIP
更新时间:2021-06-15 00:44:17
JavaScript 分院帽 Sorting Hat 将 Firebase 事件分类到它们的 Houses 中。 它通过我们称之为魔法的东西来实现这一点。 对于麻瓜:这允许您观察添加到特定 Firebase 路径的新子项并调用回调函数。 var SortingHat = require('sortinghat'), hat = new SortingHat(new Firebase('https://example.firebaseio.com')); hat.watch('/foo', function(snap) { console.log('new foo:', snap.val()); }); 方法 new SortingHat(firebase) require('sortinghat')给你这个构造函数。 传入一个随时可用的Firebase对象。 watch(path, [o
【文件预览】:
sortinghat-master
----package.json(416B)
----sortinghat.js(2KB)
----.gitignore(12B)
----README.md(2KB)

网友评论