Comparing version 1.1.2 to 1.1.3
{ | ||
"name": "apg-exp", | ||
"version": "1.1.2", | ||
"version": "1.1.3", | ||
"description": "Pattern-matching tool similar to RegExp, except uses ABNF grammar instead of regular expressions.", | ||
@@ -11,3 +11,5 @@ "main": "./src/apg-exp.js", | ||
"src", | ||
"guide", | ||
"apgexp.js", | ||
"apgexp-min.js", | ||
"apgexp.css", | ||
@@ -14,0 +16,0 @@ "index.md", |
@@ -15,2 +15,4 @@ // This function is used to generate a browser-accessible copy of `apg-exp`. | ||
// <link rel="stylesheet" href="apgexp.css"> | ||
// <script src="apgexp.js" charset="utf-8"></script> | ||
// <!-- or --> | ||
// <script src="apgexp-min.js" charset="utf-8"></script> | ||
@@ -22,3 +24,3 @@ // ... | ||
// in your web page JavaScript | ||
// through the variables `window.apgexp` | ||
// through the variables `window.ApgExp` | ||
// and `window.apglib` . e. g. | ||
@@ -35,3 +37,3 @@ // ``` | ||
// var result = exp.exec(str); | ||
// ... /* do something with result */ | ||
// /* do something with result */ | ||
// /* | ||
@@ -41,3 +43,3 @@ // * use an apg-lib utilities function | ||
// var strHtml = apglib.utils.stringToAsciiHtml(str); | ||
// ... /* do something with strHtml */ | ||
// /* do something with strHtml */ | ||
// } | ||
@@ -44,0 +46,0 @@ // </script> |
@@ -195,16 +195,16 @@ // This module defines all of the display functions. Text and HTML displays of | ||
txt += "alias:\n"; | ||
txt += " [$_]: "; | ||
txt += ' ["$_"]: '; | ||
txt += exp['$_']; | ||
txt += "\n"; | ||
txt += " [$`]: "; | ||
txt += ' ["$`"]: '; | ||
txt += exp['$`']; | ||
txt += "\n"; | ||
txt += " [$&]: "; | ||
txt += '\n'; | ||
txt += ' ["$&"]: '; | ||
txt += exp['$&']; | ||
txt += "\n"; | ||
txt += " [$']: "; | ||
txt += '\n'; | ||
txt += ' ["$\'"]: '; | ||
txt += exp["$'"]; | ||
txt += "\n"; | ||
txt += '\n'; | ||
for ( var name in exp.rules) { | ||
txt += " [${" + name + "}]: " | ||
txt += ' ["${' + name + '}"]: ' | ||
txt += exp['${' + name + '}']; | ||
@@ -300,3 +300,3 @@ txt += "\n"; | ||
html += '<tr>'; | ||
html += '<td>[$_]</td>'; | ||
html += '<td>["$_"]</td>'; | ||
html += '<td>' + phraseStyle(exp['$_']) + '</td>'; | ||
@@ -306,3 +306,3 @@ html += '</tr>\n'; | ||
html += '<tr>'; | ||
html += '<td>[$`]</td>'; | ||
html += '<td>["$`"]</td>'; | ||
html += '<td>' + phraseStyle(exp['$`']) + '</td>'; | ||
@@ -312,3 +312,3 @@ html += '</tr>\n'; | ||
html += '<tr>'; | ||
html += '<td>[$&]</td>'; | ||
html += '<td>["$&"]</td>'; | ||
html += '<td>' + phraseStyle(exp['$&'], "match") + '</td>'; | ||
@@ -318,3 +318,3 @@ html += '</tr>\n'; | ||
html += '<tr>'; | ||
html += '<td>[$\']</td>'; | ||
html += '<td>["$\'"]</td>'; | ||
html += '<td>' + phraseStyle(exp['$\'']) + '</td>'; | ||
@@ -325,3 +325,3 @@ html += '</tr>\n'; | ||
html += '<tr>'; | ||
html += '<td>[${' + name + '}]</td>'; | ||
html += '<td>["${' + name + '}"]</td>'; | ||
html += '<td>' + phraseStyle(exp['${' + name + '}']) + '</td>'; | ||
@@ -574,16 +574,16 @@ html += '</tr>\n'; | ||
txt += " alias:\n"; | ||
txt += " [$_]: "; | ||
txt += ' ["$_"]: '; | ||
txt += charsToMode(exp['$_'], mode); | ||
txt += "\n"; | ||
txt += " [$`]: "; | ||
txt += ' ["$`"]: '; | ||
txt += charsToMode(exp['$`'], mode); | ||
txt += "\n"; | ||
txt += " [$&]: "; | ||
txt += ' ["$&"]: '; | ||
txt += charsToMode(exp['$&'], mode); | ||
txt += "\n"; | ||
txt += " [$']: "; | ||
txt += ' ["$\'"]: '; | ||
txt += charsToMode(exp["$'"], mode); | ||
txt += "\n"; | ||
for ( var name in exp.rules) { | ||
txt += " [${" + name + "}]: " | ||
txt += ' ["${' + name + '}"]: ' | ||
txt += (exp['${' + name + '}']) ? charsToMode(exp['${' + name + '}'], mode) : "undefined"; | ||
@@ -686,3 +686,3 @@ txt += "\n"; | ||
html += '<tr>'; | ||
html += '<td>[$_]</td>'; | ||
html += '<td>["$_"]</td>'; | ||
html += '<td>' + phraseStyle(charsToMode(exp['$_'], mode)) + '</td>'; | ||
@@ -692,3 +692,3 @@ html += '</tr>\n'; | ||
html += '<tr>'; | ||
html += '<td>[$`]</td>'; | ||
html += '<td>["$`"]</td>'; | ||
html += '<td>' + phraseStyle(charsToMode(exp['$`'], mode)) + '</td>'; | ||
@@ -698,3 +698,3 @@ html += '</tr>\n'; | ||
html += '<tr>'; | ||
html += '<td>[$&]</td>'; | ||
html += '<td>["$&"]</td>'; | ||
html += '<td>' + phraseStyle(charsToMode(exp['$&'], mode), "match") + '</td>'; | ||
@@ -704,3 +704,3 @@ html += '</tr>\n'; | ||
html += '<tr>'; | ||
html += '<td>[$\']</td>'; | ||
html += '<td>["$\'"]</td>'; | ||
html += '<td>' + phraseStyle(charsToMode(exp['$\''], mode)) + '</td>'; | ||
@@ -711,3 +711,3 @@ html += '</tr>\n'; | ||
html += '<tr>'; | ||
html += '<td>[${' + name + '}]</td>'; | ||
html += '<td>["${' + name + '}"]</td>'; | ||
if (exp['${' + name + '}']) { | ||
@@ -714,0 +714,0 @@ html += '<td>' + phraseStyle(charsToMode(exp['${' + name + '}'], mode)) + '</td>'; |
Sorry, the diff of this file is too big to display
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Minified code
QualityThis package contains minified code. This may be harmless in some cases where minified code is included in packaged libraries, however packages on npm should not minify code.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
1140121
74
16023
0
3
7