PromoCursed/node_modules/.cache/babel-loader/65b598b0b6a33f9dfb8a7333d9780b72c33c24eeb8d37d8e1195b4fb258744bd.json

1 line
3.4 KiB
JSON
Raw Normal View History

2024-08-20 23:25:37 +04:00
{"ast":null,"code":"import _typeof from \"@babel/runtime/helpers/esm/typeof\";\nexport function toArray(value) {\n if (Array.isArray(value)) {\n return value;\n }\n return value !== undefined ? [value] : [];\n}\nexport var isClient = typeof window !== 'undefined' && window.document && window.document.documentElement;\n\n/** Is client side and not jsdom */\nexport var isBrowserClient = process.env.NODE_ENV !== 'test' && isClient;\nexport function hasValue(value) {\n return value !== undefined && value !== null;\n}\n\n/** combo mode no value judgment function */\nexport function isComboNoValue(value) {\n return !value && value !== 0;\n}\nfunction isTitleType(title) {\n return ['string', 'number'].includes(_typeof(title));\n}\nexport function getTitle(item) {\n var title = undefined;\n if (item) {\n if (isTitleType(item.title)) {\n title = item.title.toString();\n } else if (isTitleType(item.label)) {\n title = item.label.toString();\n }\n }\n return title;\n}","map":{"version":3,"names":["_typeof","toArray","value","Array","isArray","undefined","isClient","window","document","documentElement","isBrowserClient","process","env","NODE_ENV","hasValue","isComboNoValue","isTitleType","title","includes","getTitle","item","toString","label"],"sources":["C:/Users/Аришина)/source/repos/PromoCursed/node_modules/rc-select/es/utils/commonUtil.js"],"sourcesContent":["import _typeof from \"@babel/runtime/helpers/esm/typeof\";\nexport function toArray(value) {\n if (Array.isArray(value)) {\n return value;\n }\n return value !== undefined ? [value] : [];\n}\nexport var isClient = typeof window !== 'undefined' && window.document && window.document.documentElement;\n\n/** Is client side and not jsdom */\nexport var isBrowserClient = process.env.NODE_ENV !== 'test' && isClient;\nexport function hasValue(value) {\n return value !== undefined && value !== null;\n}\n\n/** combo mode no value judgment function */\nexport function isComboNoValue(value) {\n return !value && value !== 0;\n}\nfunction isTitleType(title) {\n return ['string', 'number'].includes(_typeof(title));\n}\nexport function getTitle(item) {\n var title = undefined;\n if (item) {\n if (isTitleType(item.title)) {\n title = item.title.toString();\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