oculus42 / short-uuid

Translate standard UUIDs into shorter formats and back.
MIT License
450 stars 13 forks source link

Error on UC Browser #61

Closed hungxp closed 2 years ago

hungxp commented 2 years ago

I using it in project nuxt js, but it don't working on UC browser. Error here ` */ const shortenUUID = (longId, translator, paddingParams) => { const translated = translator(longId.toLowerCase().replace(/-/g, ''));

if (!paddingParams || !paddingParams.consistentLength) return translated;

return translated.padStart( paddingParams.shortIdLength, paddingParams.paddingChar, ); };`

oculus42 commented 2 years ago

Can you provide more information around the error you experienced?

Do you have core-js or polyfills for modern ES code? My guess is that it may not support .padStart which was part of ES2017, but I do not have UC Browser to test.

oculus42 commented 2 years ago

@hungxp Any followup on this? If you can provide the actual error message you received it would go a long way toward resolving the issue.

hungxp commented 2 years ago

UC Browser hasn't been updated for quite a while, maybe it doesn't support ES2017, I removed the library to be able to run on it