UNPKG

is-char-suitable-for-html-attr-name

Version:

Is given character suitable to be in an HTML attribute's name?

11 lines (9 loc) 1.01 kB
/** * @name is-char-suitable-for-html-attr-name * @fileoverview Is given character suitable to be in an HTML attribute's name? * @version 4.0.9 * @author Roy Revelt, Codsen Ltd * @license MIT * {@link https://codsen.com/os/is-char-suitable-for-html-attr-name/} */ "use strict";var isCharSuitableForHtmlAttrName=(()=>{var n=Object.defineProperty;var l=Object.getOwnPropertyDescriptor;var p=Object.getOwnPropertyNames;var a=Object.prototype.hasOwnProperty;var c=(e,t)=>{for(var r in t)n(e,r,{get:t[r],enumerable:!0})},u=(e,t,r,i)=>{if(t&&typeof t=="object"||typeof t=="function")for(let s of p(t))!a.call(e,s)&&s!==r&&n(e,s,{get:()=>t[s],enumerable:!(i=l(t,s))||i.enumerable});return e};var d=e=>u(n({},"__esModule",{value:!0}),e);var f={};c(f,{isAttrNameChar:()=>b,version:()=>h});var o="4.0.9";var h=o;function b(e){return typeof e=="string"&&(e.charCodeAt(0)>96&&e.charCodeAt(0)<123||e.charCodeAt(0)>64&&e.charCodeAt(0)<91||e.charCodeAt(0)>47&&e.charCodeAt(0)<58||e===":"||e==="-")}return d(f);})();