All Downloads are FREE. Search and download functionalities are using the official Maven repository.

package.test.index.test.js Maven / Gradle / Ivy

Go to download

JS type check (TypeScript supported) functions like `isPlainObject() isArray()` etc. A simple & small integration.

The newest version!
// @ts-check
import {
  isBlob,
  isFile,
} from '../dist/index.cjs'

test('isBlob', () => {
  expect(isBlob(Blob)).toBe(false)
  expect(isBlob(new Blob())).toBe(true)
})

test('isFile', () => {
  expect(isFile(File)).toBe(false)
  expect(isFile(new File([''], '', { type: 'text/html' }))).toBe(true)
})




© 2015 - 2024 Weber Informatics LLC | Privacy Policy