UNPKG

es-abstract

Version:

ECMAScript spec abstract operations.

17 lines (13 loc) 245 B
'use strict'; module.exports = function isSameType(x, y) { if (x === y) { return true; } if (typeof x === typeof y) { if (typeof x !== 'object' || typeof y !== 'object') { return true; } return !!x === !!y; } return false; };