npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@json-feed-types/1_1

v1.0.2

Published

TypeScript types for JSON Feed 1.1.

Downloads

497

Readme

JSON Feed 1.1 Types

TypeScript types for JSON Feed 1.1.

Installation

npm install --save-dev @json-feed-types/1_1

Usage

import Feed from '@json-feed-types/1_1'

const feed: Feed = {
  version: 'https://jsonfeed.org/version/1.1',
  title: 'JSON Feed',
  icon: 'https://micro.blog/jsonfeed/avatar.jpg',
  home_page_url: 'https://www.jsonfeed.org/',
  feed_url: 'https://www.jsonfeed.org/feed.json',
  items: [
    {
      id: 'http://jsonfeed.micro.blog/2020/08/07/json-feed-version.html',
      title: 'JSON Feed version 1.1',
      content_html:
        '<p>We&rsquo;ve updated the spec to <a href="https://jsonfeed.org/version/1.1">version 1.1</a>. It’s a minor update to JSON Feed, clarifying a few things in the spec and adding a couple new fields such as <code>authors</code> and <code>language</code>.</p>\n\n<p>For version 1.1, we&rsquo;re starting to move to the more specific MIME type <code>application/feed+json</code>. Clients that parse HTML to discover feeds should prefer that MIME type, while still falling back to accepting <code>application/json</code> too.</p>\n\n<p>The <a href="https://jsonfeed.org/code/">code page</a> has also been updated with several new code libraries and apps that support JSON Feed.</p>\n',
      date_published: '2020-08-07T11:44:36-05:00',
      url: 'https://www.jsonfeed.org/2020/08/07/json-feed-version.html',
    },
  ],
}

Types

Extensions

Publishers can use custom objects in JSON Feeds. Names must start with an _ character followed by a letter. Custom objects can appear anywhere in a feed.

The Feed, Author, Item, Attachment, and Hub types are generic. To define extensions, provide a map:

import Feed from '@json-feed-types/1_1'

type CustomFeed = Feed<{
  feed: {
    _meta: {
      copyright: string
    }
  }
  author: {
    _meta: {
      id: string
    }
  }
  item: {
    _meta: {
      type: 'SHORT_EPISODE' | 'LONG_EPISODE' | 'SPECIAL_EVENT'
    }
  }
  attachment: {
    _image?: {
      dimensions: [width: number, height: number]
    }
  }
  hub: {
    _meta: {
      instructions: string
    }
  }
}>
import { Item } from '@json-feed-types/1_1'

type CustomItem = Item<{
  feed: {
    _meta: {
      copyright: string
    }
  }
  author: {
    _meta: {
      id: string
    }
  }
  item: {
    _meta: {
      type: 'SHORT_EPISODE' | 'LONG_EPISODE' | 'SPECIAL_EVENT'
    }
  }
  attachment: {
    _image?: {
      dimensions: [width: number, height: number]
    }
  }
  hub: {
    _meta: {
      instructions: string
    }
  }
}>

The ExtensionMap type from @json-feed-types/common can be used to define an extension map outside of the generic types:

import { ExtensionMap } from '@json-feed-types/common'

type MyExtensionMap: ExtensionMap = {
  feed: {
    _meta: {
      copyright: string
    }
  }
  author: {
    _meta: {
      id: string
    }
  }
  item: {
    _meta: {
      type: 'SHORT_EPISODE' | 'LONG_EPISODE' | 'SPECIAL_EVENT'
    }
  }
  attachment: {
    _image?: {
      dimensions: [width: number, height: number]
    }
  }
  hub: {
    _meta: {
      instructions: string
    }
  }
}