Giter Club home page Giter Club logo

Comments (4)

aidarkhanov avatar aidarkhanov commented on June 18, 2024 1

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.

ai avatar ai commented on June 18, 2024 1

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.

ai avatar ai commented on June 18, 2024

There are 2 problems with this feature:

  1. It will increase Nano ID size.
  2. 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.

alejandroiglesias avatar alejandroiglesias commented on June 18, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.