jonschlinkert / randomatic

Easily generate random strings like passwords, with simple options for specifying a length and for using patterns of numeric, alpha-numeric, alphabetical, special or custom characters. (the original "generate-password")
https://github.com/jonschlinkert
MIT License
183 stars 25 forks source link

added typescript support #28

Open callmewa opened 4 years ago

callmewa commented 4 years ago

wanted to use this for my typescript project and saw the previous PR stalled.

callmewa commented 4 years ago

if you would like to use this lib without using // @ts-ignore simply add the following to your types file ie types.d.ts

declare module 'randomatic' {
    export default function randomatic(pattern: string, length?: number, options?: { chars?: string, exclude?: string | string[] }) : string
}
wojciechbator commented 4 years ago

@jonschlinkert can You merge it? I'd like to switch my current random password generator to Yours and one thing that handles me a bit is lack of the typescript support :)

jonschlinkert commented 4 years ago

Sure! I’ll review ASAP!

Sent from my iPhone

On Mar 6, 2020, at 6:12 AM, Wojciech Bator notifications@github.com wrote:

@jonschlinkert can You merge it? I'd like to switch my current random password generator to Yours and one thing that handles me a bit is lack of the typescript support :)

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub, or unsubscribe.

sethlivingston commented 4 years ago