2.0.0 • Published 7 years ago

moztw-usercard v2.0.0

Weekly downloads
-
License
ISC
Repository
-
Last release
7 years ago

moztw-usercard

example

var minixhr = require('minixhr')
var bel = require('bel')
var usercard = require('moztw-usercard')

var url = 'https://jsonplaceholder.typicode.com/users'

minixhr(url, function (json) {
  var data = JSON.parse(json)
  var allusers = data.map(user => usercard(user))
   var app = bel`
      <div>
       ${allusers}
      </div>
    `
  document.body.appendChild(app)
  console.log(data)
})