0.0.2 • Published 10 years ago

head-formatter v0.0.2

Weekly downloads
1
License
MIT
Repository
github
Last release
10 years ago

Head Formatter

Format the result of head-parser into a JSON.stringify()-able object.

Example

var parse = require('head-parser')
var format = require('head-formatter')
var request = require('request')

var req = request('https://github.com/')
parse(req, function (err, res) {
  req.destroy() // destroy the request since we only need to read the <head>
  res = format(res)
  res.title = 'some title'
  res.description = 'some description'
  res.og.image = 'some url'
})

API

format(obj)

Parses the object.