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 🙏

© 2024 – Pkg Stats / Ryan Hefner

fbcatalog

v0.1.2

Published

fbcatalog is a helper that creates a facebook catalog based on Node.js.

Downloads

3,981

Readme

fbcatalog

version download status status Standard - JavaScript Style Guide

fbcatalog is a helper that creates a facebook catalog based on Node.js.

Installation

$ npm install fbcatalog

Usage

var fbcatalog = require('fbcatalog')
var feed = fbcatalog.feed()

var meta = {
  title: 'Test Store',
  link: 'http://www.example.com',
  description: 'An example item from the feed'
}
var items = require('./fixtures/items.json')

feed.addItems(items)

var xml = feed.toRSS(meta, {
  pretty: true
})

console.log(xml)

Fields

https://developers.facebook.com/docs/marketing-api/dynamic-product-ads/product-catalog#required-fields

Sample

[
	{
		"id": "DB_1",
		"title": "Dog Bowl In Blue",
		"applink": {
			"ios_url": "example-ios://electronic/db_1",
			"ios_app_store_id": "123",
			"ios_app_name": "Electronic Example iOS",
			"android_url": "example-android://electronic/db_1",
			"android_package": "com.electronic.example",
			"android_app_name": "Electronic Example Android",
			"windows_phone_url": "example-windows://electronic/db_1",
			"windows_phone_app_id": "64ec0d1b-5b3b-4c77-a86b-5e12d465edc0",
			"windows_phone_app_name": "Electronic Example Windows"
		},
		"description": "Solid plastic Dog Bowl in marine blue color",
		"google_product_category": "Animals > Pet Supplies",
		"product_type": "Bowls & Dining > Food & Water Bowls",
		"link": "http://www.example.com/bowls/db-1.html",
		"image_link": "http://images.example.com/DB_1.png",
		"condition": "new",
		"availability": "in stock",
		"price": "9.99 GBP",
		"brand": "Example",
		"item_group_id": "DB_GROUP_1",
		"shipping": {
			"country": "UK",
			"service": "Standard",
			"price": "9.95 GBP"
		},
		"custom_label_0": "Made in Waterford, IE"
	},
	{
		"id": "DB_2",
		"title": "Dog Bowl In Yellow",
		"applink": {
			"ios_url": "example-ios://electronic/db_2",
			"ios_app_store_id": "123",
			"ios_app_name": "Electronic Example iOS",
			"android_url": "example-android://electronic/db_2",
			"android_package": "com.electronic.example",
			"android_app_name": "Electronic Example Android",
			"windows_phone_url": "example-windows://electronic/db_2",
			"windows_phone_app_id": "64ec0d1b-5b3b-4c77-a86b-5e12d465edc0",
			"windows_phone_app_name": "Electronic Example Windows"
		},
		"description": "Solid plastic Dog Bowl in yellow color",
		"google_product_category": "Animals > Pet Supplies",
		"product_type": "Bowls & Dining > Food & Water Bowls",
		"link": "http://www.example.com/bowls/db-2.html",
		"image_link": "http://images.example.com/DB_2.png",
		"condition": "new",
		"availability": "in stock",
		"price": "9.99 GBP",
		"brand": "Example",
		"item_group_id": "DB_GROUP_1",
		"shipping": {
			"country": "UK",
			"service": "Standard",
			"price": "9.95 GBP"
		},
		"custom_label_0": "Made in Waterford, IE"
	}
]

Output

<?xml version="1.0"?>
<rss xmlns:g="http://base.google.com/ns/1.0" version="2.0">
  <channel>
    <title>Test Store</title>
    <link>http://www.example.com</link>
    <description>An example item from the feed</description>
    <item>
      <g:id>DB_1</g:id>
      <g:title>Dog Bowl In Blue</g:title>
      <applink property="ios_url" content="example-ios://electronic/db_1"/>
      <applink property="ios_app_store_id" content="123"/>
      <applink property="ios_app_name" content="Electronic Example iOS"/>
      <applink property="android_url" content="example-android://electronic/db_1"/>
      <applink property="android_package" content="com.electronic.example"/>
      <applink property="android_app_name" content="Electronic Example Android"/>
      <applink property="windows_phone_url" content="example-windows://electronic/db_1"/>
      <applink property="windows_phone_app_id" content="64ec0d1b-5b3b-4c77-a86b-5e12d465edc0"/>
      <applink property="windows_phone_app_name" content="Electronic Example Windows"/>
      <g:description>Solid plastic Dog Bowl in marine blue color</g:description>
      <g:google_product_category>Animals &gt; Pet Supplies</g:google_product_category>
      <g:product_type>Bowls &amp; Dining &gt; Food &amp; Water Bowls</g:product_type>
      <g:link>http://www.example.com/bowls/db-1.html</g:link>
      <g:image_link>http://images.example.com/DB_1.png</g:image_link>
      <g:condition>new</g:condition>
      <g:availability>in stock</g:availability>
      <g:price>9.99 GBP</g:price>
      <g:brand>Example</g:brand>
      <g:item_group_id>DB_GROUP_1</g:item_group_id>
      <g:shipping>
        <g:country>UK</g:country>
        <g:service>Standard</g:service>
        <g:price>9.95 GBP</g:price>
      </g:shipping>
      <g:custom_label_0>Made in Waterford, IE</g:custom_label_0>
    </item>
    <item>
      <g:id>DB_2</g:id>
      <g:title>Dog Bowl In Yellow</g:title>
      <applink property="ios_url" content="example-ios://electronic/db_2"/>
      <applink property="ios_app_store_id" content="123"/>
      <applink property="ios_app_name" content="Electronic Example iOS"/>
      <applink property="android_url" content="example-android://electronic/db_2"/>
      <applink property="android_package" content="com.electronic.example"/>
      <applink property="android_app_name" content="Electronic Example Android"/>
      <applink property="windows_phone_url" content="example-windows://electronic/db_2"/>
      <applink property="windows_phone_app_id" content="64ec0d1b-5b3b-4c77-a86b-5e12d465edc0"/>
      <applink property="windows_phone_app_name" content="Electronic Example Windows"/>
      <g:description>Solid plastic Dog Bowl in yellow color</g:description>
      <g:google_product_category>Animals &gt; Pet Supplies</g:google_product_category>
      <g:product_type>Bowls &amp; Dining &gt; Food &amp; Water Bowls</g:product_type>
      <g:link>http://www.example.com/bowls/db-2.html</g:link>
      <g:image_link>http://images.example.com/DB_2.png</g:image_link>
      <g:condition>new</g:condition>
      <g:availability>in stock</g:availability>
      <g:price>9.99 GBP</g:price>
      <g:brand>Example</g:brand>
      <g:item_group_id>DB_GROUP_1</g:item_group_id>
      <g:shipping>
        <g:country>UK</g:country>
        <g:service>Standard</g:service>
        <g:price>9.95 GBP</g:price>
      </g:shipping>
      <g:custom_label_0>Made in Waterford, IE</g:custom_label_0>
    </item>
  </channel>
</rss>

Test

Test with mocha

$ grunt

like watch

$ grunt watch

Contributing

Bug reports and pull requests are welcome on Github at https://github.com/egg-/fbcatalog

  1. Fork it
  2. Create your feature branch.
  3. Commit your changes.
  4. Push to the branch.
  5. Create a new Pull Request.

Release History

See the CHANGELOG.md

License

fbcatalog is licensed under the MIT license.