Skip to content

set numeric as true but sometimes get random string no any number #8

@rhythm1993

Description

@rhythm1993
function getRandomString(length, options) {
const params = {
    numeric: get(options, 'numeric', true),
    letters: get(options, 'letters', true),
    special: get(options, 'special', true),
    exclude: get(options, 'exclude', []),
  };
  return randomString({
    length,
    ...params,
  });
}

......
Can see the function detail as above, I have only set the options as non-mandatory params, if no options passed here, all options will be true, but what I got the string have no at least one number...not always like this, but sometimes can not works.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions