All Downloads are FREE. Search and download functionalities are using the official Maven repository.

package.dist.prod.util.isValidPropertyName.js.map Maven / Gradle / Ivy

{
  "version": 3,
  "sources": ["../../../src/util/isValidPropertyName.ts"],
  "sourcesContent": ["// Note: disabled is present in IE so we explicitly allow it here.\n// Others, such as title/hidden, we explicitly override, so valid too\nconst allowList = [\n\t\"disabled\",\n\t\"title\",\n\t\"hidden\",\n\t\"role\",\n\t\"draggable\",\n];\n\n/**\n * Checks whether a property name is valid (does not collide with existing DOM API properties)\n *\n * @param name\n * @returns {boolean}\n */\nconst isValidPropertyName = (name: string) => {\n\tif (allowList.includes(name) || name.startsWith(\"aria\")) {\n\t\treturn true;\n\t}\n\tconst classes = [\n\t\tHTMLElement,\n\t\tElement,\n\t\tNode,\n\t];\n\treturn !classes.some(klass => klass.prototype.hasOwnProperty(name)); // eslint-disable-line\n};\n\nexport default isValidPropertyName;\n"],
  "mappings": "aAEA,MAAMA,EAAY,CACjB,WACA,QACA,SACA,OACA,WACD,EAQMC,EAAuBC,GACxBF,EAAU,SAASE,CAAI,GAAKA,EAAK,WAAW,MAAM,EAC9C,GAOD,CALS,CACf,YACA,QACA,IACD,EACgB,KAAKC,GAASA,EAAM,UAAU,eAAeD,CAAI,CAAC,EAGnE,eAAeD",
  "names": ["allowList", "isValidPropertyName", "name", "klass"]
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy