Gathering detailed insights and metrics for @orbiting/remark-preset
Gathering detailed insights and metrics for @orbiting/remark-preset
Gathering detailed insights and metrics for @orbiting/remark-preset
Gathering detailed insights and metrics for @orbiting/remark-preset
Mdast utils developed at Project R. Tools for rendering, serializing and specifying markdown documents.
npm install @orbiting/remark-preset
Typescript
Module System
Node Version
NPM Version
70.5
Supply Chain
98.1
Quality
77.9
Maintenance
50
Vulnerability
100
License
JavaScript (97.83%)
Shell (2.17%)
Total Downloads
0
Last Day
0
Last Week
0
Last Month
0
Last Year
0
14 Stars
81 Commits
2 Forks
1 Watchers
5 Branches
5 Contributors
Updated on Jun 21, 2023
Latest Version
1.2.4
Package Id
@orbiting/remark-preset@1.2.4
Unpacked Size
41.17 kB
Size
8.71 kB
File Count
24
NPM Version
5.6.0
Node Version
8.9.4
Cumulative downloads
Total Downloads
Last Day
0%
NaN
Compared to previous day
Last Week
0%
NaN
Compared to previous week
Last Month
0%
NaN
Compared to previous month
Last Year
0%
NaN
Compared to previous year
Preconfigured remark for our projects.
parse
1import { parse } from '@orbiting/remark-preset' 2 3parse(md): Mdast
md
: String
The markdown to parse.
Returns a mdast tree.
stringify
1import { stringify } from '@orbiting/remark-preset' 2 3stringify(mdast): String
mdast
: Object
The mdast tree to stringify.
Returns a markdown string.
zone
1<section><h6>IDENTIFIER</h6> 2 3Group arbitrary markdown 4 5<hr /></section>
Yields following AST:
1{ 2 type: 'zone', 3 identfier: 'IDENTIFIER', 4 children: [{type: 'paragraph', children: [ 5 {type: 'text', value: 'Group arbitrary markdown'} 6 ]}] 7}
Zones can be nested and can have data (stringified as json in a code node). Under the hood the zone type is expanded and collapsed into flat nodes wrapped by html
nodes with the section markup.
sub
and sup
Types1# CO<sub>2</sub> 2 340 µg/m<sup>3</sup>
Yields following AST:
1[ 2 { 3 type: 'heading', 4 depth: 1, 5 children: [ 6 {type: 'text', value: 'CO'}, 7 { 8 type: 'sub', 9 children: [ 10 {type: 'text', value: '2'} 11 ] 12 } 13 ] 14 }, 15 { 16 type: 'paragraph', 17 children: [ 18 {type: 'text', value: '40 µg/m'}, 19 { 20 type: 'sup', 21 children: [ 22 {type: 'text', value: '3'} 23 ] 24 } 25 ] 26 } 27]
span
TypeNeed custom inline nodes? Use span
.
1<span data-number="10000">10'000</span>
Yields following AST:
1{ 2 type: 'paragraph', 3 children: [ 4 { 5 type: 'span', 6 data: { 7 number: '10000' 8 }, 9 children: [ 10 { 11 type: 'text', 12 value: '10\'000' 13 } 14 ] 15 } 16 ] 17}
node.data
must be a flat object with only strings. Each key gets mapped to its own data attribute. You can store complex data, if you really need to, by using one key with stringified json.
Yaml meta data on root.meta
. Powered by js-yaml
and remark-frontmatter
.
If want only want the features and configure the unified processors yourself, you can import them individually:
1import unified from 'unified' 2import remarkStringify from 'remark-stringify' 3import remarkParse from 'remark-parse' 4import frontmatter from 'remark-frontmatter' 5 6import * as meta from '@orbiting/remark-preset/lib/meta' 7import * as zone from '@orbiting/remark-preset/lib/zone' 8import * as tag from '@orbiting/remark-preset/lib/tag' 9import * as span from '@orbiting/remark-preset/lib/span' 10 11unified() 12 .use(remarkParse, { 13 // your options 14 }) 15 .use(frontmatter, ['yaml']) 16 .use(meta.parse) 17 .use(zone.collapse({ 18 test: ({type, value}) => { 19 // your logic 20 }, 21 mutate: (start, nodes, end) => { 22 // your logic 23 return { 24 type: 'zone', 25 children: nodes 26 } 27 } 28 })) 29 .use(span.collapse) 30 .use(tag.collapse('sub')) 31 32const stringifier = unified() 33 .use(remarkStringify, { 34 // your options 35 }) 36 .use(frontmatter, ['yaml']) 37 .use(meta.format) 38 .use(zone.expand({ 39 test: ({type}) => type === 'zone', 40 mutate: (node) => { 41 // your logic 42 return [ 43 { 44 type: 'html', 45 value: `<section>` 46 }, 47 ...node.children, 48 { 49 type: 'html', 50 value: '</section>' 51 } 52 ] 53 } 54 })) 55 .use(span.expand) 56 .use(tag.expand('sub'))
No vulnerabilities found.
Reason
no binaries found in the repo
Reason
Found 2/30 approved changesets -- score normalized to 0
Reason
project is archived
Details
Reason
no effort to earn an OpenSSF best practices badge detected
Reason
security policy file not detected
Details
Reason
license file not detected
Details
Reason
project is not fuzzed
Details
Reason
SAST tool is not run on all commits -- score normalized to 0
Details
Reason
107 existing vulnerabilities detected
Details
Score
Last Scanned on 2025-07-07
The Open Source Security Foundation is a cross-industry collaboration to improve the security of open source software (OSS). The Scorecard provides security health metrics for open source projects.
Learn More