Skip to content

Generate Ordercode with Custom Pattern #1

@Revtm

Description

@Revtm

Problem

In the current release we can define an order code with specific length. But, we cannot determine and predict the code pattern that will appear when the order code is generated.

Enhancement

For the next release, we can define a string that will be the pattern and the length of the order code that will be generated

Main Idea

We already know that the order code only consist of numbers(0-9) and uppercase alphabet letters (A-Z).
Then, to define a pattern string, we can build a string consisting of the chars 'a' and 'n'. Char 'a' as alphabet and char 'n' as numbers.

Example

let x = OrderCode.generateCustom("aaannnna");
console.log(x);

Then the output will be like:

"AZE3421R"

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions