Skip to content

Commit

Permalink
fix: exports
Browse files Browse the repository at this point in the history
  • Loading branch information
oceanroleplay committed Jan 23, 2022
1 parent 171b7b1 commit 27e202e
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 7 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
node_modules
build
package-lock.json
pnpm-lock.yaml
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "passwordx",
"version": "1.1.2",
"version": "1.1.3",
"description": "Use the cli to generate strong passwords or add them to nodejs projects",
"main": "build/index.js",
"types": "build/index.d.ts",
Expand Down Expand Up @@ -31,6 +31,7 @@
"@typescript-eslint/eslint-plugin": "^4.28.2",
"@typescript-eslint/parser": "^4.28.2",
"eslint": "^7.30.0",
"ts-node": "^10.4.0",
"typescript": "^4.3.5"
}
}
6 changes: 3 additions & 3 deletions src/cli.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#! /usr/bin/env node
import passwordX from "./index";
import * as passwordx from "./index.js";
import yargs from "yargs";
import { hideBin } from "yargs/helpers";

Expand Down Expand Up @@ -69,7 +69,7 @@ async function executeCli(): Promise<unknown> {
for (let index = 1; index <= args.count; index++) {
console.info(
`password ${index}:`,
passwordX({
passwordx.generate({
ambiguousCharacters: args.ambiguous,
digits: args.digit,
length: args.length,
Expand All @@ -83,7 +83,7 @@ async function executeCli(): Promise<unknown> {
} else {
console.info(
`password:`,
passwordX({
passwordx.generate({
ambiguousCharacters: args.ambiguous,
digits: args.digit,
length: args.length,
Expand Down
4 changes: 1 addition & 3 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ function formatPassword(
return finalPassowrd;
}

function PasswordX(options?: {
export function generate(options?: {
/**
* # Allow ambiguous characters
* #### Default: ``false``
Expand Down Expand Up @@ -189,5 +189,3 @@ function PasswordX(options?: {

return password;
}

export default PasswordX;

0 comments on commit 27e202e

Please sign in to comment.