New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

add-props-stream

Package Overview
Dependencies
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

add-props-stream

Devastatingly simple way to add properties and values to an object stream.

0.2.2
latest
Source
npm
Version published
Maintainers
1
Created
Source

add properties stream

Usage

addProps(key, value) or addProps(obj)

  • all key/value pairs of obj get copied over

objectStream.pipe(addProps('easy', 'peasy')).pipe(objectStreamComsumer())

objectStream
  .pipe(addProps({easy:'peasy', objects: 'work', as: 'well'})
  .pipe(objectStreamComsumer())

addProps.stringify(key, val) to stringify output

Supports nested props
  • var propStream = addProps('x.y', 'z');
  • propStream.end({a:'b'}); //{a: 'b', x: {y: 'z'}}

Keywords

stream

FAQs

Package last updated on 21 Sep 2015

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts