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

microformat-tests

v0.1.23

Published

A microformat 2 testsuite

Downloads

11

Readme

Microformats test suite

This group of tests was built to test microformats parsers. The individual tests are files containing fragments of HTML. There is also a second a corresponding JSON file, which contains the expected output.

The tests are broken into sets within the tests directory of this project. They are first grouped by version. Some parsers only support a single version of microformats. They are then subdivided by the type of microformat i.e. h-card.

NPM

The test have been added to npm (Node Package Manager) and the latest version can be add to a project using the following command:

npm i microformats-tests --save

Contributing new tests or updating tests

This set of test belongs to the microformats community. If you find any errors in the current test or new patterns you believe should be in the test suite please feel free to send a pull request.

Notes on creating a new test

A test is built in two parts a HTML file, which contains a fragment of HTML to parse, and JSON file with the expected output from a parser.

  1. Within the “test” directory of this project select the correct directory for the version of microformats the test belongs to. If you are creating a test for a new microformats feature or exploring an issue please add these tests to the “experimental” directory.

  2. Within the correct directory add your new test to subdirecory with either the name of it format i.e. h-card or the name of the new feature.

  3. Create the HTML file. Add the smallest and clearest example of the markup you can. There is no need to add head or body tags etc.

  4. Create a JSON file with the same name as your HTML file. The JSON should be the expected output from a parser.

  5. Once you have created the test please update the change-log.html Add a h-entry with details of the test . At the bottom of the page please add yourself as a contributor on the authors list

Date format for testing purposes

Within the tests datetime formats are based on the HTML5 profile which is a subset of ISO8601 and allows a space to separate the date and time. To allow us to compare dates please provide a way for your parser to output dates/times with the follwing rules:

  • Date and time are separated by a spaces ie 2015-04-29 15:34
  • Date and time keeps the authored level of specificity ie 15:34 does NOT become 15:34:00
  • Times and timezones always use the : separator ie +01:30 NOT +0130
  • If used the zulu is always uppercase ie 2015-04-29 15:34Z

###License All content and code in this repo is released into the public domain.