Add .isBlob() (#162)

Co-authored-by: Sindre Sorhus <sindresorhus@gmail.com>
This commit is contained in:
Eric(书生) 2022-02-27 15:16:25 +08:00 committed by GitHub
parent 6cbefb9af7
commit 5b7ea154e6
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 17 additions and 0 deletions

View file

@ -170,6 +170,14 @@ const types = new Map<string, Test>([
],
typename: 'Buffer'
}],
['blob', {
is: is.blob,
assert: assert.blob,
fixtures: [
new window.Blob()
],
typename: 'Blob'
}],
['object', {
is: is.object,
assert: assert.object,
@ -683,6 +691,10 @@ test('is.buffer', t => {
testType(t, 'buffer');
});
test('is.blob', t => {
testType(t, 'blob');
});
test('is.object', t => {
const testData = types.get('object');