MCPcopy Create free account
hub / github.com/ampproject/amphtml / typeStr

Function typeStr

third_party/mustache/mustache.js:23–25  ·  view source on GitHub ↗

* More correct typeof string handling array * which normally returns typeof 'object'

(obj)

Source from the content-addressed store, hash-verified

21 * which normally returns typeof 'object'
22 */
23 function typeStr (obj) {
24 return isArray(obj) ? 'array' : typeof obj;
25 }
26
27 function escapeRegExp (string) {
28 return string.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g, '\\$&');

Callers 1

mustacheFactoryFunction · 0.70

Calls 1

isArrayFunction · 0.85

Tested by

no test coverage detected