(str: string)
| 14 | }; |
| 15 | |
| 16 | export const isJSON = (str: string) => { |
| 17 | try { |
| 18 | if (JSON.parse(str) instanceof Object) { |
| 19 | return true; |
| 20 | } |
| 21 | } catch (error) { |
| 22 | return false; |
| 23 | } |
| 24 | }; |
| 25 | |
| 26 | export const getVariationName = (variations: IVariation[]) => { |
| 27 | let name = ''; |