1.0.0 • Published 11 years ago

add-stream v1.0.0

Weekly downloads
466,019
License
MIT
Repository
github
Last release
11 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_samplegriffin-ui-librarytailwind-vector-effecttest-library-123test-haptik-libwinx-form-winxwifi_configuration_packagetest-zeo-collectvision-camera-plugin-face-detectorvision-camera-plugin-scan-facesvision-camera-base64-resizedvantiq-react@dotconf-pro/dotconf-pro@dotconf-pro/dotenv@cs6/react-native-test-native-view-library@con-test/react-native-concent-common@damruravihara/react-native-testing-package@corelmax/react-native-my2c2p-sdk@praella/localisationist@positionex/position-sdkjrennsoh88-react-native-scroll-indicatorjesh-calculationjnf-accesscontrol-rnttljordy-frijters-test-libkhaled-salem-custom-componentslazy-bee-uijawwy_library_newjawy_library_v1gamification-jawwy-libraryframework_test_library_sixdee_new_jawwytest_lib_module_aarquickcapture_react_nativesushi-sdk-ftmrn-agora-ios-mzzzxxxyyy321123react-native-omental-frameworkreact-native-sixdee_test_libtrs-commitizen@amiruldev/wajs@amirdiafi/react-native-ios-haptics@apardellass/react-native-audio-stream@aviinash_jha/react-native-test_multiply@ali5049/react-native-buttons@aysea/react-native-ui-library@buganto/client@brantalikp/rn-resize@cdk8s-extensions/argo-rollout@citycide/changelog@adatechnology/react-native-android-getnet-pos@adembacaj/react-native-google-pay@_nomtek/react-native-shimmer-animation@abhinavoneuipoc/stencil-test@azalpacir/react-native-dhp-printer@boundless-inc/mobiledoc-dom-rendereryarn-react-hook-formywhskdjafziu@parallelnft/web3modal@felipesimmi/react-native-datalogic-module@hbglobal/react-native-actions-shortcuts@idas1/ui-component-lib@geeky-apo/react-native-advanced-clipboard@labiebhn_/react-native-multiplier@lordbeanbag/vite-plugin-svg-icons-monorepo@latiwesh/conventional-changelog-core@lehuyaa/my-assets@marionebl/conventional-changelog-cli@nader3456/zigbee2mqtt-frontend@navabi/react-native-ssl-pinning@enirisdev/angular-google-charts@enkeledi/react-native-week-month-date-picker@extrieve_technologies/quickcapture_react_native@melody-core/historian@ko-developerhong/react-native-multiple-image-picker@jfilipe-sparta/react-native-module_2
1.0.0

11 years ago