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

wikid

v0.1.10

Published

A javascript wiki parser

Downloads

8

Readme

Wikid.js

A js based wiki parser

Build Status Bower version

So, why another markup language? I needed a js based wiki parser for my claims.io product.

For most non-technical users Markdown can be hard to grasp (the double space line endings annoy me). I have used the wikis in both JIRA and You Track for many years, so decided to take the best parts of both languages and provide a javascript option.

Installation

To install the Wikid.js parser execute one of the following commands.

Client side install:

bower install wikid --save

Node.js install (coming soon):

npm install wikid --save

Usage

To convert wiki text to html, you simply need to call the Wikid.toHtml(text) function and pass in the text you wish to convert.

var html = Wikid.toHtml('*hello* _world_!');

If you have some free time, feel free to send a PR for Wikid.toText(text) (a function for stripping out the markup).

Wiki Markup

Coming soon

EBNF

Under Development

The wiki format conforms to the following EBNF (Extended Backus-Naur Form) definition.

Article:

WikiArticle
    =   [ Whitespaces ] , Paragraphs , EOF
    ;
Paragraphs
    =   { Paragraph }*
    ;
Paragraph
    =   NoWikiBlock
    |   Blanks , ParagraphSeparator
    |   [ Blanks ] 
            (   Heading
            |   HorizontalRule
            |   List
            |   TextParagraph
            ) ,
        [ ParagraphSeparator ]
    ;
ParagraphSeparator
    =   { NewLine }+
    |   EOF
    ;

Text:

TextParagraph
    =   { TextLines }+
    ;
TextLines
    =   { TextLine }* TextLineSeparator
    ;
TextLine
    =   [ Blanks ] , { TextFormatted | TextUnformatted }*
    ;
TextFormatted
    =   TextItalic
    |   TextBold
    ;
TextUnformatted
    =   UnicodeText - 
        (   TextLineSeparator 
        |   NoWiki
        |   TextFormatted
        )
    ;
TextItalic
    =   Plus , 
        (   {   UnicodeText
            |   TextBold
            }+
        ) - ( Plus | TextLineSeparator ) , Plus
    ;
TextBold
    =   Star , 
        (   {   UnicodeText
            |   TextItalic
            }+
        ) - ( Star | TextLineSeparator ) , Star
    ;
NoWikiBlock
    =   NoWiki , ( UnicodeText - NoWiki ) , NoWiki
    ;
TextLineSeparator
    =   NewLine
    |   EOF
    ;

Headings:

Heading
    =   Heading1
    |   Heading2
    |   Heading3
    |   Heading4
    |   Heading5
    |   Heading6
        { Blanks }+ , HeadingContent , [ Blanks ] , ParagraphSeparator
    ;
Heading1
    =   "h1."
    ;
Heading2
    =   "h2."
    ;
Heading3
    =   "h3."
    ;
Heading4
    =   "h4."
    ;
Heading5
    =   "h5."
    ;
Heading6
    =   "h6."
    ;
HeadingContent
    =   UnicodeText - ParagraphSeparator
    ;

Rule:

HorizontalRule
    = "----" , [ Blanks ] , ParagraphSeparator
    ;

Lists:

List
    =   ( ListUnordered | ListOrdered ) , EndOfList
    ;
ListUnordered
    =   { ListUnorderedItem }+
    ;
ListUnorderedItem
    =   ( Star | Hyphen ) , ListItemContent
    ;
ListOrdered
    =   { ListOrderedItem }+ 
    ;
ListOrderedItem
    =   Hash , ListItemContent
    ;
ListItemContent
    =   Blanks , TextLine , ListItemSeparator
    ;
ListItemSeparator
    =   [ Blanks ] , NewLine
    |   EOF
    ;
EndOfList
    =   NewLine
    |   EOF
    ;

Basics:

NoWiki
    =   "{nowiki}"
    ;
Whitespaces
    =   { NewLine | Blanks }*
    ;
NewLine
    =   ?line feed?
    ;
UnicodeText
    =   { UnicodeCharacter }*   
    ;
UnicodeCharacter
    =   ?Unicode character?
    ;
Blanks
    =   { ?space? | ?tab? | ?space variant? }*
    ;
EOF
    =   ?end of file?
    ;
Star    
    =   "*" 
    ;
Hash
    =   "#"
    ;
Hyphen
    =   "-"
    ;
Plus
    =   "+"
    ;

    

Inspiration for this definition was derived from the Creole Grammar.

I'm by no means a grammar expert, if you have any suggestions on how to improve it I'd be keen to hear from you.