Working version but with performance issues for large IDs due to how the generator was constructed sequentially, going through every ID before the passed one. The sequence is based on a list of characters ( sequence parameter) and has the lenght based on an initial ID ( initialOrLength parameter when a string is passed) or on a length o characters ( initialOrLength parameter when a number is passed).Ī generator function can be iterated with a 'for of', that will return the next ID for each iteration or can be called using "next()", that will return an object like // '00', '01', '02', '10', '11', '12', '20', '21', '22' Version history 1.0.0 Most sequential ID generators need you to start from the first ID, but this one alows you to easily pass the current ID (that you might have retrieved from a DB) and generate the next ones with an instant performance. Generator function that produces a sequence of IDs.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |