Skip to content

Commit

Permalink
Remove checkForStream
Browse files Browse the repository at this point in the history
  • Loading branch information
anniel-stripe committed Feb 1, 2023
1 parent 09c45af commit 1305a0b
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 35 deletions.
17 changes: 0 additions & 17 deletions lib/utils.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

18 changes: 0 additions & 18 deletions src/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -245,24 +245,6 @@ const utils = {
.join('-');
},

/**
* Determine if file data is a derivative of EventEmitter class.
* https://nodejs.org/api/events.html#events_events
*/
checkForStream: (obj: {file?: {data: unknown}}): boolean => {
if (obj.file && obj.file.data) {
// return (
// typeof obj.file.data === 'object' &&
// 'on' in obj.file.data &&
// typeof obj.file.data.on === 'function' &&
// 'once' in obj.file.data &&
// typeof obj.file.data.once === 'function'
// );
return obj.file.data.constructor.name === 'EventEmitter';
}
return false;
},

callbackifyPromiseWithTimeout: <T>(
promise: Promise<T>,
callback: ((error: unknown, result: T | null) => void) | null
Expand Down

0 comments on commit 1305a0b

Please sign in to comment.