Get unlimited public & private packages + package-based permissions with npm Pro.Get started »

stringify-object-transform

1.0.3 • Public • Published

stringify-object-transform.js

NPM version build status

Trivial Transform wrapping JSON.stringify for Object output. Inputs are [key, value] pairs. Outputs nothing for an empty Object.

var StringifyObjectTransform = require('stringify-object-transform');
require('http').createServer(function(request, response) {
  response.statusCode = 404;
  // ...
  .once('data', function() {
    response.statusCode = 200;
    response.setHeader('Content-Type', 'application/json');
  })
  .pipe(new StringifyObjectTransform())
  .pipe(response);
});

Keywords

none

Install

npm i stringify-object-transform

DownloadsWeekly Downloads

0

Version

1.0.3

License

Apache-2.0

Last publish

Collaborators

  • avatar