Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
isStream.assertObjectStream = function assertObjectStream(stream, type, errStr) {
isStream.assertStream(stream, type, errStr);
if (type === 'readable') {
assertObjectMode(stream, '_readableState', errStr);
} else if (type === 'writable') {
assertObjectMode(stream, '_writableState', errStr);
}
};