We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Hello maintainers, given how popular of a DB Mongo is I think many people would appreciate having an ObjectId generator. What do you think?
The text was updated successfully, but these errors were encountered:
Thanks, I like this idea, I'll be sure to add it in a future update. Will keep this open until I do.
I know an ObjectId isn't just a random hex string but here's a custom helper I threw together in the meantime.
const myHelpers = { objectid() { return 'xxxxxxxxxxxxxxxxxxxxxxxx'.replaceAll( 'x', () => dummyjson.utils.randomInt(0, 0xf).toString(16) ); } }; const template = '{{objectid}}'; const result = dummyjson.parse(template, { helpers: myHelpers }); console.log(result); // 35bebbc8b80d567fbafb6c16
Sorry, something went wrong.
No branches or pull requests
Hello maintainers, given how popular of a DB Mongo is I think many people would appreciate having an ObjectId generator. What do you think?
The text was updated successfully, but these errors were encountered: