Skip to main content
deleted 3 characters in body
Source Link
l4m2
  • 28.3k
  • 2
  • 25
  • 103

JavaScript (Node.js), 9594 bytes

x=>x.toLowerCase(a=w=/[a-z]/gi).replace(/_/g,g=i=>i>62g=Z=>Z>62?(iZ-52).toString(36):g(aw.exec(x)<{}|2*<g|2*-~i~Z))

Try it online!Try it online!

JavaScript (Node.js), 125 124 bytes

x=>x.replace(s=/./g,c=>parseInt(c,36)>9?c.toLowerCase(s+=+(c<{})):c=='_'?('0b'+s.slice(4,9)-~9).toString(36,s=s.slice(5)):c)

Try it online!

JavaScript (Node.js), 95 bytes

x=>x.toLowerCase(a=/[a-z]/gi).replace(/_/g,g=i=>i>62?(i-52).toString(36):g(a.exec(x)<{}|2*-~i))

Try it online!

JavaScript (Node.js), 125 124 bytes

x=>x.replace(s=/./g,c=>parseInt(c,36)>9?c.toLowerCase(s+=+(c<{})):c=='_'?('0b'+s.slice(4,9)-~9).toString(36,s=s.slice(5)):c)

Try it online!

JavaScript (Node.js), 94 bytes

x=>x.toLowerCase(w=/[a-z]/gi).replace(/_/g,g=Z=>Z>62?(Z-52).toString(36):g(w.exec(x)<g|2*-~Z))

Try it online!

JavaScript (Node.js), 125 124 bytes

x=>x.replace(s=/./g,c=>parseInt(c,36)>9?c.toLowerCase(s+=+(c<{})):c=='_'?('0b'+s.slice(4,9)-~9).toString(36,s=s.slice(5)):c)

Try it online!

added 544 characters in body
Source Link
l4m2
  • 28.3k
  • 2
  • 25
  • 103

JavaScript (Node.js), 95 bytes

x=>x.toLowerCase(a=/[a-z]/gi).replace(/_/g,g=i=>i>62?(i-52).toString(36):g(a.exec(x)<{}|2*-~i))

Try it online!

JavaScript (Node.js), 125 124 bytes

x=>x.replace(s=/./g,c=>parseInt(c,36)>9?c.toLowerCase(s+=+(c<{})):c=='_'?('0b'+s.slice(4,9)-~9).toString(36,s=s.slice(5)):c)

Try it online!

JavaScript (Node.js), 125 124 bytes

x=>x.replace(s=/./g,c=>parseInt(c,36)>9?c.toLowerCase(s+=+(c<{})):c=='_'?('0b'+s.slice(4,9)-~9).toString(36,s=s.slice(5)):c)

Try it online!

JavaScript (Node.js), 95 bytes

x=>x.toLowerCase(a=/[a-z]/gi).replace(/_/g,g=i=>i>62?(i-52).toString(36):g(a.exec(x)<{}|2*-~i))

Try it online!

JavaScript (Node.js), 125 124 bytes

x=>x.replace(s=/./g,c=>parseInt(c,36)>9?c.toLowerCase(s+=+(c<{})):c=='_'?('0b'+s.slice(4,9)-~9).toString(36,s=s.slice(5)):c)

Try it online!

Source Link
l4m2
  • 28.3k
  • 2
  • 25
  • 103

JavaScript (Node.js), 125 124 bytes

x=>x.replace(s=/./g,c=>parseInt(c,36)>9?c.toLowerCase(s+=+(c<{})):c=='_'?('0b'+s.slice(4,9)-~9).toString(36,s=s.slice(5)):c)

Try it online!