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
Support scrambling #15
Comments
A person may want to use this is they need to preserve the visual weight, or layout of textual content. |
I really like this API! |
would be possible to use word dictionary instead of just a random string? |
Hey @d3v0ps, do you mean for scrambling specifically? Or more generally? You can do something like this for now: import { copycat, faker } from 'copycat'
copycat.oneOf('some-input-value', faker.locales.en.word.noun)
// => 'infrastructure' Would that work in your use case? |
Added in #18! |
I think of scrambling as a generic method for non-specific transformations. The idea is that a given string is randomly shifted:
the DOG ate the cheese!
becomesshx SAS weq sss snmwlx
. I would love to be able to specify characters that should not be transformed:copycat.scramble(input, { preserve: ['@', ' ', '!'] })
The text was updated successfully, but these errors were encountered: