Skip to content
This repository has been archived by the owner on Oct 12, 2018. It is now read-only.

Latest commit

 

History

History
18 lines (13 loc) · 376 Bytes

README.md

File metadata and controls

18 lines (13 loc) · 376 Bytes

Aim

Generating Open Graph HTML from object

Installation

npm install open-graph-response

Usage

const OpenGraphResponse = require("open-graph-response"),
      og = new OpenGraphResponse((id, cb) => {
        const title = `Title for entity #${id}`;
        return cb(null, { title });
      });
og.html(1).then(console.log).catch(console.log);