[Pkg-javascript-commits] [node-entities] 55/63: readme: stripped useless information
Wolfgang Borgert
debacle at moszumanska.debian.org
Mon Sep 22 08:15:49 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 939f2387d16a064ce8889805900b16a0577d9780
Author: Felix Böhm <me at feedic.com>
Date: Mon Mar 17 21:31:29 2014 +0100
readme: stripped useless information
As long as `encode`/`decode` aren't really useful, their use shouldn't be promoted. Also, the module is now much simpler to understand.
---
readme.md | 16 ++++++----------
1 file changed, 6 insertions(+), 10 deletions(-)
diff --git a/readme.md b/readme.md
index 88dfa26..e660b4a 100644
--- a/readme.md
+++ b/readme.md
@@ -2,11 +2,6 @@
En- & decoder for XML/HTML entities.
-####Features:
-* Focussed on ___speed___
-* Supports three levels of entities: __XML__, __HTML4__ & __HTML5__
- * Supports _char code_ entities (eg. `U`)
-
##How to…
###…install `entities`
@@ -16,15 +11,16 @@ En- & decoder for XML/HTML entities.
###…use `entities`
```javascript
+var entities = require("entities");
//encoding
-require("entities").encode(<str> data[, <int> level]);
+entities.encodeXML("&"); // "&"
+entities.encodeHTML("&"); // "&#38;"
//decoding
-require("entities").decode(<str> data[, <int> level]);
+entities.decodeXML("asdf & ÿ ü '"); // "asdf & ÿ ü '"
+entities.decodeHTML("asdf & ÿ ü '"); // "asdf & ÿ ü '"
```
-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 extend API -->
---
--
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