Skip to content

ask for all the properties of an object, and use the current value as the type and the default value

Notifications You must be signed in to change notification settings

jupegarnica/prompt_object

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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']
// }

About

ask for all the properties of an object, and use the current value as the type and the default value

Resources

Stars

Watchers

Forks

Packages

No packages published