Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F95160704
utilities.js
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Subscribers
None
File Metadata
Details
File Info
Storage
Attached
Created
Fri, Dec 13, 08:30
Size
462 B
Mime Type
text/x-java
Expires
Sun, Dec 15, 08:30 (2 d)
Engine
blob
Format
Raw Data
Handle
22917376
Attached To
rOACCT Open Access Compliance Check Tool (OACCT)
utilities.js
View Options
import {fileURLToPath} from 'node:url';
import {Transform} from 'node:stream';
export const toPath = urlOrPath => urlOrPath instanceof URL ? fileURLToPath(urlOrPath) : urlOrPath;
export class FilterStream extends Transform {
constructor(filter) {
super({
objectMode: true,
transform(data, encoding, callback) {
callback(undefined, filter(data) ? data : undefined);
},
});
}
}
export const isNegativePattern = pattern => pattern[0] === '!';
Event Timeline
Log In to Comment