Commit 2d80ace8ef63530006b28f25f53eb7577cb929c6
roll out mutant destructuring!
mix irving committed on 1/13/2017, 5:32:10 AMParent: 9cbca35a9f214a2cc57f38645bc16fb874eb8222
Files changed
h.js | changed |
modules_basic/about.js | changed |
modules_basic/message-author.js | changed |
modules_extra/network.js | changed |
h.js | ||
---|---|---|
@@ -1,1 +1,4 @@ | ||
1 | -module.exports = require('micro-css/h')(require('@mmckegg/mutant/html-element')) | |
1 … | +const { h } = require('@mmckegg/mutant') | |
2 … | + | |
3 … | +module.exports = require('micro-css/h')(h) | |
4 … | + |
modules_basic/about.js | ||
---|---|---|
@@ -1,7 +1,7 @@ | ||
1 | 1 … | const fs = require('fs') |
2 | 2 … | const h = require('../h') |
3 | -const when = require('@mmckegg/mutant/when') | |
3 … | +const { when } = require('@mmckegg/mutant') | |
4 | 4 … | |
5 | 5 … | exports.needs = { |
6 | 6 … | blob_url: 'first', |
7 | 7 … | markdown: 'first' |
modules_basic/message-author.js | ||
---|---|---|
@@ -1,7 +1,7 @@ | ||
1 | 1 … | const fs = require('fs') |
2 | 2 … | const h = require('../h') |
3 | -const when = require('@mmckegg/mutant/when') | |
3 … | +const { when }= require('@mmckegg/mutant') | |
4 | 4 … | |
5 | 5 … | exports.needs = { |
6 | 6 … | avatar_link: 'first', |
7 | 7 … | avatar_image: 'first', |
modules_extra/network.js | |||
---|---|---|---|
@@ -2,15 +2,12 @@ | |||
2 | 2 … | // const { isVisible } = require('is-visible') | |
3 | 3 … | const h = require('../h') | |
4 | 4 … | const human = require('human-time') | |
5 | 5 … | ||
6 | -const Struct = require('@mmckegg/mutant/struct') | ||
7 | -const Value = require('@mmckegg/mutant/value') | ||
8 | -const Dict = require('@mmckegg/mutant/dict') | ||
9 | -const toCollection = require('@mmckegg/mutant/dict-to-collection') | ||
10 | -const mutantMap = require('@mmckegg/mutant/map') | ||
11 | -const when = require('@mmckegg/mutant/when') | ||
12 | -const computed = require('@mmckegg/mutant/computed') | ||
6 … | +const { | ||
7 … | + Struct, Value, Dict, | ||
8 … | + dictToCollection, map: mutantMap, when, computed | ||
9 … | +} = require('@mmckegg/mutant') | ||
13 | 10 … | ||
14 | 11 … | //var avatar = plugs.first(exports.avatar = []) | |
15 | 12 … | //var sbot_gossip_peers = plugs.first(exports.sbot_gossip_peers = []) | |
16 | 13 … | //var sbot_gossip_connect = plugs.first(exports.sbot_gossip_connect = []) | |
@@ -215,9 +212,9 @@ | |||
215 | 212 … | }) | |
216 | 213 … | ||
217 | 214 … | refresh() | |
218 | 215 … | ||
219 | - return toCollection.values(state) | ||
216 … | + return dictToCollection.values(state) | ||
220 | 217 … | ||
221 | 218 … | function refresh () { | |
222 | 219 … | api.sbot_gossip_peers((err, peers) => { | |
223 | 220 … | peers.forEach(data => { |
Built with git-ssb-web