mirror of
https://github.com/transloadit/uppy.git
synced 2026-07-24 10:47:44 +00:00
17 lines
No EOL
359 B
JavaScript
17 lines
No EOL
359 B
JavaScript
/*
|
|
* A fake blob used in tests since not every browser supports Blob yet.
|
|
*
|
|
* @param {Array} blob
|
|
*/
|
|
function FakeBlob(blob) {
|
|
this._blob = blob
|
|
this.size = blob.length
|
|
}
|
|
|
|
FakeBlob.prototype.slice = function(start, end) {
|
|
return new FakeBlob(this._blob.slice(start, end))
|
|
}
|
|
|
|
FakeBlob.prototype.stringify = function() {
|
|
return this._blob.join("")
|
|
} |