New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

link-meta

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

link-meta

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

latest
Source
npmnpm
Version
1.0.1
Version published
Maintainers
1
Created
Source

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

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" : "creator@create.org"
})


// 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()


Keywords

blog-type

FAQs

Package last updated on 12 Jan 2022

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts