stream: Removed valueOf & toString methods (fixes #2150) (#2151)

* stream: Removed `valueOf` & `toString` methods (fixes #2150)

* Update stream documentation
This commit is contained in:
Barney Carroll 2018-05-15 23:01:30 +01:00 committed by Pierre-Yves Gérardy
parent 4823369abe
commit e1a50890e9
5 changed files with 9 additions and 34 deletions

View file

@ -55,6 +55,7 @@
### v1.1.7
- Stream references no longer magically coerce to their underlying values ([#2150](https://github.com/MithrilJS/mithril.js/pull/2150), breaking change: `mithril-stream@2.0.0`)
- Promise polyfill implementation separated from polyfilling logic.
- `PromisePolyfill` is now available on the exported/global `m`.

View file

@ -504,13 +504,6 @@ var serialized = JSON.stringify(value)
console.log(serialized) // logs 123
```
Streams also implement a `valueOf` method that returns the value of the stream.
```javascript
var value = stream(123)
console.log("test " + value) // logs "test 123"
```
---
### Streams do not trigger rendering