Templates

An easy way to keep your JSON records similar!

Make a new Template

const template = new Template({
id:"",
name:"",
password:""
})

Parameters

Name
About
Type
Required

template

The object to base the new Template on.

Object

Use Template

data.create('tag', template.use('123456',"John","password"))

Parameters

The parameters of this function are what will be set to the value of the keys in order.

Example: the parameterJohn will be the value of namesince they are both in the second position.

Full code example

const data = new Dubnium('json' /* Templates are JSON only */,false) 

const template = new Template({ 
id:"",
name:"",
password:""
})

data.create('tag', template.use('123456',"John","password"))

Last updated