[Pkg-javascript-commits] [node-parse-base64vlq-mappings] 07/26: adding example to readme

Bastien Roucariès rouca at moszumanska.debian.org
Mon Sep 18 09:24:04 UTC 2017


This is an automated email from the git hooks/post-receive script.

rouca pushed a commit to branch master
in repository node-parse-base64vlq-mappings.

commit c4aee9d3a6aa87524b84c28a67645f75cbec24cb
Author: Thorsten Lorenz <thlorenz at gmx.de>
Date:   Wed Mar 13 08:02:43 2013 -0400

    adding example to readme
---
 README.md | 27 +++++++++++++++++++++++++++
 1 file changed, 27 insertions(+)

diff --git a/README.md b/README.md
index bc6d7c4..e586abc 100644
--- a/README.md
+++ b/README.md
@@ -4,3 +4,30 @@ Parses out base64 VLQ encoded mappings.
 
 The code is mostly lifted from [mozilla's source-map module](https://github.com/mozilla/source-map) in order to separate
 out the parse function into its own module.
+
+```js
+var parse = require('parse-base64vlq-mappings');
+
+var mappings = parse('AAAA;AACA;AACA;AACA;AACA');
+console.log(mappings);
+```
+
+```
+[ { generated: { line: 1, column: 0 },
+    original: { line: 1, column: 0 } },
+  { generated: { line: 2, column: 0 },
+    original: { line: 2, column: 0 } },
+  { generated: { line: 3, column: 0 },
+    original: { line: 3, column: 0 } },
+  { generated: { line: 4, column: 0 },
+    original: { line: 4, column: 0 } },
+  { generated: { line: 5, column: 0 },
+    original: { line: 5, column: 0 } } ]
+```
+
+## Caveat
+
+Main intended use is either for testing generated mappings and to add offsets to them.
+
+Therefore is is assumed that all mappings relate to the same generated/original file, i.e. no information but 
+information but generated line and column vs. original line and column is preserved.

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-javascript/node-parse-base64vlq-mappings.git



More information about the Pkg-javascript-commits mailing list