7272ebba397b6d610d097a4ca047c02bd763b295084eb064f76c4d90984713535cab5b63fdf728a8e0e44b5e89bbcb804bfc7e0e0bc10dc7f09ffa868b8065 281 B

12345678910111213141516
  1. 'use strict';
  2. // https://262.ecma-international.org/16.0/#sec-sametype
  3. module.exports = function SameType(x, y) {
  4. if (x === y) {
  5. return true;
  6. }
  7. if (
  8. (x === null && y !== null)
  9. || (x !== null && y === null)
  10. ) {
  11. return false;
  12. }
  13. return typeof x === typeof y;
  14. };