All Downloads are FREE. Search and download functionalities are using the official Maven repository.
Please wait. This can take some minutes ...
Many resources are needed to download a project. Please understand that we have to compensate our server costs. Thank you in advance.
Project price only 1 $
You can buy this project and download/modify it how often you want.
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"]
}