Skip to content

Migrate to typescript and enhance dx

Compare
Choose a tag to compare
@SMAKSS SMAKSS released this 04 Nov 12:14
· 7 commits to master since this release
2cb738b

Release Notes for random-string v2.0 πŸš€

We're excited to announce the release of randomString v2.0! πŸŽ‰ This version includes some significant updates and optimizations that make generating random strings easier and more efficient. Here's what's new:

🎨 Enhanced API

  • The function now accepts an object with length and allowedCharacters as properties to make the API clearer and more flexible. 🌟
// Old way (v1.0)
randomString(10, 'abc123');

// New way (v2.0)
randomString({ length: 10, allowedCharacters: 'abc123' });

πŸ› οΈ Improved Performance

  • We've optimized the string generation process, making it faster and more memory-efficient. ⚑

πŸ“¦ Module Import Update

  • For CommonJS users, make sure to append .default when requiring the module:
const randomString = require('@smakss/random-string').default;

πŸ” Simplified Usage

  • With default parameters, you can easily generate a random string without specifying any arguments:
randomString();

🧬 Default Length Randomization

  • If length isn't provided, it will now be randomly selected between 1 and 20 to give you a varied and unpredictable string length. 🎲

πŸ“š Updated Documentation

  • The README has been updated to reflect all these changes, making it easier for you to integrate randomString into your projects. πŸ“–

πŸ™Œ Contribution and Conduct

  • As always, we welcome contributions. Check out CONTRIBUTING.md for how to get started. 🀝
  • We've committed to making this project welcoming and inclusive to all. Our Code of Conduct outlines our expectations for participant behavior. πŸ€—

We appreciate your support and feedback on this new release. Give it a try and let us know what you think! πŸ“’