isite 1.14.77 → 1.14.81

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,112 +1,154 @@
1
1
  exports = module.exports = function init(____0) {
2
- function escape(s) {
3
- if (!s) {
4
- return '';
5
- }
6
- if (typeof s !== 'string') {
7
- s = s.toString();
2
+ function escape(s) {
3
+ if (!s) {
4
+ return '';
5
+ }
6
+ if (typeof s !== 'string') {
7
+ s = s.toString();
8
+ }
9
+ return s.replace(/[\/\\^$*+?.()\[\]{}]/g, '\\$&');
8
10
  }
9
- return s.replace(/[\/\\^$*+?.()\[\]{}]/g, '\\$&');
10
- }
11
11
 
12
- if (____0.options.proto.object) {
13
- if (!Object.prototype.test) {
14
- Object.defineProperty(Object.prototype, 'test', {
15
- value: function (reg, flag = 'gium') {
16
- if (this === undefined || this === null) {
17
- return !1;
18
- }
19
- let txt = '';
12
+ if (____0.options.proto.object) {
13
+ if (!Object.prototype.test) {
14
+ Object.defineProperty(Object.prototype, 'test', {
15
+ value: function (reg, flag = 'gium') {
16
+ if (this === undefined || this === null) {
17
+ return !1;
18
+ }
19
+ let txt = '';
20
20
 
21
- if (this.endsWith) {
22
- txt = this.toString();
23
- } else if (this.endsWith) {
24
- txt = this.toISOString;
25
- } else {
26
- txt = JSON.stringify(this);
27
- }
21
+ if (this.endsWith) {
22
+ txt = this.toString();
23
+ } else if (this.endsWith) {
24
+ txt = this.toISOString;
25
+ } else {
26
+ txt = JSON.stringify(this);
27
+ }
28
28
 
29
- try {
30
- return new RegExp(reg, flag).test(txt);
31
- } catch (error) {
32
- return !1;
33
- }
34
- },
35
- });
36
- }
37
- if (!Object.prototype.like) {
38
- Object.defineProperty(Object.prototype, 'like', {
39
- value: function (name) {
40
- if (!name) {
41
- return !1;
42
- }
43
- if (name.indexOf('*') !== -1) {
44
- name = name.split('*');
45
- name.forEach((n, i) => {
46
- name[i] = escape(n);
29
+ try {
30
+ return new RegExp(reg, flag).test(txt);
31
+ } catch (error) {
32
+ return !1;
33
+ }
34
+ },
47
35
  });
48
- name = name.join('.*');
49
- } else {
50
- name = escape(name);
51
- }
52
- return this.test('^' + name + '$', 'gium');
53
- },
54
- });
55
- }
56
- if (!Object.prototype.contains) {
57
- Object.defineProperty(Object.prototype, 'contains', {
58
- value: function (name) {
59
- if (!name) {
60
- return !1;
61
- }
62
- return this.test('^.*' + escape(name) + '.*$', 'gium');
63
- },
64
- });
36
+ }
37
+ if (!Object.prototype.like) {
38
+ Object.defineProperty(Object.prototype, 'like', {
39
+ value: function (name) {
40
+ if (!name) {
41
+ return !1;
42
+ }
43
+ if (name.indexOf('*') !== -1) {
44
+ name = name.split('*');
45
+ name.forEach((n, i) => {
46
+ name[i] = escape(n);
47
+ });
48
+ name = name.join('.*');
49
+ } else {
50
+ name = escape(name);
51
+ }
52
+ return this.test('^' + name + '$', 'gium');
53
+ },
54
+ });
55
+ }
56
+ if (!Object.prototype.contains) {
57
+ Object.defineProperty(Object.prototype, 'contains', {
58
+ value: function (name) {
59
+ if (!name) {
60
+ return !1;
61
+ }
62
+ return this.test('^.*' + escape(name) + '.*$', 'gium');
63
+ },
64
+ });
65
+ }
65
66
  }
66
- }
67
67
 
68
- if (!String.prototype.test) {
69
- String.prototype.test = function (reg, flag = 'gium') {
70
- try {
71
- return new RegExp(reg, flag).test(this);
72
- } catch (error) {
73
- return !1;
74
- }
75
- };
76
- }
68
+ if (____0.options.proto.array) {
69
+ if (!Array.prototype.test) {
70
+ Array.prototype.test = function (reg, flag = 'gium') {
71
+ if (this === undefined || this === null) {
72
+ return !1;
73
+ }
77
74
 
78
- if (!String.prototype.like) {
79
- String.prototype.like = function (name) {
80
- if (!name) {
81
- return !1;
82
- }
83
- let r = !1;
84
- name.split('|').forEach((n) => {
85
- n = n.split('*');
86
- n.forEach((w, i) => {
87
- n[i] = escape(w);
88
- });
89
- n = n.join('.*');
90
- if (this.test('^' + n + '$', 'gium')) {
91
- r = !0;
75
+ try {
76
+ let txt = JSON.stringify(this);
77
+ return new RegExp(reg, flag).test(txt);
78
+ } catch (error) {
79
+ return !1;
80
+ }
81
+ };
92
82
  }
93
- });
94
- return r;
95
- };
96
- }
83
+ if (!Array.prototype.like) {
84
+ Array.prototype.like = function (name) {
85
+ if (!name) {
86
+ return !1;
87
+ }
88
+ if (name.indexOf('*') !== -1) {
89
+ name = name.split('*');
90
+ name.forEach((n, i) => {
91
+ name[i] = escape(n);
92
+ });
93
+ name = name.join('.*');
94
+ } else {
95
+ name = escape(name);
96
+ }
97
+ return this.test('^' + name + '$', 'gium');
98
+ };
99
+ }
100
+ if (!Array.prototype.contains) {
101
+ Array.prototype.contains = function (name) {
102
+ if (!name) {
103
+ return !1;
104
+ }
105
+ return this.test('^.*' + escape(name) + '.*$', 'gium');
106
+ };
107
+ }
108
+ }
109
+
110
+ if (!String.prototype.test) {
111
+ String.prototype.test = function (reg, flag = 'gium') {
112
+ try {
113
+ return new RegExp(reg, flag).test(this);
114
+ } catch (error) {
115
+ return !1;
116
+ }
117
+ };
118
+ }
97
119
 
98
- if (!String.prototype.contains) {
99
- String.prototype.contains = function (name) {
100
- let r = !1;
101
- if (!name) {
102
- return r;
103
- }
104
- name.split('|').forEach((n) => {
105
- if(n && this.test('^.*' + escape(n) + '.*$', 'gium')){
106
- r = !0
107
- }
108
- })
109
- return r;
110
- };
111
- }
120
+ if (!String.prototype.like) {
121
+ String.prototype.like = function (name) {
122
+ if (!name) {
123
+ return !1;
124
+ }
125
+ let r = !1;
126
+ name.split('|').forEach((n) => {
127
+ n = n.split('*');
128
+ n.forEach((w, i) => {
129
+ n[i] = escape(w);
130
+ });
131
+ n = n.join('.*');
132
+ if (this.test('^' + n + '$', 'gium')) {
133
+ r = !0;
134
+ }
135
+ });
136
+ return r;
137
+ };
138
+ }
139
+
140
+ if (!String.prototype.contains) {
141
+ String.prototype.contains = function (name) {
142
+ let r = !1;
143
+ if (!name) {
144
+ return r;
145
+ }
146
+ name.split('|').forEach((n) => {
147
+ if (n && this.test('^.*' + escape(n) + '.*$', 'gium')) {
148
+ r = !0;
149
+ }
150
+ });
151
+ return r;
152
+ };
153
+ }
112
154
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "isite",
3
- "version": "1.14.77",
3
+ "version": "1.14.81",
4
4
  "description": "Create Enterprise Multi-Language Web Site [Fast and Easy] ",
5
5
  "main": "index.js",
6
6
  "repository": {