[Pkg-javascript-commits] [node-entities] 03/63: Added readme
Wolfgang Borgert
debacle at moszumanska.debian.org
Mon Sep 22 08:15:43 UTC 2014
This is an automated email from the git hooks/post-receive script.
debacle pushed a commit to branch master
in repository node-entities.
commit 18698526f959570aa0e7c46e1a4a5859c7be5313
Author: Felix Böhm <me at feedic.com>
Date: Fri Jan 13 18:25:20 2012 +0100
Added readme
---
readme.md | 31 +++++++++++++++++++++++++++++++
1 file changed, 31 insertions(+)
diff --git a/readme.md b/readme.md
new file mode 100644
index 0000000..eefc853
--- /dev/null
+++ b/readme.md
@@ -0,0 +1,31 @@
+#entities
+
+En- & decoder for XML/HTML entities.
+
+####Features:
+* Focussed on ___speed___
+* Supports three levels of entities: __XML__, __HTML4__ & __HTML5__
+ * Supports _char code_ entities (eg. `U`)
+ * Special optimizations for XML: A more restrictive syntax allows faster parsing
+
+##How to…
+
+####…install `entities`
+
+ npm install entities
+
+###…use `entities`
+
+```javascript
+//encoding
+require("entities").encode(<str> data[, <int> level]);
+//decoding
+require("entities").decode(<str> data[, <int> level]);
+```
+
+The `level` attribute indicates what level of entities should be decoded (0 = XML, 1 = HTML4 and 2 = HTML5). The default is 0 (read: XML).
+
+There are also methods to access the level directly. Just append the name of the level to the action and you're ready to go (e.g. `encodeHTML4(data)`, `decodeXML(data)`).
+
+##TODO
+* There should be a way to remove tables that aren't used. The HTML5 table is pretty heavy, if it's not needed, it shouldn't be kept in memory.
\ No newline at end of file
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-javascript/node-entities.git
More information about the Pkg-javascript-commits
mailing list