microlinkhq / nanoclamp

🗜Responsive clamping component for React in 735 bytes.
https://nanoclamp.microlink.io
MIT License
45 stars 4 forks source link

punycode support #11

Open Kikobeats opened 6 years ago

Kikobeats commented 6 years ago

screen shot 2018-05-07 at 14 05 29

I was experimented with add punycode support at microlink but when I pass the text into nanoclamp component (something like 😻🍕.ws) it can't calculate the size properly

reproducible code

const punycode = require('punycode')

const input = 'xn--vi8hl0c.ws'

const output = punycode.decode(input)

console.log(output)
Kikobeats commented 5 years ago

Related: https://github.com/gajus/punycode-url