MCPcopy Index your code
hub / github.com/stemkoski/stemkoski.github.com / assert_null_string_or_array

Function assert_null_string_or_array

MathBox/mathbox-bundle.js:80113–80124  ·  view source on GitHub ↗
(x, y)

Source from the content-addressed store, hash-verified

80111 }
80112
80113 function assert_null_string_or_array(x, y) {
80114 switch(typeof x) {
80115 case 'string': if(y !== x) {
80116 unexpected('expected `'+x+'`, got '+y+'\n'+token.data);
80117 } return !errored
80118
80119 case 'object': if(x && x.indexOf(y) === -1) {
80120 unexpected('expected one of `'+x.join('`, `')+'`, got '+y);
80121 } return !errored
80122 }
80123 return true
80124 }
80125
80126 // stative ----------------------------
80127

Callers 1

assertFunction · 0.70

Calls 1

unexpectedFunction · 0.70

Tested by

no test coverage detected