detect-templating-language 3.0.6 → 3.0.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @name detect-templating-language
|
|
3
3
|
* @fileoverview Detects various templating languages present in string
|
|
4
|
-
* @version 3.0.
|
|
4
|
+
* @version 3.0.7
|
|
5
5
|
* @author Roy Revelt, Codsen Ltd
|
|
6
6
|
* @license MIT
|
|
7
7
|
* {@link https://codsen.com/os/detect-templating-language/}
|
|
@@ -11,7 +11,7 @@ import { isJinjaNunjucksRegex } from 'regex-is-jinja-nunjucks';
|
|
|
11
11
|
import { isJSP } from 'regex-is-jsp';
|
|
12
12
|
import { isJinjaSpecific } from 'regex-jinja-specific';
|
|
13
13
|
|
|
14
|
-
var version$1 = "3.0.
|
|
14
|
+
var version$1 = "3.0.7";
|
|
15
15
|
|
|
16
16
|
const version = version$1;
|
|
17
17
|
function detectLang(str) {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @name detect-templating-language
|
|
3
3
|
* @fileoverview Detects various templating languages present in string
|
|
4
|
-
* @version 3.0.
|
|
4
|
+
* @version 3.0.7
|
|
5
5
|
* @author Roy Revelt, Codsen Ltd
|
|
6
6
|
* @license MIT
|
|
7
7
|
* {@link https://codsen.com/os/detect-templating-language/}
|
|
@@ -11,8 +11,8 @@
|
|
|
11
11
|
/**
|
|
12
12
|
* @name regex-is-jinja-nunjucks
|
|
13
13
|
* @fileoverview Regular expression for detecting Jinja or Nunjucks code
|
|
14
|
-
* @version 3.0.
|
|
14
|
+
* @version 3.0.7
|
|
15
15
|
* @author Roy Revelt, Codsen Ltd
|
|
16
16
|
* @license MIT
|
|
17
17
|
* {@link https://codsen.com/os/regex-is-jinja-nunjucks/}
|
|
18
|
-
*/e.detectLang=function(e){let t=null;if("string"!=typeof e)throw new TypeError(`detect-templating-language: [THROW_ID_01] Input must be string! It was given as ${JSON.stringify(e,null,4)} (type ${typeof e}).`);return e?(/{%|{{|%}|}}/gi.test(e)?(t="Nunjucks",/(set\s*[\w]+\s*=\s*namespace\()|({{['"][\w]+['"]\s+if)|(['"]%x?[+0]?[.>^<]?\d+[\w%]['"]\|format\()/gi.test(e)&&(t="Jinja")):/<%|%>|<\s*jsp:|<\s*cms:|<\s*c:|\${\s*jsp/gi.test(e)&&(t="JSP"),{name:t}):{name:t}},e.version="3.0.
|
|
18
|
+
*/e.detectLang=function(e){let t=null;if("string"!=typeof e)throw new TypeError(`detect-templating-language: [THROW_ID_01] Input must be string! It was given as ${JSON.stringify(e,null,4)} (type ${typeof e}).`);return e?(/{%|{{|%}|}}/gi.test(e)?(t="Nunjucks",/(set\s*[\w]+\s*=\s*namespace\()|({{['"][\w]+['"]\s+if)|(['"]%x?[+0]?[.>^<]?\d+[\w%]['"]\|format\()/gi.test(e)&&(t="Jinja")):/<%|%>|<\s*jsp:|<\s*cms:|<\s*c:|\${\s*jsp/gi.test(e)&&(t="JSP"),{name:t}):{name:t}},e.version="3.0.7",Object.defineProperty(e,"__esModule",{value:!0})}));
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "detect-templating-language",
|
|
3
|
-
"version": "3.0.
|
|
3
|
+
"version": "3.0.7",
|
|
4
4
|
"description": "Detects various templating languages present in string",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"check",
|
|
@@ -72,9 +72,9 @@
|
|
|
72
72
|
},
|
|
73
73
|
"dependencies": {
|
|
74
74
|
"@babel/runtime": "^7.16.3",
|
|
75
|
-
"regex-is-jinja-nunjucks": "^3.0.
|
|
76
|
-
"regex-is-jsp": "^3.0.
|
|
77
|
-
"regex-jinja-specific": "^3.0.
|
|
75
|
+
"regex-is-jinja-nunjucks": "^3.0.7",
|
|
76
|
+
"regex-is-jsp": "^3.0.7",
|
|
77
|
+
"regex-jinja-specific": "^3.0.7"
|
|
78
78
|
},
|
|
79
79
|
"devDependencies": {
|
|
80
80
|
"@babel/cli": "^7.16.0",
|
|
@@ -96,21 +96,21 @@
|
|
|
96
96
|
"@rollup/plugin-node-resolve": "^13.0.6",
|
|
97
97
|
"@rollup/plugin-strip": "^2.1.0",
|
|
98
98
|
"@rollup/plugin-typescript": "^8.3.0",
|
|
99
|
-
"@types/node": "^16.11.
|
|
99
|
+
"@types/node": "^16.11.10",
|
|
100
100
|
"@types/tap": "^15.0.5",
|
|
101
|
-
"@typescript-eslint/eslint-plugin": "^5.
|
|
102
|
-
"@typescript-eslint/parser": "^5.
|
|
103
|
-
"core-js": "^3.19.
|
|
101
|
+
"@typescript-eslint/eslint-plugin": "^5.5.0",
|
|
102
|
+
"@typescript-eslint/parser": "^5.5.0",
|
|
103
|
+
"core-js": "^3.19.2",
|
|
104
104
|
"cross-env": "^7.0.3",
|
|
105
105
|
"eslint": "^8.3.0",
|
|
106
|
-
"lect": "^0.18.
|
|
107
|
-
"rollup": "^2.60.
|
|
106
|
+
"lect": "^0.18.7",
|
|
107
|
+
"rollup": "^2.60.1",
|
|
108
108
|
"rollup-plugin-ascii": "^0.0.3",
|
|
109
109
|
"rollup-plugin-banner": "^0.2.1",
|
|
110
110
|
"rollup-plugin-cleanup": "^3.2.1",
|
|
111
111
|
"rollup-plugin-dts": "^4.0.1",
|
|
112
112
|
"rollup-plugin-terser": "^7.0.2",
|
|
113
|
-
"tap": "^15.1.
|
|
113
|
+
"tap": "^15.1.5",
|
|
114
114
|
"tslib": "^2.3.1",
|
|
115
115
|
"typescript": "^4.5.2"
|
|
116
116
|
},
|