Skip to content

Commit

Permalink
refactor: new version, custom pattern, license
Browse files Browse the repository at this point in the history
  • Loading branch information
samarmeena committed Mar 20, 2024
1 parent 27e202e commit 8414cf0
Show file tree
Hide file tree
Showing 9 changed files with 2,139 additions and 155 deletions.
File renamed without changes.
5 changes: 2 additions & 3 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
node_modules
.vscode
build
package-lock.json
pnpm-lock.yaml
node_modules
3 changes: 2 additions & 1 deletion .npmignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
.eslintrc
.github
.vscode
src
.eslintrc.json
tsconfig.json
2 changes: 1 addition & 1 deletion LICENSE → LICENSE.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
MIT License

Copyright (c) 2021 Indian Ocean Roleplay
Copyright (c) 2021 Vijay Meena <[email protected]> (https://github.com/samarmeena)

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
49 changes: 23 additions & 26 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,33 +8,26 @@ This is open source project so you can always check out our source code to feel

# Installation

## Direct Run

`npx passwordx@latest`

## For project

`npm install passwordx` or `yarn add passwordx`

## Global command

`npm install passwordx` or `yarn global add passwordx`
`npm install -g passwordx` or `yarn global add passwordx`

# Example for projects

```typescript
import passwordx from "passwordx";

// without customize it wil generate combination of [a-zA-Z0-9] with length of 8
// without customize it wil generate combination of [a-zA-Z0-9] with length of 16
const securePass = passwordx();
console.log(securePass);

// customize options
// ambiguousCharacters: boolean
// digits: boolean
// length: number
// lowercase: boolean
// similarCharacter: boolean
// symbols: boolean
// uppercase: boolean
const exPass = passwordx({ length: 32, symbols: true });
console.log(securePass);
```

# Example for command line usage
Expand All @@ -59,20 +52,24 @@ password 4: zkg2Zk9kFaPwPQCHGrf2Q4s33L3XXJb4Fyq89YgbPJuMrTbqRYcaBsVpGtmq5Gch

# Options

- you can also read this info in `passwordx --help`
you can also read this info in `passwordx --help`

| Option | Description | Value |
| ----------- | --------------------------- | -------------------------- |
| --ambiguous | Allow ambiguous characters | `` {}[]()/'"`~,;:.<>\ `` |
| --count | Generate multiple passwords | 1 |
| --digits | Allow digits | `23456789` |
| --length | Password length | 16 |
| --lowercase | Allow lowercase characters | `abcdefghjkmnpqrstuvwxyz` |
| --pattern | Custom pattern | undefined |
| --similar | Allow similar characters | `i, l, I, 1, \|, o, O, 0` |
| --symbol | Allow symbols | `!#$%&\*+-=?@^\_` |
| --uppercase | Allow uppercase characters | `ABCDEFGHJKLMNPQRSTUVWXYZ` |

| Name | Description | Pattern | Default |
| ------------------- | -------------------------- | -------------------------- | ------- |
| ambiguousCharacters | Allow ambiguous characters | `` {}[]()/'"`~,;:.<>\ `` | false |
| digits | Allow digits | `23456789` | true |
| length | Password length | | 8 |
| lowercase | Allow lowercase characters | `abcdefghjkmnpqrstuvwxyz` | true |
| similarCharacter | Allow similar characters | `i, l, I, 1, \|, o, O, 0` | false |
| symbols | Allow symbols | `!#$%&\*+-=?@^\_` | false |
| uppercase | Allow uppercase characters | `ABCDEFGHJKLMNPQRSTUVWXYZ` | true |
# ☎️ Need help?

# We are open for new ideas
Create [GitHub issue](https://github.com/samarmeena/passwordx/issues)

you can open issue on our github page with feature request or any kind of improvements
# 💖 Thank you

# Thank you for using passwordx
You can support [passwordx](https://www.npmjs.com/package/passwordx) by giving it a [GitHub](https://github.com/discordx-ts/passwordx) star.
Loading

0 comments on commit 8414cf0

Please sign in to comment.