Gathering detailed insights and metrics for @minar-kotonoha/inquirer-npm-name
Gathering detailed insights and metrics for @minar-kotonoha/inquirer-npm-name
Gathering detailed insights and metrics for @minar-kotonoha/inquirer-npm-name
Gathering detailed insights and metrics for @minar-kotonoha/inquirer-npm-name
Helper function using inquirer to validate a value provided in a prompt does not exist as an npm package.
npm install @minar-kotonoha/inquirer-npm-name
Typescript
Module System
Node Version
NPM Version
61.3
Supply Chain
91.6
Quality
74
Maintenance
50
Vulnerability
98.9
License
JavaScript (100%)
Total Downloads
0
Last Day
0
Last Week
0
Last Month
0
Last Year
0
MIT License
13 Stars
32 Commits
5 Forks
1 Watchers
106 Branches
4 Contributors
Updated on Jul 28, 2021
Latest Version
3.0.0
Package Id
@minar-kotonoha/inquirer-npm-name@3.0.0
Unpacked Size
7.10 kB
Size
3.00 kB
File Count
4
NPM Version
6.14.5
Node Version
14.5.0
Cumulative downloads
Total Downloads
Last Day
0%
NaN
Compared to previous day
Last Week
0%
NaN
Compared to previous week
Last Month
0%
NaN
Compared to previous month
Last Year
0%
NaN
Compared to previous year
Helper function using inquirer to validate a value provided in a prompt does not exist as a npm package.
The supplied value must be a valid package name (as per validate-npm-package-name); otherwise, the user will again be prompted to enter a name.
If the value is already used as a npm package, then the users will be prompted and asked if they want to choose another one. If so, we'll recurse through the same validation process until we have a name that is unused on the npm registry. This is a helper to catch naming issue in advance, it is not a validation rule as the user can always decide to continue with the same name.
1$ npm install --save inquirer-npm-name
1var inquirer = require('inquirer'); 2var askName = require('inquirer-npm-name'); 3 4askName( 5 { 6 name: 'name', 7 message: 'Some Module Name' // Default: 'Module Name' 8 }, 9 inquirer 10).then(function(answer) { 11 console.log(answer.name); 12}); 13 14// Equivalent to {name: 'name'} 15askName('name', inquirer).then(function(answer) { 16 console.log(answer.name); 17});
Inside a Yeoman Generator you'd call it this way:
1var generators = require('yeoman-generator'); 2var inquirer = require('inquirer'); 3var askName = require('inquirer-npm-name'); 4 5module.exports = generators.Base.extend({ 6 prompting: function() { 7 return askName( 8 { 9 name: 'name', 10 message: 'Module Name' 11 }, 12 this 13 ).then(function(name) { 14 console.log(name); 15 }); 16 } 17});
askName
takes 2 parameters:
prompt
an Inquirer prompt configuration
or just a string to serve as name.inquirer
or any object with a obj.prompt()
method.Returns: A Promise
resolved with the answer object.
MIT © Simon Boudrias
No vulnerabilities found.
Reason
no binaries found in the repo
Reason
license file detected
Details
Reason
Found 3/16 approved changesets -- score normalized to 1
Reason
0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0
Reason
no effort to earn an OpenSSF best practices badge detected
Reason
security policy file not detected
Details
Reason
project is not fuzzed
Details
Reason
branch protection not enabled on development/release branches
Details
Reason
SAST tool is not run on all commits -- score normalized to 0
Details
Reason
16 existing vulnerabilities detected
Details
Score
Last Scanned on 2025-07-07
The Open Source Security Foundation is a cross-industry collaboration to improve the security of open source software (OSS). The Scorecard provides security health metrics for open source projects.
Learn More