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

link-meta

v1.0.1

Published

The definition of a blog type link-meta and supporting code generated by dfon2json

Downloads

4

Readme

link-meta

Definition of a blog media type.

Scope

A Link Meta is a data type, a kind of blog media type.

This document serves the purpose of defining a Link Meta and a means by which it may be introduced into programming languages for use.

This repository may include code and methods for including the package in dependent programs.

Method of Description

A blog media type is a type of media along with a meta description of the media rendered/stored as a type.

A link-meta is an instance of a blog-type

Definition Origination

Definitions are cast in the dfon format. This is a format defined in a project, dfon2json.

definition: blog_type

Def:> file(def-${typename})       // def-blog_type.json
typename : blog_type
fields : #{
    creator :   <string|<UCWID>>
    email :     <string|<e-mail>[5,256]>
    title :     <string|[1,256]>
    subject :   <string|[1,256]>
    keys : [<token>]
    txt_full :  <string>
}
inherit : none
role : base

definition: link_meta

The following is the dfon definition of a the link-meta blog media type:

Def:> file(def-${typename})       // def-link_meta.json
typename : link_meta
fields : #{
    presentation : <string|<media-specifier>>
    links : [<string|<URL>>]
    link_map : { <token> : <string|<URL>> }             // A token provides an binding hint... instantiators use for injesting a link meta
    reverse_link_map : { <string|<URL>> : <token> }     // link meta managers may search for a token in a binding given a link as a key...
}
inherit : blog_type
role : impl


NPM Installation

npm install link-meta

use

Use in a node.js JavaScript program.

// Import the link meta class
const Link_meta = require('link-meta')

// create a new instance of the class (default values)
let a_link_meta = new Link_meta()

// Set specific fields
a_link_meta.set_from_map({
	"creator" : "the creator person",
	"email" : "[email protected]"
})


// set values throught the code

a_link_meta.title = "My Latest Opus"

// get values throughout the code 
let edit_title = a_link_meta.title

// set a map value

a_link_meta.set_link_map("that_link_id","https://linked.to/this/stuff")

// get a map value 
let what_is_that_url = a_link_meta.get_link_map("that_link_id")

// delete key-value pair
a_link_meta.del_link_map("that_link_id")

// Array operations

a_link_meta.push_links("https://linked.to/this/stuff")
a_link_meta.pop_links()