New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details
Socket
Book a DemoSign in
Socket

distro-mic

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

distro-mic

Automatically transform article HTML for third-party platforms such as Facebook Instant Articles, Apple News and Google AMP

latest
Source
npmnpm
Version
1.0.0
Version published
Weekly downloads
8
Maintainers
1
Weekly downloads
 
Created
Source

Distro.Mic

Transform article HTML for Facebook Instant Articles, Apple News and Google AMP.

Note, this module is designed to transform article body only, other elements of the article page like header, byline and custom stylesheets should be added separately for each format.

USAGE

Install using npm:

npm install distro-mic
var format = require('distro-mic').format;
var html = '<p>Article HTML</p>'

var output = format(html);

Output:

{
  amp: '<article><p>Article HTML</p></article>',
  instantArticle: '<article><p>Article HTML</p></article>',
  appleNews: {
    article: [{
      text: 'Article HTML\n',
      additions: [],
      inlineTextStyles: [],
      role: 'body',
      layout: 'bodyLayout'
    }],
    bundlesToUrls: {}
  }
}

LICENSE

MIT

FAQs

Package last updated on 10 Jun 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