Skip to content

Commit

Permalink
Update sjs (array::union and array::difference renaming)
Browse files Browse the repository at this point in the history
  • Loading branch information
afri committed May 14, 2018
1 parent 765d84c commit 7b581a7
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions examples/knockout/betterList.app
Expand Up @@ -2,7 +2,7 @@

var { ObservableVar, observe } = require('sjs:observable');
var { appendContent, Attrib, Prop, CSS, OnClick } = require('mho:surface');
var { difference } = require('sjs:array');
var { array_difference } = require('sjs:array');
var { Button, Form, Input, Select } = require('mho:surface/html');


Expand All @@ -26,7 +26,7 @@ function addItem(ev) {
}

function removeSelected() {
allItems.set(difference(allItems.get(), selectedItems.get()));
allItems.set(array_difference(allItems.get(), selectedItems.get()));
selectedItems.set([]);
}

Expand Down
2 changes: 1 addition & 1 deletion package.json
Expand Up @@ -18,7 +18,7 @@
"leveldown": "^3.0.0",
"nodemon": "^1.17.3",
"ssh2": "^0.5.5",
"stratifiedjs": "git://github.com/onilabs/stratifiedjs.git#e7e7ffd1ad9dc7fe4b8835d3743237d590d1067a"
"stratifiedjs": "git://github.com/onilabs/stratifiedjs.git#a23ba9e0df34e204dbb549492d73fa1ac09678e7"
},
"optionalDependencies": {
"weak": "^1.0.1"
Expand Down
4 changes: 2 additions & 2 deletions tools/seed/modules/ui/form.sjs
Expand Up @@ -547,7 +547,7 @@ var appConfigEditor = exports.appConfigEditor = function(parent, api, conf, extr
var btn = Button("Add", function(e) {
var service = selected.get().service;
if(service === null) return;
enabledServiceKeys.value.set(enabledServiceKeys.value.get() .. @union([service.id]));
enabledServiceKeys.value.set(enabledServiceKeys.value.get() .. @array_union([service.id]));
}, {'class':'btn btn-success pull-right add-service' }
) .. @Attrib('disabled', selected .. @transform(sel -> !(sel && sel.service)));

Expand Down Expand Up @@ -578,7 +578,7 @@ var appConfigEditor = exports.appConfigEditor = function(parent, api, conf, extr
@P([
@A(@Icon("remove"), {'class':'pull-right'})
.. @OnClick({handle:@stopEvent}, -> enabledServiceKeys.value.set(
enabledServiceKeys.value.get() .. @difference([i.id])
enabledServiceKeys.value.get() .. @array_difference([i.id])
)
),
i.info,
Expand Down

0 comments on commit 7b581a7

Please sign in to comment.