Sha256: 57621c37b3893b02870d0fa8f60e9816b51a0246bb0a7428cf40e540c2efb138

Contents?: true

Size: 1.16 KB

Versions: 161

Compression:

Stored size: 1.16 KB

Contents

{"version":3,"names":["_helperValidatorIdentifier","require","isValidIdentifier","name","reserved","isKeyword","isStrictReservedWord","isIdentifierName"],"sources":["../../src/validators/isValidIdentifier.ts"],"sourcesContent":["import {\n  isIdentifierName,\n  isStrictReservedWord,\n  isKeyword,\n} from \"@babel/helper-validator-identifier\";\n\n/**\n * Check if the input `name` is a valid identifier name\n * and isn't a reserved word.\n */\nexport default function isValidIdentifier(\n  name: string,\n  reserved: boolean = true,\n): boolean {\n  if (typeof name !== \"string\") return false;\n\n  if (reserved) {\n    // \"await\" is invalid in module, valid in script; better be safe (see #4952)\n    if (isKeyword(name) || isStrictReservedWord(name, true)) {\n      return false;\n    }\n  }\n\n  return isIdentifierName(name);\n}\n"],"mappings":";;;;;;AAAA,IAAAA,0BAAA,GAAAC,OAAA;AAUe,SAASC,iBAAiBA,CACvCC,IAAY,EACZC,QAAiB,GAAG,IAAI,EACf;EACT,IAAI,OAAOD,IAAI,KAAK,QAAQ,EAAE,OAAO,KAAK;EAE1C,IAAIC,QAAQ,EAAE;IAEZ,IAAI,IAAAC,oCAAS,EAACF,IAAI,CAAC,IAAI,IAAAG,+CAAoB,EAACH,IAAI,EAAE,IAAI,CAAC,EAAE;MACvD,OAAO,KAAK;IACd;EACF;EAEA,OAAO,IAAAI,2CAAgB,EAACJ,IAAI,CAAC;AAC/B","ignoreList":[]}

Version data entries

161 entries across 15 versions & 2 rubygems

Version Path
immosquare-cleaner-0.1.48 node_modules/@babel/helper-remap-async-to-generator/node_modules/@babel/traverse/node_modules/@babel/types/lib/validators/isValidIdentifier.js.map
immosquare-cleaner-0.1.48 node_modules/@babel/helper-optimise-call-expression/node_modules/@babel/types/lib/validators/isValidIdentifier.js.map
immosquare-cleaner-0.1.48 node_modules/@babel/helper-module-imports/node_modules/@babel/types/lib/validators/isValidIdentifier.js.map
immosquare-cleaner-0.1.48 node_modules/@babel/helper-member-expression-to-functions/node_modules/@babel/types/lib/validators/isValidIdentifier.js.map
immosquare-cleaner-0.1.48 node_modules/@babel/helper-hoist-variables/node_modules/@babel/types/lib/validators/isValidIdentifier.js.map
immosquare-cleaner-0.1.48 node_modules/@babel/helper-function-name/node_modules/@babel/types/lib/validators/isValidIdentifier.js.map
immosquare-cleaner-0.1.48 node_modules/@babel/helper-environment-visitor/node_modules/@babel/types/lib/validators/isValidIdentifier.js.map
immosquare-cleaner-0.1.48 node_modules/@babel/helper-builder-binary-assignment-operator-visitor/node_modules/@babel/types/lib/validators/isValidIdentifier.js.map
immosquare-cleaner-0.1.47 node_modules/@babel/plugin-transform-react-jsx/node_modules/@babel/types/lib/validators/isValidIdentifier.js.map
immosquare-cleaner-0.1.47 node_modules/@babel/types/lib/validators/isValidIdentifier.js.map
immosquare-cleaner-0.1.47 node_modules/@babel/preset-modules/node_modules/@babel/types/lib/validators/isValidIdentifier.js.map
immosquare-cleaner-0.1.47 node_modules/@babel/plugin-transform-object-super/node_modules/@babel/helper-replace-supers/node_modules/@babel/traverse/node_modules/@babel/types/lib/validators/isValidIdentifier.js.map
immosquare-cleaner-0.1.47 node_modules/@babel/plugin-transform-object-super/node_modules/@babel/helper-replace-supers/node_modules/@babel/helper-member-expression-to-functions/node_modules/@babel/types/lib/validators/isValidIdentifier.js.map
immosquare-cleaner-0.1.47 node_modules/@babel/plugin-transform-modules-systemjs/node_modules/@babel/traverse/node_modules/@babel/types/lib/validators/isValidIdentifier.js.map
immosquare-cleaner-0.1.47 node_modules/@babel/plugin-transform-function-name/node_modules/@babel/traverse/node_modules/@babel/types/lib/validators/isValidIdentifier.js.map
immosquare-cleaner-0.1.47 node_modules/@babel/plugin-transform-computed-properties/node_modules/@babel/template/node_modules/@babel/types/lib/validators/isValidIdentifier.js.map
immosquare-cleaner-0.1.47 node_modules/@babel/plugin-transform-classes/node_modules/@babel/traverse/node_modules/@babel/types/lib/validators/isValidIdentifier.js.map
immosquare-cleaner-0.1.47 node_modules/@babel/plugin-transform-classes/node_modules/@babel/helper-replace-supers/node_modules/@babel/helper-member-expression-to-functions/node_modules/@babel/types/lib/validators/isValidIdentifier.js.map
immosquare-cleaner-0.1.47 node_modules/@babel/plugin-transform-async-generator-functions/node_modules/@babel/traverse/node_modules/@babel/types/lib/validators/isValidIdentifier.js.map
immosquare-cleaner-0.1.47 node_modules/@babel/plugin-bugfix-v8-static-class-fields-redefine-readonly/node_modules/@babel/traverse/node_modules/@babel/types/lib/validators/isValidIdentifier.js.map