Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F122272866
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
Thu, Jul 17, 00:19
Size
462 B
Mime Type
text/x-java
Expires
Sat, Jul 19, 00:19 (2 d)
Engine
blob
Format
Raw Data
Handle
27459462
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