aventrix / jnanoid Goto Github PK
View Code? Open in Web Editor NEWA unique string ID generator for Java.
License: MIT License
A unique string ID generator for Java.
License: MIT License
Let’s update the library to be compatible with the latest Nano ID 2.0:
~
to -
in default alphabetnon-secure
fast generatorNot necessarily an "issue" but I'd propose to refactor to NanoId
(and NanoIdTest
), as well as NanoId#generate(...)
(as all nanoids are random by nature, they are randomly generated strings). Maybe consider using NonNull/NotNull for your null assertions and whatnot as well, though I'd imagine there is a reason you kept it this barebones and I respect that.
nanoid by default uses useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict
as the alphabet (see https://github.com/ai/nanoid/blob/main/url-alphabet/index.js)
At the moment, if you build any project that depends on jnanoid
under Java 11 or Java 17, you hit this:
[WARNING] * Required filename-based automodules detected: [jnanoid-2.0.0.jar]. Please don't publish this project to a public artifact repository! *
Clearly for now support should still be maintained for Java 8 consumers, but multi-release JARs exist precisely to cover this sort of eventuality.
I'd be very happy to raise a PR to solve this if @davidklebanoff you would be willing to consider this and are still maintaining this project?
As I'm happy with the default Alphabet and the SecureRandom it would be nice to have a convenience method to just generate a randomNanoId with a given size
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.