mirror of
https://github.com/idanoo/GoScrobble
synced 2025-07-29 02:49:15 +00:00
0.2.0 - Mid migration
This commit is contained in:
parent
139e6a915e
commit
7e38fdbd7d
42393 changed files with 5358157 additions and 62 deletions
28
web/node_modules/jsx-ast-utils/src/values/expressions/Identifier.js
generated
vendored
Normal file
28
web/node_modules/jsx-ast-utils/src/values/expressions/Identifier.js
generated
vendored
Normal file
|
@ -0,0 +1,28 @@
|
|||
const JS_RESERVED = {
|
||||
Array,
|
||||
Date,
|
||||
Infinity,
|
||||
Math,
|
||||
Number,
|
||||
Object,
|
||||
String,
|
||||
undefined,
|
||||
};
|
||||
|
||||
/**
|
||||
* Extractor function for a Identifier type value node.
|
||||
* An Identifier is usually a reference to a variable.
|
||||
* Just return variable name to determine its existence.
|
||||
*
|
||||
* @param - value - AST Value object with type `Identifier`
|
||||
* @returns - The extracted value converted to correct type.
|
||||
*/
|
||||
export default function extractValueFromIdentifier(value) {
|
||||
const { name } = value;
|
||||
|
||||
if (Object.hasOwnProperty.call(JS_RESERVED, name)) {
|
||||
return JS_RESERVED[name];
|
||||
}
|
||||
|
||||
return name;
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue