UNPKG

transformation-matrix

Version:

2d transformation matrix functions written in ES6 syntax. Tree shaking ready!

20 lines (16 loc) 391 B
export function isUndefined (val) { return typeof val === 'undefined' } export function isNumeric (n) { return typeof n === 'number' && !Number.isNaN(n) && Number.isFinite(n) } export function isObject (obj) { return typeof obj === 'object' && obj !== null && !Array.isArray(obj) } export function matchesShape (obj, keys) { return keys.every(key => key in obj) }