Web.File.Blob
- Package
- purescript-web-file
- Repository
- purescript-web/purescript-web-file
#fromString Source
fromString :: String -> MediaType -> Blob
Creates a String with the given Mediatype For example:
myBlob = fromString (unsafeStringify { name: "Carl", age: 25 }) (MediaType "application/json")
#StartByte Source
newtype StartByte
An index into the Blob indicating the first byte to include in the new Blob. If you specify a negative value, it's treated as an offset from the end of the string toward the beginning. For example, -10 would be the 10th from last byte in the Blob. If you specify a value for start that is larger than the size of the source Blob, the returned Blob has size 0 and contains no data.
Constructors
#EndByte Source
newtype EndByte
An index into the Blob indicating the first byte that will not be included in the new Blob (i.e. the byte exactly at this index is not included). If you specify a negative value, it's treated as an offset from the end of the string toward the beginning. For example, -10 would be the 10th from last byte in the Blob. The default value is size.
Constructors
#idxFromInt Source
idxFromInt :: Int -> ByteIdx
Creates ByteIdx
from Int
value
#idxFromNumber Source
idxFromNumber :: Number -> ByteIdx
Creates ByteIdx
from Number
value using Math.round
.