Closed cydside closed 4 months ago
Here is the solution:
import { nanoid } from 'https://cdn.jsdelivr.net/npm/nanoid/nanoid.js'
Put it to your vanilla JS and browser will download the file.
Not only that it is slow for end-users. Use it only for hacks and development.
Thanks! Just last think...How can I add a custom alphabet?
Use:
import { customAlphabet } from 'https://cdn.jsdelivr.net/npm/nanoid/index.browser.js'
Got it, many many thanks!
Hi, I'm a newbie and writing vanilla javascript so could you please let me know, if I missed something in this project home page, how to do a single js file to use it just including
<script src="/public/js/nanoid.js"></script>
in the html source code? Thanks in advance, Danilo