# wp-shortcodes.js

> Parse and render Wordpress style shortcodes

Latest version **0.0.1** (published 2016-05-21) · MIT license · 0 weekly downloads

## Install

```sh
npm install wp-shortcodes.js
pnpm add wp-shortcodes.js
yarn add wp-shortcodes.js
bun add wp-shortcodes.js
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.0.1 |
| Published | 2016-05-21 |
| First published | 2016-05-21 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 1 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | Alex Choi |
| Maintainers | achoi |
| Keywords | Shortcode, Wordpress |

## Links

- npm: https://www.npmjs.com/package/wp-shortcodes.js
- Repository: https://github.com/ayc/wp-shortcodes.js
- Homepage: https://github.com/ayc/wp-shortcodes.js#readme
- Issues: https://github.com/ayc/wp-shortcodes.js/issues
- npm.io page: https://npm.io/package/wp-shortcodes.js

## Dependencies (1)

- [chai](https://npm.io/package/chai.md) ^3.5.0

## Recent versions

- 0.0.1 (latest) — 2016-05-21

## README

# wp-shortcodes.js [![Build Status](https://travis-ci.org/ayc/wp-shortcodes.js.svg?branch=master)](https://travis-ci.org/ayc/wp-shortcodes.js)
Render WP style shortcodes with your own custom rules

Inspired by [shortcode.js](https://github.com/nicinabox/shortcode.js)

## Usage

```javascript
var text = "[first name=hello] [second]world![/second]";

var tags = {
	first: function(){
		return this.options.name;
	},
	second: function(){
		return this.contents;
	}
}

var out = new Shortcode(text, tags).get();
console.log(out); // hello world!
```

## How to Test

Tests are run with mocha/chai

```bash
>npm test
```

---
_Source: https://npm.io/package/wp-shortcodes.js · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
