from and of: Return read-only channels.

This commit is contained in:
David Braun 2017-10-22 12:39:02 -04:00
parent 8088d7e096
commit 9c18fc7055
No known key found for this signature in database
GPG key ID: 5694EEC4D129BDCF
3 changed files with 54 additions and 22 deletions

View file

@ -349,7 +349,7 @@ Channel.from = (values, mapfn, thisArg) => {
}
})();
return mapfn ? channel.map(mapfn, thisArg) : channel;
return (mapfn ? channel.map(mapfn, thisArg) : channel).readOnly();
};
Channel.of = (...values) => Channel.from(values);