demo___customer_pitch-c4152739-a50b-4b5b-9d4d-0561461666d9.zip-extract/_dependencies/npm/unpipe-1.0.0/index.js

Path
demo___customer_pitch-c4152739-a50b-4b5b-9d4d-0561461666d9.zip-extract/_dependencies/npm/unpipe-1.0.0/index.js
Status
scanned
Type
file
Name
index.js
Extension
.js
Programming language
JavaScript
Mime type
text/plain
File type
ASCII text
Tag

      
    
Rootfs path

      
    
Size
1118 (1.1 KB)
MD5
377f0c4bddbbd7e73b32a53e687df342
SHA1
df9106d2019fe2e4bfae9882e4a8be7012eb55cf
SHA256
69cd57b5cdd08c42410ebc0d92235e334f1fb985e6eb2dcfb1c692db674411bd
SHA512

      
    
SHA1_git
15c3d97a12b484c2a1c9735e24c952c3079876d0
Is binary

      
    
Is text
True
Is archive

      
    
Is media

      
    
Is legal

      
    
Is manifest

      
    
Is readme

      
    
Is top level

      
    
Is key file

      
    
index.js | 1.1 KB |

/*! * unpipe * Copyright(c) 2015 Douglas Christopher Wilson * MIT Licensed */ 'use strict' /** * Module exports. * @public */ module.exports = unpipe /** * Determine if there are Node.js pipe-like data listeners. * @private */ function hasPipeDataListeners(stream) { var listeners = stream.listeners('data') for (var i = 0; i < listeners.length; i++) { if (listeners[i].name === 'ondata') { return true } } return false } /** * Unpipe a stream from all destinations. * * @param {object} stream * @public */ function unpipe(stream) { if (!stream) { throw new TypeError('argument stream is required') } if (typeof stream.unpipe === 'function') { // new-style stream.unpipe() return } // Node.js 0.8 hack if (!hasPipeDataListeners(stream)) { return } var listener var listeners = stream.listeners('close') for (var i = 0; i < listeners.length; i++) { listener = listeners[i] if (listener.name !== 'cleanup' && listener.name !== 'onclose') { continue } // invoke the listener listener.call(stream) } }
Detected license expression
mit
Detected license expression (SPDX)
MIT
Percentage of license text
1.6
Copyrights
- end_line: 3
  copyright: Copyright (c) 2015 Douglas Christopher Wilson
  start_line: 3
Holders
- holder: Douglas Christopher Wilson
  end_line: 3
  start_line: 3
Authors

      
    
License detections License expression License expression SPDX
mit-4e7803e6-e54b-c9ca-bcd2-bee9755c0dd7 mit MIT
Package URL License Primary language
pkg:npm/acme-demo-app@1.0.0 JavaScript
pkg:npm/unpipe@1.0.0 mit JavaScript