[Pkg-javascript-commits] [node-parse-base64vlq-mappings] 13/26: removing unnecessary code

Bastien Roucariès rouca at moszumanska.debian.org
Mon Sep 18 09:24:05 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 abfce63af723f174d47727941e0bd4b07c6ed0f3
Author: Thorsten Lorenz <thlorenz at gmx.de>
Date:   Wed Mar 13 08:18:39 2013 -0400

    removing unnecessary code
---
 README.md | 2 ++
 index.js  | 8 +++-----
 2 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/README.md b/README.md
index 693e7be..854d4ed 100644
--- a/README.md
+++ b/README.md
@@ -31,3 +31,5 @@ Main intended use is either for testing generated mappings or to add offsets to
 
 Therefore is is assumed that all mappings relate to the same generated/original file, i.e. only information about
 generated line and column vs. original line and column is preserved.
+
+Additionally all name information is disregarded during the parse.
diff --git a/index.js b/index.js
index 6b4d67f..da5782b 100644
--- a/index.js
+++ b/index.js
@@ -13,8 +13,6 @@ module.exports = function parse(str_) {
     , previousGeneratedColumn =  0
     , previousOriginalLine    =  0
     , previousOriginalColumn  =  0
-    , previousSource          =  0
-    , previousName            =  0
     , mappingSeparator = /^[,;]/
     , mappings = []
     , str = str_ 
@@ -44,7 +42,6 @@ module.exports = function parse(str_) {
         // Original source.
         temp = base64VLQ.decode(str);
 
-        previousSource += temp.value;
         str = temp.rest;
         if (str.length === 0 || mappingSeparator.test(str.charAt(0))) {
           throw new Error('Found a source, but no line and column');
@@ -67,13 +64,14 @@ module.exports = function parse(str_) {
         previousOriginalColumn = mapping.original.column;
         str = temp.rest;
 
-        if (str.length > 0 && !mappingSeparator.test(str.charAt(0))) {
+        // XXX: all name information is currently lost which may not be desirable
+        /*if (str.length > 0 && !mappingSeparator.test(str.charAt(0))) {
           // Original name.
           temp = base64VLQ.decode(str);
           mapping.name = this._names.at(previousName + temp.value);
           previousName += temp.value;
           str = temp.rest;
-        }
+        }*/
       }
 
       mappings.push(mapping);

-- 
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