Const
The blob schema validates that the input is a JavaScript Blob object. It is an alias for instance(Blob).
blob
instance(Blob)
import { blob } from "typerun/schema";import { is } from "typerun";const isBlob = is(blob)(new Blob());console.log(isBlob); // trueconst isNotBlob = is(blob)(3);console.log(isNotBlob); // false Copy
import { blob } from "typerun/schema";import { is } from "typerun";const isBlob = is(blob)(new Blob());console.log(isBlob); // trueconst isNotBlob = is(blob)(3);console.log(isNotBlob); // false
The
blob
schema validates that the input is a JavaScript Blob object. It is an alias forinstance(Blob)
.Example