Security News
GitHub Removes Malicious Pull Requests Targeting Open Source Repositories
GitHub removed 27 malicious pull requests attempting to inject harmful code across multiple open source repositories, in another round of low-effort attacks.
simple-prompts-web3
Advanced tools
Lightweight, beautiful and user-friendly prompts and live on Webiste. With future web3 very simple library
$ npm install --save simple-prompts-web3
This package supports Node 14 and above
const simple-prompts-web3 = require('simple-prompts-web3');
(async () => {
const response = await simple-prompts-web3({
type: 'number',
name: 'value',
message: 'How old are you?',
validate: value => value < 18 ? `Nightclub is 18+ only` : true
});
console.log(response); // => { value: 24 }
})();
Prompt with a single prompt object. Returns an object with the response.
const simple-prompts-web3 = require('simple-prompts-web3');
(async () => {
const response = await simple-prompts-web3({
type: 'text',
name: 'meaning',
message: 'What is the meaning of life?'
});
console.log(response.meaning);
})();
Prompt with a list of prompt objects. Returns an object with the responses.
Make sure to give each prompt a unique name
property to prevent overwriting values.
const simple-prompts-web3 = require('simple-prompts-web3');
const questions = [
{
type: 'text',
name: 'username',
message: 'What is your GitHub username?'
},
{
type: 'number',
name: 'age',
message: 'How old are you?'
},
{
type: 'text',
name: 'about',
message: 'Tell something about yourself',
initial: 'Why should I?'
}
];
(async () => {
const response = await simple-prompts-web3(questions);
// => response => { username, age, about }
})();
Prompt properties can be functions too.
Prompt Objects with type
set to falsy
values are skipped.
const simple-prompts-web3 = require('simple-prompts-web3');
const questions = [
{
type: 'text',
name: 'dish',
message: 'Do you like pizza?'
},
{
type: prev => prev == 'pizza' ? 'text' : null,
name: 'topping',
message: 'Name a topping'
}
];
(async () => {
const response = await simple-prompts-web3(questions);
})();
FAQs
Lightweight, beautiful and user-friendly prompts and live on Webiste. With future web3 very simple library
The npm package simple-prompts-web3 receives a total of 6 weekly downloads. As such, simple-prompts-web3 popularity was classified as not popular.
We found that simple-prompts-web3 demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
GitHub removed 27 malicious pull requests attempting to inject harmful code across multiple open source repositories, in another round of low-effort attacks.
Security News
RubyGems.org has added a new "maintainer" role that allows for publishing new versions of gems. This new permission type is aimed at improving security for gem owners and the service overall.
Security News
Node.js will be enforcing stricter semver-major PR policies a month before major releases to enhance stability and ensure reliable release candidates.