stream-defaults

Apply defaults to objects as they pass through your streams

Usage no npm install needed!

<script type="module">
  import streamDefaults from 'https://cdn.skypack.dev/stream-defaults';
</script>

README

stream-defaults Build Status

Apply default keys/values to objects as they pass through your streams

Install

npm install stream-defaults

Usage

var defaults = require('stream-defaults'),
    opts     = { from: "support@mycompany.com", template: "default_template" }

fetchMsgFromQueue().pipe(defaults(opts)).pipe(sendMail);