Skip to content

Commit

Permalink
chore(deps): update dependency nicki to v6 #5.
Browse files Browse the repository at this point in the history
  • Loading branch information
jaywcjlove committed Apr 6, 2022
1 parent aef0ad0 commit dadd0aa
Show file tree
Hide file tree
Showing 3 changed files with 120 additions and 535 deletions.
12 changes: 7 additions & 5 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -65,12 +65,14 @@ exports.readdirAsync = (dirPath) => {
}
exports.uidToName = (id) => {
return new Promise((resolve, reject) => {
nicki((err, names) => {
if (err) reject(err);
else if (id || id === 0) {
nicki().then((names) => {
console.log(names)
if (id || id === 0) {
resolve(names[id]);
} else resolve(names);
});
} else {
resolve(names);
}
})
});
}
exports.readdir = (dirPath) => {
Expand Down
Loading

0 comments on commit dadd0aa

Please sign in to comment.