Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F83175579
SizeOnlySource.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
Sun, Sep 15, 14:39
Size
602 B
Mime Type
text/x-c++
Expires
Tue, Sep 17, 14:39 (2 d)
Engine
blob
Format
Raw Data
Handle
20801741
Attached To
rOACCT Open Access Compliance Check Tool (OACCT)
SizeOnlySource.js
View Options
/*
MIT License http://www.opensource.org/licenses/mit-license.php
Author Tobias Koppers @sokra
*/
"use strict"
;
const
Source
=
require
(
"./Source"
);
class
SizeOnlySource
extends
Source
{
constructor
(
size
)
{
super
();
this
.
_size
=
size
;
}
_error
()
{
return
new
Error
(
"Content and Map of this Source is not available (only size() is supported)"
);
}
size
()
{
return
this
.
_size
;
}
source
()
{
throw
this
.
_error
();
}
buffer
()
{
throw
this
.
_error
();
}
map
(
options
)
{
throw
this
.
_error
();
}
updateHash
()
{
throw
this
.
_error
();
}
}
module
.
exports
=
SizeOnlySource
;
Event Timeline
Log In to Comment