Code files

This commit is contained in:
Akhil
2017-07-31 11:33:31 +05:30
parent 073a63ebdd
commit b9ae409ec0
801 changed files with 17535 additions and 0 deletions
@@ -0,0 +1,20 @@
'use strict'
const from = require('from2')
const to = require('to2')
const rs = from(() => {
rs.push(Buffer.from('Hello, World!'))
rs.push(null)
})
// rs.on('data', (data) => {
// console.log(data.toString())
// })
const ws = to((data, enc, cb) => {
console.log(`Data written: ${data.toString()}`)
cb()
})
rs.pipe(ws)
@@ -0,0 +1,16 @@
{
"name": "from2-to2-streams",
"version": "1.0.0",
"description": "",
"main": "index.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
},
"keywords": [],
"author": "",
"license": "ISC",
"dependencies": {
"from2": "^2.3.0",
"to2": "^1.0.0"
}
}