Socket
Socket
Sign inDemoInstall

article-json-to-fbia

Package Overview
Dependencies
Maintainers
3
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

article-json-to-fbia

transform article-json to Facebook's instant-articles


Version published
Weekly downloads
0
decreased by-100%
Maintainers
3
Weekly downloads
 
Created
Source

article-json-to-fbia

Render article json in Facebook Instant Article Format

Build Status

Usage

npm install article-json-to-fbia
const convertToFbia = require('article-json-to-fbia');
const articleJson = [
  {
    type: 'paragraph',
    children: [
      {
        type: 'text',
        content: 'This is the text and '
      },
      {
        type: 'text',
        bold: true,
        content: 'some bold text '
      },
      {
        type: 'text',
        href: 'http://example.com',
        content: 'some link'
      }
    ]
  },
  {
    type: 'embed',
    embedType: 'image',
    src: 'http://example/image.jpg',
    width: 300,
    height: 150
  }
]
;

console.log(convertToFbia(articleJson));

Body format

https://github.com/micnews/html-to-article-json#format

License

MIT

Keywords

FAQs

Package last updated on 22 Jul 2016

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc