Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F121657479
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, Jul 12, 21:41
Size
462 B
Mime Type
text/x-java
Expires
Mon, Jul 14, 21:41 (2 d)
Engine
blob
Format
Raw Data
Handle
27368653
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