resource builder


stars 🌟issues ⚠️updated 🛠created 🐣size 🏋️‍♀️
01Jan 27, 2020Feb 8, 2017Minified + gzip package size for @tradle/build-resource in KB



Build resources from Tradle models


const models = require('@tradle/models')
const buildResource = require('@tradle/build-resource')
const resource = buildResource({
    model: models['tradle.PersonalInfo']
  // ted was born yesterday
  .placeOfBirth('San Dimas')
    id: 'tradle.MaritalStatus_4b3d018c5085bc93de73405760a5d2fbcbef6c78de73405760a5d2fbcbef6c78',
    title: 'Married'
    id: 'tradle.EducationNL_4b3d018c5085bc93de73405760a5d2fbcbef6c78de73405760a5d2fbcbef6c78',
    title: 'Ph. D in superheroism'
    id: 'tradle.Nationality_4b3d018c5085bc93de73405760a5d2fbcbef6c78de73405760a5d2fbcbef6c78',
    title: 'American'
      "_t": "tradle.Phone",
      "number": "0123456789",
      "phoneType": {
        "id": "tradle.PhoneTypes_4b3d018c5085bc93de73405760a5d2fbcbef6c78de73405760a5d2fbcbef6c78",
        "title": "Mobile"

console.log(JSON.stringify(resource, null, 2))

If you find any bugs or have a feature request, please open an issue on github!

The npm package download data comes from npm's download counts api and package details come from npms.io.