MCPcopy Create free account
hub / github.com/microsoft/SandDance / isJSON

Function isJSON

docs/app/js/sanddance-app.js:58787–58791  ·  view source on GitHub ↗
(text)

Source from the content-addressed store, hash-verified

58785var parcelHelpers = require("@parcel/transformer-js/src/esmodule-helpers.js");
58786parcelHelpers.defineInteropFlag(exports);
58787function isJSON(text) {
58788 var firstChar = text[0];
58789 var lastChar = text[text.length - 1];
58790 return firstChar === "{" && lastChar === "}" || firstChar === "[" && lastChar === "]";
58791}
58792exports.default = {
58793 name: "JSON",
58794 extensions: [

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected