1.0.0 • Published 9 years ago

add-stream v1.0.0

Weekly downloads
466,019
License
MIT
Repository
github
Last release
9 years ago

add-stream Build Status

Append the contents of one stream onto another.

Usage

var fs = require('fs');
var es = require('event-stream');
var addStream = require('add-stream');

// Append strings/buffers
fs.createReadStream('1.txt') // 1.txt contains: number1
	.pipe(addStream(fs.createReadStream('2.txt'))) // 2.txt contains: number2
	.pipe(fs.createWriteStream('appended.txt')); // appended.txt contains: number1number2

// Append object streams
es.readArray([1, 2, 3])
	.pipe(addStream.obj(es.readArray([4, 5, 6])))
	.pipe(es.writeArray(function (err, array) {
		console.log(array); // [ 1, 2, 3, 4, 5, 6 ]
	}));

API

var transformStream = addStream(stream, opts = {})

Create a transform stream that appends the contents of stream onto whatever is piped into it. Options are passed to the transform stream's constructor.

var transformStream = addStream.obj(stream, opts = {})

A convenient shortcut for addStream(stream, {objectMode: true}).

License

MIT

conventional-changelog-coreeasy-select-rnreact-native-bluetooth2killi8n-react-native-fast-imageairscanairscan-examplereact-native-esc-pos-sahaab@borisovart/atol-kkt-moduledeneme323112@ntt_app/react-native-custom-notificationreact-native-covid-sdk@jttechnic/interpreterreact-native-printer-brothersreact-native-shekhar-bridge-testcogoportutils@oiti/documentoscopy-react-nativequoc-testluminos-ui-core@everything-registry/sub-chunk-1097jawwy-sdkjawwy_gamification_releasereact-native-sphereuisphereuijawwy_libraryreact-native-credit-card-pkgreact-native-jawwy_sample@amirdiafi/react-native-ios-haptics@amiruldev/wajs@ali5049/react-native-buttons@azalpacir/react-native-dhp-printer@aysea/react-native-ui-library@con-test/react-native-concent-common@cs6/react-native-test-native-view-library@damruravihara/react-native-testing-package@boundless-inc/mobiledoc-dom-renderer@blusalt-sdk/react-native-blusalt-document-verification@brantalikp/rn-resizejawwy_library_newjawy_library_v1gamification-jawwy-libraryframework_test_library_sixdee_new_jawwyzzzxxxyyy321123ywhskdjafvision-camera-plugin-face-detectorvision-camera-plugin-scan-facesvision-camera-base64-resizedwifi_configuration_packagewinx-form-winxzeo-collectziutest-zeo-collecttrs-commitizensmart_one_connectsushi-sdk-ftmtailwind-vector-effectroc-plugin-reporn-tm-notifyrn_unique_device_idrn-session-multiplier-demotest-haptik-libtest-library-123rn-adyen-dropinrn-agora-ios-mrn-circular-chartrn-counter-demorn-check-btnshipjsrefinejs-repo@corelmax/react-native-my2c2p-sdk@heycharge/heycharge-react-native-sdk@idas1/ui-component-lib@dotconf-pro/dotconf-pro@dotconf-pro/dotenv@adembacaj/react-native-google-pay@apardellass/react-native-audio-stream@enkeledi/react-native-week-month-date-picker@enirisdev/angular-google-charts@geeky-apo/react-native-advanced-clipboard@hemith/react-native-tnk@hbglobal/react-native-actions-shortcuts@_nomtek/react-native-shimmer-animationdogandev-simple-toastdotenv-coredotex-plugin@felipesimmi/react-native-datalogic-module@citycide/changelog@buganto/client@cdk8s-extensions/argo-rollout@latiwesh/conventional-changelog-core@ko-developerhong/react-native-multiple-image-picker@lehuyaa/my-assets@jfilipe-sparta/react-native-module_2@melody-core/historian@npm_fluentco/adflow-react-native-sdk@navabi/react-native-ssl-pinningframework_test_library_sixdee@marionebl/conventional-changelog-cli@lordbeanbag/vite-plugin-svg-icons-monorepo@phong95/react-native-multiple-image-pickernative-date-picker-module
1.0.0

9 years ago