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.

index.js 649B

12345678910111213141516171819202122232425
  1. var WritableStream = require('stream').Writable
  2. var inherits = require('util').inherits
  3. module.exports = BrowserStdout
  4. inherits(BrowserStdout, WritableStream)
  5. function BrowserStdout(opts) {
  6. if (!(this instanceof BrowserStdout)) return new BrowserStdout(opts)
  7. opts = opts || {}
  8. WritableStream.call(this, opts)
  9. this.label = (opts.label !== undefined) ? opts.label : 'stdout'
  10. }
  11. BrowserStdout.prototype._write = function(chunks, encoding, cb) {
  12. var output = chunks.toString ? chunks.toString() : chunks
  13. if (this.label === false) {
  14. console.log(output)
  15. } else {
  16. console.log(this.label+':', output)
  17. }
  18. process.nextTick(cb)
  19. }