v1.0.5
ask for all the properties of an object, and use the current value as the type and the default value
Attributes
Includes Deno configuration
Repository
Current version released
2 years ago
Prompt_object
About
ask for all the properties of an object, and use the current value as the type and the default value
Usage
import prompt_object from 'https://deno.land/x/prompt_object/mod.ts'
const obj = {
name: 'default name',
age: 30,
isMale: true,
address: {
city: 'default city',
street: 'default street'
},
hobbies: ['code', 'music']
}
const result = prompt_object(obj);
console.log(result);
//{
// name: 'Garn',
// age: 40,
// isMale: true,
// address: {
// city: 'Valencia',
// street: 'my street'
// },
// hobbies: ['fly', 'sleep', 'music', 'run']
// }