Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

jsonify-that-feed

Package Overview
Dependencies
Maintainers
1
Versions
7
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

jsonify-that-feed

A simple library for turning Atom, RSS and JSON feeds into JSON Feed.

  • 1.2.2
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
7
increased by250%
Maintainers
1
Weekly downloads
 
Created
Source

jsonify-that-feed

Parse Atom, RSS, JSON feeds to JSON Feed 1.1.

Or OPML to JSON and vice versa.

This module is specifically developed for Ghost Reader

Install
# with npm: npm i jsonify-that-feed
yarn add jsonify-that-feed
Atom, RSS, JSON > JSON 1.1
import axios from 'axios';
import * as jsonify from 'jsonify-that-feed';

const { data } = await axios.get(url);
const feed = jsonify.toJson(data);
console.log(feed);
/*
  {
    "version": "https://jsonfeed.org/version/1.1",
    "title": "My Example Feed",
    "home_page_url": "https://example.org/",
    "feed_url"?: "https://example.org/feed.json",
    "items": [
      {
        "id": "1",
        "content_html"?: "<p>Hello, world!</p>",
        "url"?: "https://example.org/initial-post"
      }
    ]
  }
*/
OPML > JSON
const json = jsonify.opmlToJson(data);
console.log(json);
/**
  {
    version: 2,
    head: { title: 'Ghost Reader Subscriptions' },
    body: {
      outline: [
        {
          text: 'Example',
          title: 'Example',
          type: 'rss',
          xmlUrl: 'https://example.com/feed',
          htmlUrl: 'https://example.com',
        },
      ],
    },
  }
*/
JSON > OPML
const opml = jsonify.jsonToOpml(data);
console.log(opml);
/**
  <version>2</version>
  <head>
    <title>Ghost Reader Subscriptions</title>
  </head>
  <body>
    <outline>
      <text>Example</text>
      <title>Example</title>
      <type>rss</type>
      <xmlUrl>https://example.com/feed</xmlUrl>
      <htmlUrl>https://example.com</htmlUrl>
    </outline>
  </body>
*/

Keywords

FAQs

Package last updated on 05 Feb 2021

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