Software: Apache/2.2.22 (Debian). PHP/5.6.36 uname -a: Linux h05.hvosting.ua 4.9.110-amd64 #3 SMP Sun Nov 4 16:27:09 UTC 2018 x86_64 uid=1389(h33678) gid=1099(h33678) groups=1099(h33678),502(mgrsecure) Safe-mode: OFF (not secure) /home/h33678/data/www/it-man.ztu.edu.ua/node_modules/unique-stream/ drwxr-xr-x |
Viewing file: Select action/file-type: var Stream = require('stream'); function prop(propName) { return function (data) { return data[propName]; }; } module.exports = unique; function unique(propName) { var keyfn = JSON.stringify; if (typeof propName === 'string') { keyfn = prop(propName); } else if (typeof propName === 'function') { keyfn = propName; } var seen = {}; var s = new Stream(); s.readable = true; s.writable = true; var pipes = 0; s.write = function (data) { var key = keyfn(data); if (seen[key] === undefined) { seen[key] = true; s.emit('data', data); } }; var ended = 0; s.end = function (data) { if (arguments.length) s.write(data); ended++; if (ended === pipes || pipes === 0) { s.writable = false; s.emit('end'); } }; s.destroy = function (data) { s.writable = false; }; s.on('pipe', function () { pipes++; }); s.on('unpipe', function () { pipes--; }); return s; } |
:: Command execute :: | |
--[ c99shell v. 2.0 [PHP 7 Update] [25.02.2019] maintained by PinoyWH1Z | C99Shell Github | Generation time: 0.0181 ]-- |