UNPKG

react-naver-maps

Version:

React Navermaps API integration for modern development.

1 lines 805 B
{"version":3,"sources":["../src/utils/uncontrolled.ts"],"sourcesContent":["import camelcase from 'camelcase';\n\nexport type UncontrolledKey<T extends string> = `default${Capitalize<T>}`;\n\nexport function getUncontrolledKey<T extends string>(key: T): UncontrolledKey<T> {\n return camelcase(`default_${key}`) as UncontrolledKey<T>;\n}\n\nexport function makeUncontrolledKeyMap<T extends readonly string[]>(keys: T) {\n return keys.reduce((acc, key) => ({ ...acc, [getUncontrolledKey(key)]: key }), {}) as {\n [key in typeof keys[number] as UncontrolledKey<key>]: key;\n };\n}\n"],"mappings":";AAAA,OAAO,eAAe;AAIf,SAAS,mBAAqC,KAA4B;AAC/E,SAAO,UAAU,WAAW,KAAK;AACnC;AAEO,SAAS,uBAAoD,MAAS;AAC3E,SAAO,KAAK,OAAO,CAAC,KAAK,SAAS,EAAE,GAAG,KAAK,CAAC,mBAAmB,GAAG,IAAI,IAAI,IAAI,CAAC,CAAC;AAGnF;","names":[]}