Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
rhythm1993 opened this issue Sep 25, 2020 · 1 comment
Open

Comments

@rhythm1993
Copy link

rhythm1993 commented Sep 25, 2020

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.

@hereandnow
Copy link
Member

hereandnow commented Sep 25, 2020

Can you please provide more details (full formatted code example) on your question? what is the get-function doing (is it lodash.get?), what are some examples of non working length/options arguments.

ty

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants