Dieses Repository beinhaltet HTML- und Javascript Code zur einer NotizenWebApp auf Basis von Web Storage. Zudem sind Mocha/Chai Tests im Browser enthalten. https://meinenotizen.netlify.app/
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

readme.markdown 1.0KB

4 years ago
12345678910111213141516171819202122232425262728293031323334353637
  1. # MapStream
  2. Refactored out of [event-stream](https://github.com/dominictarr/event-stream)
  3. ##map (asyncFunction[, options])
  4. Create a through stream from an asyncronous function.
  5. ``` js
  6. var map = require('map-stream')
  7. map(function (data, callback) {
  8. //transform data
  9. // ...
  10. callback(null, data)
  11. })
  12. ```
  13. Each map MUST call the callback. It may callback with data, with an error or with no arguments,
  14. * `callback()` drop this data.
  15. this makes the map work like `filter`,
  16. note:`callback(null,null)` is not the same, and will emit `null`
  17. * `callback(null, newData)` turn data into newData
  18. * `callback(error)` emit an error for this item.
  19. >Note: if a callback is not called, `map` will think that it is still being processed,
  20. >every call must be answered or the stream will not know when to end.
  21. >
  22. >Also, if the callback is called more than once, every call but the first will be ignored.
  23. ##Options
  24. * `failures` - `boolean` continue mapping even if error occured. On error `map-stream` will emit `failure` event. (default: `false`)