bracketeer

0.0.5 • Public • Published

BRACKETEER

An easy to use node.js module to create double-bracket wiki links.

How to use it?

npm install bracketeer
var bracketeer = require('bracketeer');

var array = ["test", "guest", "user"];

var string = "Hey! this is a [[test]], it is just for testing purposes!"

string.bracketeer(array)

// #=> Hey! this is a <a href="/test">test</a>, it is just for testing purposes!

an array of strings is needed (best served by a database) because if the string is not found then it will put the class "missing" to the link, so you can easily style it differently.

var bracketeer = require('bracketeer');

var array = ["guest", "user"];

var string = "Hey! this is another [[test]], it is just for testing purposes!"

string.bracketeer(array)

// #=> Hey! this is a <a href="/test" class="missing">test</a>, it is just for testing purposes!

License

Copyright (c) 2013 F. Rick Reich & Ben Atkin. Licensed under the terms of the MIT license.

http://frickreich.mit-license.org/

Versions

Current Tags

  • Version
    Downloads (Last 7 Days)
    • Tag
  • 0.0.5
    1
    • latest

Version History

  • Version
    Downloads (Last 7 Days)
    • Published
  • 0.0.5
    1
  • 0.0.4
    1
  • 0.0.3
    1
  • 0.0.2
    1
  • 0.0.1
    1

Package Sidebar

Install

npm i bracketeer

Weekly Downloads

5

Version

0.0.5

License

MIT

Last publish

Collaborators

  • frickreich