Comments (4)
Walking by, I am just interested, what if pattern feature would be a separate package? Because I think pattern feature is a bit off the main concept
from nanoid.
Walking by, I am just interested, what if pattern feature would be a separate package?
I think it will be the best option.
from nanoid.
There are 2 problems with this feature:
- It will increase Nano ID size.
- It is not very popular.
As result, I canβt add it, since it will affect the main Nano ID benefit of having small size.
You may take any pattern library and use it together with Nano ID: pattern(generate(alphabet, 5), 'XXX-XX')
. Is it OK for you?
from nanoid.
Then? What is the recommended implementation for patterns? I'm new to this package and I'm starting to look into code that uses it and I need to fix an issue by preventing the generated ID to start with a digit (fails for CSS classes trying to be queried by the querySelector
API).
from nanoid.
Related Issues (20)
- `expo-random` has been deprecated HOT 2
- Cannot be installed with node 12 HOT 3
- cant import v4.0.1 in TypeScript HOT 5
- Semantic versioning HOT 2
- All monotonically increasing (auto-increment, k-sortable), and timestamp-based ids share the security issues HOT 1
- nanoid@3(3.3.6) doesn't work with CommonJS HOT 30
- How to use customAlphabet() with version 3?
- https://stackoverflow.com/questions/27536941/sdl-mouse-input. HOT 1
- const { nanoid } = require('nanoid'); nanoid(7); //=> "GQuja9F"
- Maybe throw an error if letters is empty? HOT 3
- TypeError: nanoid is not a function when using react native web and styled components HOT 11
- Best way to generate initial ids?
- Issue along with pkg 5.8.1 "Failed to make bytecode" HOT 1
- Why did you remove CJS support? HOT 1
- Challenges using nanoid under jest with jsdom environment? HOT 5
- Unverified input breaks nanoid HOT 1
- Can't use nanoid@4 with typescript HOT 1
- More intuitive calculator? HOT 1
- Docs: Unnecessary use of --save flag HOT 1
- ulid format preset HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
π Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. πππ
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google β€οΈ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from nanoid.