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 872B

4 years ago
12345678910111213141516171819202122232425262728293031323334353637383940
  1. [![TravisCI Build Status](https://travis-ci.org/nmhnmh/from.svg?branch=master)](https://travis-ci.org/nmhnmh/from)
  2. # from
  3. An easy way to create a `readable Stream`.
  4. ## from(function getChunk(count, next))
  5. from takes a `getChunk` function and returns a stream.
  6. `getChunk` is called again and again, after each time the user calls `next()`,
  7. until the user emits `'end'`
  8. if `pause()` is called, the `getChunk` won't be called again untill `resume()` is called.
  9. ```js
  10. var from = require('from')
  11. var stream =
  12. from(function getChunk(count, next) {
  13. //do some sort of data
  14. this.emit('data', whatever)
  15. if(itsOver)
  16. this.emit('end')
  17. //ready to handle the next chunk
  18. next()
  19. //or, if it's sync:
  20. return true
  21. })
  22. ```
  23. ## from(array)
  24. from also takes an `Array` whose elements it emits one after another.
  25. ## License
  26. MIT / Apache2