shortcode-tree
Advanced tools
Comparing version 1.1.0 to 1.1.1
{ | ||
"name": "shortcode-tree", | ||
"version": "1.1.0", | ||
"version": "1.1.1", | ||
"description": "Parser library for reading short codes (BB codes) into a tree structure", | ||
@@ -5,0 +5,0 @@ "main": "src/index.js", |
# shortcode-tree | ||
A node.js parser library for reading shortcodes. | ||
[![npm](https://img.shields.io/npm/v/github.svg)](https://www.npmjs.com/package/shortcode-tree) | ||
[![npm](https://img.shields.io/npm/v/shortcode-tree.svg)](https://www.npmjs.com/package/shortcode-tree) | ||
[![Build Status](https://travis-ci.org/roydejong/shortcode-tree.svg?branch=master)](https://travis-ci.org/roydejong/shortcode-tree) | ||
@@ -28,5 +28,6 @@ | ||
- Parse individual BB code tags | ||
- Parse sets of mixed shortcodes and text/HTML into a tree structure | ||
- Parse individual shortcode fragments | ||
- Supports self-closing tags | ||
- Supports tag properties, with or without string literals and escape characters | ||
- Supports tag properties (with or without string literals) | ||
@@ -33,0 +34,0 @@ ## Installation |
@@ -14,4 +14,16 @@ class Shortcode { | ||
} | ||
hasProperty(key) { | ||
return this.properties && (typeof this.properties[key] !== "undefined"); | ||
} | ||
getProperty(key) { | ||
return this.hasProperty(key) ? this.properties[key] : null; | ||
} | ||
setProperty(key, value) { | ||
this.properties[key] = value; | ||
} | ||
} | ||
module.exports = Shortcode; |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
49232
787
172