Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F77056323
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
Mon, Aug 12, 02:08
Size
602 B
Mime Type
text/x-c++
Expires
Wed, Aug 14, 02:08 (2 d)
Engine
blob
Format
Raw Data
Handle
19812283
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