Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F105193229
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
Sat, Mar 15, 08:22
Size
462 B
Mime Type
text/x-java
Expires
Mon, Mar 17, 08:22 (1 d, 23 h)
Engine
blob
Format
Raw Data
Handle
24941581
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