This repository was archived by the owner on Oct 4, 2020. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +4
-8
lines changed Expand file tree Collapse file tree 2 files changed +4
-8
lines changed Original file line number Diff line number Diff line change @@ -4,10 +4,10 @@ exports.typeImpl = function (blob) { return blob.type; };
4
4
5
5
exports . size = function ( blob ) { return blob . size ; } ;
6
6
7
- exports . _slice = function ( blob ) {
7
+ exports . _slice = function ( contentType ) {
8
8
return function ( start ) {
9
9
return function ( end ) {
10
- return function ( contentType ) {
10
+ return function ( blob ) {
11
11
return blob . slice ( start , end , contentType ) ;
12
12
}
13
13
}
Original file line number Diff line number Diff line change @@ -61,13 +61,9 @@ idxFromNumber = round >>> unsafeCoerce
61
61
62
62
-- | Creates a new `Blob` object (with specified `MediaType`), containing the
63
63
-- | data in the specified range of bytes of the source Blob, by setting .
64
- slice ∷ MediaType -> StartByte -> EndByte -> Blob -> Blob
65
- slice mediaType (StartByte start) (EndByte end) blob =
66
- _slice blob start end (unwrap mediaType)
64
+ foreign import slice ∷ MediaType -> StartByte -> EndByte -> Blob -> Blob
67
65
68
66
-- | Creates a new `Blob` object containing the data in the specified range
69
67
-- | of bytes of the source Blob.
70
68
slice' ∷ StartByte -> EndByte -> Blob -> Blob
71
- slice' (StartByte start) (EndByte end) blob = _slice blob start end " "
72
-
73
- foreign import _slice ∷ Blob -> ByteIdx -> ByteIdx -> String -> Blob
69
+ slice' = slice (MediaType " " )
You can’t perform that action at this time.
0 commit comments