@dusty-puc/pwd-gen 0.0.0-stage → 0.1.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +3 -3
- package/index.js +18 -0
- package/package.json +17 -4
package/README.md
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
THIS IS ONLY A SCHOOL PROJEKT AND SHALL THUS NOT BE DOWNLOADED AS IT IS ONLY FOR EDUCATION PURPOSES
|
|
2
|
+
|
|
3
|
+
# YOU SHALL NOT DOWNLOAD
|
package/index.js
ADDED
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
'use strict'
|
|
2
|
+
|
|
3
|
+
function generate_pw(){
|
|
4
|
+
const letters='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789';
|
|
5
|
+
let pw ='';
|
|
6
|
+
|
|
7
|
+
for (let index = 0; index < 8; index++) {
|
|
8
|
+
const randomIndex = Math.floor(Math.random() * letters.length);
|
|
9
|
+
pw = pw + letters[randomIndex];
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
return pw
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
module.exports=generate_pw
|
|
17
|
+
|
|
18
|
+
console.log(generate_pw());
|
package/package.json
CHANGED
|
@@ -1,6 +1,19 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dusty-puc/pwd-gen",
|
|
3
|
-
"version": "0.
|
|
4
|
-
"
|
|
5
|
-
"
|
|
6
|
-
|
|
3
|
+
"version": "0.1.4",
|
|
4
|
+
"description": "",
|
|
5
|
+
"author": "Bin da I",
|
|
6
|
+
"type": "commonjs",
|
|
7
|
+
"main": "index.js",
|
|
8
|
+
"scripts": {
|
|
9
|
+
"start": "node index.js",
|
|
10
|
+
"watch": "node --watch index.js",
|
|
11
|
+
"dev": "nodemon index.js"
|
|
12
|
+
},
|
|
13
|
+
"devDependencies": {
|
|
14
|
+
"nodemon": "^3.1.14"
|
|
15
|
+
},
|
|
16
|
+
"dependencies": {
|
|
17
|
+
"uuid": "^14.0.2"
|
|
18
|
+
}
|
|
19
|
+
}
|