MCPcopy Create free account
hub / github.com/BorisMoore/jquery-tmpl / useStrictEquality

Function useStrictEquality

tests/qunit.js:895–904  ·  view source on GitHub ↗
(b, a)

Source from the content-addressed store, hash-verified

893
894 // for string, boolean, number and null
895 function useStrictEquality(b, a) {
896 if (b instanceof a.constructor || a instanceof b.constructor) {
897 // to catch short annotaion VS 'new' annotation of a declaration
898 // e.g. var i = 1;
899 // var j = new Number(1);
900 return a == b;
901 } else {
902 return a === b;
903 }
904 }
905
906 return {
907 "string": useStrictEquality,

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected