mf2utiljs
TypeScript icon, indicating that this package has built-in type declarations

0.0.1 • Public • Published

mf2utilsjs

This is a rough, incomplete Typescript port of Kyle Mahan's mf2util library, mostly so that I'd have something to use in my new eleventy powered blog.

Given that I've switched over to using webmention.io for my webmention support, I've skipped porting the webmention part of the library.

Although it may seem so superficially, this library isn't meant to to convert an mf2 parsed result into a jf2 result. The latter is meant to be an alternative, but simplified representation of an mf2 parsed result, but that's not what this library provides.

This library imposes a kind of domain level interpretation on mf2 results so that you can use the results more easily in, for example, a reply context or so that you can better render a webmention.

For example, one function, interpret, will try and interpret a URL as a permalink with a single post in it that is either a h-emtry or a h-event. There is, of course, no requirement that URLs contain single posts or that, if they do, that they must be

Readme

Keywords

none

Package Sidebar

Install

npm i mf2utiljs

Weekly Downloads

3

Version

0.0.1

License

ISC

Unpacked Size

154 kB

Total Files

14

Last publish

Collaborators

  • desmondrivet