[Pkg-javascript-commits] [node-acorn-jsx] 157/484: More concise way of slicing off the last character

Bastien Roucariès rouca at moszumanska.debian.org
Sat Aug 19 14:20:19 UTC 2017


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

rouca pushed a commit to branch master
in repository node-acorn-jsx.

commit 9ff4981ca2e6f274d3e89a6d1d21e7e015b93af9
Author: Aparajita Fishman <aparajita at aparajita.com>
Date:   Sat Oct 12 03:15:08 2013 -0400

    More concise way of slicing off the last character
---
 acorn.js | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/acorn.js b/acorn.js
index f966917..436a156 100644
--- a/acorn.js
+++ b/acorn.js
@@ -834,7 +834,7 @@
         ch = input.charCodeAt(++tokPos);
         var octal = /^[0-7]+/.exec(input.slice(tokPos, tokPos + 3));
         if (octal) octal = octal[0];
-        while (octal && parseInt(octal, 8) > 255) octal = octal.slice(0, octal.length - 1);
+        while (octal && parseInt(octal, 8) > 255) octal = octal.slice(0, -1);
         if (octal === "0") octal = null;
         ++tokPos;
         if (octal) {

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-javascript/node-acorn-jsx.git



More information about the Pkg-javascript-commits mailing list