Skip to content

Latest commit

 

History

History
56 lines (35 loc) · 846 Bytes

Json.md

File metadata and controls

56 lines (35 loc) · 846 Bytes

Jsonify

class Json

import Jsonify from 'ex-stream/Json';

Converts stream text data to JSON object

import { createServer } from 'http';
import { json } from 'ex-stream/Json';

createServer((req, res) => {
   req
     .pipe(json())
     .pipe(res);
}).listen(3000, 'localhost');

Constructor

Parameters:

  • options: Object - Stream options

Creates Json stream instance

new Json()

function json

import { json } from 'ex-stream/Json';

JSON stream factory function

function json()