A Define tool for js/ts
npm i jsdefn
- Create Defs
import { JSDef } from 'jsdefn'
const $ = JSDef({
"A": "apple"
})
- Get define
console.log($.JD("A"))
it's will out put apple
in console
There are three way to define
- constructor
// define when create defs
const $ = JSDef({
"B": "Banana"
})
- define once
$.def("M", "mongo")
- define many in one time
$.defMany({
"author": "lazp",
"time": "2022"
})
MIT