@kosatyi/ejs 0.0.78 → 0.0.80
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.
- package/dist/cjs/browser.js +60 -59
- package/dist/cjs/index.js +60 -59
- package/dist/cjs/worker.js +90 -94
- package/dist/esm/browser.js +8 -0
- package/dist/esm/index.js +8 -0
- package/dist/esm/worker.js +8 -0
- package/dist/umd/browser.js +60 -59
- package/dist/umd/browser.min.js +1 -1
- package/dist/umd/index.js +60 -59
- package/dist/umd/index.min.js +1 -1
- package/dist/umd/worker.js +90 -94
- package/dist/umd/worker.min.js +1 -1
- package/package.json +2 -2
- package/types/ejs.d.ts +5 -0
package/dist/cjs/worker.js
CHANGED
|
@@ -1,5 +1,38 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
+
function asyncGeneratorStep(n, t, e, r, o, a, c) {
|
|
4
|
+
try {
|
|
5
|
+
var i = n[a](c),
|
|
6
|
+
u = i.value;
|
|
7
|
+
} catch (n) {
|
|
8
|
+
return void e(n);
|
|
9
|
+
}
|
|
10
|
+
i.done ? t(u) : Promise.resolve(u).then(r, o);
|
|
11
|
+
}
|
|
12
|
+
function _asyncToGenerator(n) {
|
|
13
|
+
return function () {
|
|
14
|
+
var t = this,
|
|
15
|
+
e = arguments;
|
|
16
|
+
return new Promise(function (r, o) {
|
|
17
|
+
var a = n.apply(t, e);
|
|
18
|
+
function _next(n) {
|
|
19
|
+
asyncGeneratorStep(a, r, o, _next, _throw, "next", n);
|
|
20
|
+
}
|
|
21
|
+
function _throw(n) {
|
|
22
|
+
asyncGeneratorStep(a, r, o, _next, _throw, "throw", n);
|
|
23
|
+
}
|
|
24
|
+
_next(void 0);
|
|
25
|
+
});
|
|
26
|
+
};
|
|
27
|
+
}
|
|
28
|
+
function _defineProperty(e, r, t) {
|
|
29
|
+
return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, {
|
|
30
|
+
value: t,
|
|
31
|
+
enumerable: !0,
|
|
32
|
+
configurable: !0,
|
|
33
|
+
writable: !0
|
|
34
|
+
}) : e[r] = t, e;
|
|
35
|
+
}
|
|
3
36
|
function _regeneratorRuntime() {
|
|
4
37
|
_regeneratorRuntime = function () {
|
|
5
38
|
return e;
|
|
@@ -108,7 +141,7 @@ function _regeneratorRuntime() {
|
|
|
108
141
|
function makeInvokeMethod(e, r, n) {
|
|
109
142
|
var o = h;
|
|
110
143
|
return function (i, a) {
|
|
111
|
-
if (o === f) throw
|
|
144
|
+
if (o === f) throw Error("Generator is already running");
|
|
112
145
|
if (o === s) {
|
|
113
146
|
if ("throw" === i) throw a;
|
|
114
147
|
return {
|
|
@@ -250,7 +283,7 @@ function _regeneratorRuntime() {
|
|
|
250
283
|
} else if (c) {
|
|
251
284
|
if (this.prev < i.catchLoc) return handle(i.catchLoc, !0);
|
|
252
285
|
} else {
|
|
253
|
-
if (!u) throw
|
|
286
|
+
if (!u) throw Error("try statement without catch or finally");
|
|
254
287
|
if (this.prev < i.finallyLoc) return handle(i.finallyLoc);
|
|
255
288
|
}
|
|
256
289
|
}
|
|
@@ -290,7 +323,7 @@ function _regeneratorRuntime() {
|
|
|
290
323
|
return o;
|
|
291
324
|
}
|
|
292
325
|
}
|
|
293
|
-
throw
|
|
326
|
+
throw Error("illegal catch attempt");
|
|
294
327
|
},
|
|
295
328
|
delegateYield: function (e, r, n) {
|
|
296
329
|
return this.delegate = {
|
|
@@ -301,63 +334,19 @@ function _regeneratorRuntime() {
|
|
|
301
334
|
}
|
|
302
335
|
}, e;
|
|
303
336
|
}
|
|
304
|
-
function
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
return;
|
|
311
|
-
}
|
|
312
|
-
if (info.done) {
|
|
313
|
-
resolve(value);
|
|
314
|
-
} else {
|
|
315
|
-
Promise.resolve(value).then(_next, _throw);
|
|
316
|
-
}
|
|
317
|
-
}
|
|
318
|
-
function _asyncToGenerator(fn) {
|
|
319
|
-
return function () {
|
|
320
|
-
var self = this,
|
|
321
|
-
args = arguments;
|
|
322
|
-
return new Promise(function (resolve, reject) {
|
|
323
|
-
var gen = fn.apply(self, args);
|
|
324
|
-
function _next(value) {
|
|
325
|
-
asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value);
|
|
326
|
-
}
|
|
327
|
-
function _throw(err) {
|
|
328
|
-
asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err);
|
|
329
|
-
}
|
|
330
|
-
_next(undefined);
|
|
331
|
-
});
|
|
332
|
-
};
|
|
333
|
-
}
|
|
334
|
-
function _defineProperty(obj, key, value) {
|
|
335
|
-
key = _toPropertyKey(key);
|
|
336
|
-
if (key in obj) {
|
|
337
|
-
Object.defineProperty(obj, key, {
|
|
338
|
-
value: value,
|
|
339
|
-
enumerable: true,
|
|
340
|
-
configurable: true,
|
|
341
|
-
writable: true
|
|
342
|
-
});
|
|
343
|
-
} else {
|
|
344
|
-
obj[key] = value;
|
|
345
|
-
}
|
|
346
|
-
return obj;
|
|
347
|
-
}
|
|
348
|
-
function _toPrimitive(input, hint) {
|
|
349
|
-
if (typeof input !== "object" || input === null) return input;
|
|
350
|
-
var prim = input[Symbol.toPrimitive];
|
|
351
|
-
if (prim !== undefined) {
|
|
352
|
-
var res = prim.call(input, hint || "default");
|
|
353
|
-
if (typeof res !== "object") return res;
|
|
337
|
+
function _toPrimitive(t, r) {
|
|
338
|
+
if ("object" != typeof t || !t) return t;
|
|
339
|
+
var e = t[Symbol.toPrimitive];
|
|
340
|
+
if (void 0 !== e) {
|
|
341
|
+
var i = e.call(t, r || "default");
|
|
342
|
+
if ("object" != typeof i) return i;
|
|
354
343
|
throw new TypeError("@@toPrimitive must return a primitive value.");
|
|
355
344
|
}
|
|
356
|
-
return (
|
|
345
|
+
return ("string" === r ? String : Number)(t);
|
|
357
346
|
}
|
|
358
|
-
function _toPropertyKey(
|
|
359
|
-
var
|
|
360
|
-
return
|
|
347
|
+
function _toPropertyKey(t) {
|
|
348
|
+
var i = _toPrimitive(t, "string");
|
|
349
|
+
return "symbol" == typeof i ? i : i + "";
|
|
361
350
|
}
|
|
362
351
|
|
|
363
352
|
var typeProp = function typeProp() {
|
|
@@ -846,46 +835,46 @@ function Context(config) {
|
|
|
846
835
|
extend(this, data || {});
|
|
847
836
|
}
|
|
848
837
|
Scope.prototype = extend({}, methods || {});
|
|
849
|
-
Object.defineProperties(Scope.prototype, (_Object$definePropert = {}, _defineProperty(_Object$definePropert, BUFFER, {
|
|
838
|
+
Object.defineProperties(Scope.prototype, (_Object$definePropert = {}, _defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_Object$definePropert, BUFFER, {
|
|
850
839
|
value: createBuffer(),
|
|
851
840
|
writable: true,
|
|
852
841
|
configurable: false,
|
|
853
842
|
enumerable: false
|
|
854
|
-
}),
|
|
843
|
+
}), BLOCKS, {
|
|
855
844
|
value: {},
|
|
856
845
|
writable: true,
|
|
857
846
|
configurable: false,
|
|
858
847
|
enumerable: false
|
|
859
|
-
}),
|
|
848
|
+
}), MACRO, {
|
|
860
849
|
value: {},
|
|
861
850
|
writable: true,
|
|
862
851
|
configurable: false,
|
|
863
852
|
enumerable: false
|
|
864
|
-
}),
|
|
853
|
+
}), LAYOUT, {
|
|
865
854
|
value: false,
|
|
866
855
|
writable: true,
|
|
867
856
|
configurable: false,
|
|
868
857
|
enumerable: false
|
|
869
|
-
}),
|
|
858
|
+
}), EXTEND, {
|
|
870
859
|
value: false,
|
|
871
860
|
writable: true,
|
|
872
861
|
configurable: false,
|
|
873
862
|
enumerable: false
|
|
874
|
-
}),
|
|
863
|
+
}), "getMacro", {
|
|
875
864
|
value: function value() {
|
|
876
865
|
return this[MACRO];
|
|
877
866
|
},
|
|
878
867
|
writable: false,
|
|
879
868
|
configurable: false,
|
|
880
869
|
enumerable: false
|
|
881
|
-
}),
|
|
870
|
+
}), "getBuffer", {
|
|
882
871
|
value: function value() {
|
|
883
872
|
return this[BUFFER];
|
|
884
873
|
},
|
|
885
874
|
writable: false,
|
|
886
875
|
configurable: false,
|
|
887
876
|
enumerable: false
|
|
888
|
-
}),
|
|
877
|
+
}), "getComponent", {
|
|
889
878
|
value: function value() {
|
|
890
879
|
var context = this;
|
|
891
880
|
if (COMPONENT in context) {
|
|
@@ -900,42 +889,42 @@ function Context(config) {
|
|
|
900
889
|
writable: false,
|
|
901
890
|
configurable: false,
|
|
902
891
|
enumerable: false
|
|
903
|
-
}),
|
|
892
|
+
}), "getBlocks", {
|
|
904
893
|
value: function value() {
|
|
905
894
|
return this[BLOCKS];
|
|
906
895
|
},
|
|
907
896
|
writable: false,
|
|
908
897
|
configurable: false,
|
|
909
898
|
enumerable: false
|
|
910
|
-
}),
|
|
899
|
+
}), "setExtend", {
|
|
911
900
|
value: function value(_value) {
|
|
912
901
|
this[EXTEND] = _value;
|
|
913
902
|
},
|
|
914
903
|
writable: false,
|
|
915
904
|
configurable: false,
|
|
916
905
|
enumerable: false
|
|
917
|
-
}), _defineProperty(_Object$definePropert, "getExtend", {
|
|
906
|
+
}), _defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_Object$definePropert, "getExtend", {
|
|
918
907
|
value: function value() {
|
|
919
908
|
return this[EXTEND];
|
|
920
909
|
},
|
|
921
910
|
writable: false,
|
|
922
911
|
configurable: false,
|
|
923
912
|
enumerable: false
|
|
924
|
-
}),
|
|
913
|
+
}), "setLayout", {
|
|
925
914
|
value: function value(layout) {
|
|
926
915
|
this[LAYOUT] = layout;
|
|
927
916
|
},
|
|
928
917
|
writable: false,
|
|
929
918
|
configurable: false,
|
|
930
919
|
enumerable: false
|
|
931
|
-
}),
|
|
920
|
+
}), "getLayout", {
|
|
932
921
|
value: function value() {
|
|
933
922
|
return this[LAYOUT];
|
|
934
923
|
},
|
|
935
924
|
writable: false,
|
|
936
925
|
configurable: false,
|
|
937
926
|
enumerable: false
|
|
938
|
-
}),
|
|
927
|
+
}), "clone", {
|
|
939
928
|
value: function value(exclude_blocks) {
|
|
940
929
|
var filter = [LAYOUT, EXTEND, BUFFER];
|
|
941
930
|
if (exclude_blocks === true) {
|
|
@@ -946,7 +935,7 @@ function Context(config) {
|
|
|
946
935
|
writable: false,
|
|
947
936
|
configurable: false,
|
|
948
937
|
enumerable: false
|
|
949
|
-
}),
|
|
938
|
+
}), "extend", {
|
|
950
939
|
value: function value(layout) {
|
|
951
940
|
this.setExtend(true);
|
|
952
941
|
this.setLayout(layout);
|
|
@@ -954,7 +943,7 @@ function Context(config) {
|
|
|
954
943
|
writable: false,
|
|
955
944
|
configurable: false,
|
|
956
945
|
enumerable: false
|
|
957
|
-
}),
|
|
946
|
+
}), "echo", {
|
|
958
947
|
value: function value(layout) {
|
|
959
948
|
var buffer = this.getBuffer();
|
|
960
949
|
var params = [].slice.call(arguments);
|
|
@@ -963,7 +952,7 @@ function Context(config) {
|
|
|
963
952
|
writable: false,
|
|
964
953
|
configurable: false,
|
|
965
954
|
enumerable: false
|
|
966
|
-
}),
|
|
955
|
+
}), "fn", {
|
|
967
956
|
value: function value(callback) {
|
|
968
957
|
var buffer = this.getBuffer();
|
|
969
958
|
var context = this;
|
|
@@ -978,7 +967,7 @@ function Context(config) {
|
|
|
978
967
|
writable: false,
|
|
979
968
|
configurable: false,
|
|
980
969
|
enumerable: false
|
|
981
|
-
}),
|
|
970
|
+
}), "get", {
|
|
982
971
|
value: function value(name, defaults) {
|
|
983
972
|
var path = getPath(this, name, true);
|
|
984
973
|
var result = path.shift();
|
|
@@ -988,7 +977,7 @@ function Context(config) {
|
|
|
988
977
|
writable: true,
|
|
989
978
|
configurable: true,
|
|
990
979
|
enumerable: false
|
|
991
|
-
}),
|
|
980
|
+
}), "set", {
|
|
992
981
|
value: function value(name, _value2) {
|
|
993
982
|
var path = getPath(this, name, false);
|
|
994
983
|
var result = path.shift();
|
|
@@ -1001,7 +990,7 @@ function Context(config) {
|
|
|
1001
990
|
writable: false,
|
|
1002
991
|
configurable: false,
|
|
1003
992
|
enumerable: false
|
|
1004
|
-
}),
|
|
993
|
+
}), "macro", {
|
|
1005
994
|
value: function value(name, callback) {
|
|
1006
995
|
var list = this.getMacro();
|
|
1007
996
|
var macro = this.fn(callback);
|
|
@@ -1013,7 +1002,7 @@ function Context(config) {
|
|
|
1013
1002
|
writable: false,
|
|
1014
1003
|
configurable: false,
|
|
1015
1004
|
enumerable: false
|
|
1016
|
-
}), _defineProperty(_Object$definePropert, "call", {
|
|
1005
|
+
}), _defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_Object$definePropert, "call", {
|
|
1017
1006
|
value: function value(name) {
|
|
1018
1007
|
var list = this.getMacro();
|
|
1019
1008
|
var macro = list[name];
|
|
@@ -1025,7 +1014,7 @@ function Context(config) {
|
|
|
1025
1014
|
writable: false,
|
|
1026
1015
|
configurable: false,
|
|
1027
1016
|
enumerable: false
|
|
1028
|
-
}),
|
|
1017
|
+
}), "block", {
|
|
1029
1018
|
value: function value(name, callback) {
|
|
1030
1019
|
var _this = this;
|
|
1031
1020
|
var blocks = this.getBlocks();
|
|
@@ -1036,22 +1025,29 @@ function Context(config) {
|
|
|
1036
1025
|
var current = function current() {
|
|
1037
1026
|
return list.shift();
|
|
1038
1027
|
};
|
|
1039
|
-
var
|
|
1028
|
+
var _next = function next() {
|
|
1040
1029
|
var parent = current();
|
|
1041
1030
|
if (parent) {
|
|
1042
1031
|
return function () {
|
|
1043
|
-
_this.echo(parent(
|
|
1032
|
+
_this.echo(parent(_next()));
|
|
1044
1033
|
};
|
|
1045
1034
|
} else {
|
|
1046
1035
|
return noop;
|
|
1047
1036
|
}
|
|
1048
1037
|
};
|
|
1049
|
-
this.echo(current()(
|
|
1038
|
+
this.echo(current()(_next()));
|
|
1039
|
+
},
|
|
1040
|
+
writable: false,
|
|
1041
|
+
configurable: false,
|
|
1042
|
+
enumerable: false
|
|
1043
|
+
}), "hasBlock", {
|
|
1044
|
+
value: function value(name) {
|
|
1045
|
+
return this.getBlocks().hasOwnProperty(name);
|
|
1050
1046
|
},
|
|
1051
1047
|
writable: false,
|
|
1052
1048
|
configurable: false,
|
|
1053
1049
|
enumerable: false
|
|
1054
|
-
}),
|
|
1050
|
+
}), "include", {
|
|
1055
1051
|
value: function value(path, data, cx) {
|
|
1056
1052
|
var context = cx === false ? {} : this.clone(true);
|
|
1057
1053
|
var params = extend(context, data || {});
|
|
@@ -1061,7 +1057,7 @@ function Context(config) {
|
|
|
1061
1057
|
writable: false,
|
|
1062
1058
|
configurable: false,
|
|
1063
1059
|
enumerable: false
|
|
1064
|
-
}),
|
|
1060
|
+
}), "use", {
|
|
1065
1061
|
value: function value(path, namespace) {
|
|
1066
1062
|
var promise = this.require(path);
|
|
1067
1063
|
this.echo(resolve$1(promise, function (exports) {
|
|
@@ -1074,7 +1070,7 @@ function Context(config) {
|
|
|
1074
1070
|
writable: false,
|
|
1075
1071
|
configurable: false,
|
|
1076
1072
|
enumerable: false
|
|
1077
|
-
}),
|
|
1073
|
+
}), "async", {
|
|
1078
1074
|
value: function value(promise, callback) {
|
|
1079
1075
|
this.echo(resolve$1(promise, function (data) {
|
|
1080
1076
|
return this.fn(callback)(data);
|
|
@@ -1083,7 +1079,7 @@ function Context(config) {
|
|
|
1083
1079
|
writable: false,
|
|
1084
1080
|
configurable: false,
|
|
1085
1081
|
enumerable: false
|
|
1086
|
-
}),
|
|
1082
|
+
}), "each", {
|
|
1087
1083
|
value: function value(object, callback) {
|
|
1088
1084
|
if (isString(object)) {
|
|
1089
1085
|
object = this.get(object, []);
|
|
@@ -1093,14 +1089,14 @@ function Context(config) {
|
|
|
1093
1089
|
writable: false,
|
|
1094
1090
|
configurable: false,
|
|
1095
1091
|
enumerable: false
|
|
1096
|
-
}),
|
|
1092
|
+
}), "element", {
|
|
1097
1093
|
value: function value(tag, attr, content) {
|
|
1098
1094
|
return element(tag, attr, content);
|
|
1099
1095
|
},
|
|
1100
1096
|
writable: false,
|
|
1101
1097
|
configurable: false,
|
|
1102
1098
|
enumerable: false
|
|
1103
|
-
}),
|
|
1099
|
+
}), "el", {
|
|
1104
1100
|
value: function value(tag, attr, content) {
|
|
1105
1101
|
if (isFunction(content)) {
|
|
1106
1102
|
content = this.fn(content)();
|
|
@@ -1112,7 +1108,7 @@ function Context(config) {
|
|
|
1112
1108
|
writable: false,
|
|
1113
1109
|
configurable: false,
|
|
1114
1110
|
enumerable: false
|
|
1115
|
-
})
|
|
1111
|
+
})));
|
|
1116
1112
|
};
|
|
1117
1113
|
this.configure(config);
|
|
1118
1114
|
}
|
|
@@ -1144,7 +1140,7 @@ function EJS(options) {
|
|
|
1144
1140
|
return scope.getMacro();
|
|
1145
1141
|
});
|
|
1146
1142
|
};
|
|
1147
|
-
var
|
|
1143
|
+
var _render = function render(name, data) {
|
|
1148
1144
|
var filepath = ext(name, config.extension);
|
|
1149
1145
|
var scope = context.create(data);
|
|
1150
1146
|
return output(filepath, scope).then(function (content) {
|
|
@@ -1152,7 +1148,7 @@ function EJS(options) {
|
|
|
1152
1148
|
scope.setExtend(false);
|
|
1153
1149
|
var layout = scope.getLayout();
|
|
1154
1150
|
var _data = scope.clone();
|
|
1155
|
-
return
|
|
1151
|
+
return _render(layout, _data);
|
|
1156
1152
|
}
|
|
1157
1153
|
return content;
|
|
1158
1154
|
});
|
|
@@ -1167,7 +1163,7 @@ function EJS(options) {
|
|
|
1167
1163
|
return config;
|
|
1168
1164
|
};
|
|
1169
1165
|
this.render = function (name, data) {
|
|
1170
|
-
return
|
|
1166
|
+
return _render(name, data);
|
|
1171
1167
|
};
|
|
1172
1168
|
this.helpers = function (methods) {
|
|
1173
1169
|
context.helpers(extend(scope, methods));
|
|
@@ -1186,7 +1182,7 @@ function EJS(options) {
|
|
|
1186
1182
|
};
|
|
1187
1183
|
this.helpers({
|
|
1188
1184
|
require: require,
|
|
1189
|
-
render:
|
|
1185
|
+
render: _render
|
|
1190
1186
|
});
|
|
1191
1187
|
return this;
|
|
1192
1188
|
}
|
|
@@ -1233,7 +1229,7 @@ function setRenderer(_ref) {
|
|
|
1233
1229
|
_ref$version = _ref.version,
|
|
1234
1230
|
version = _ref$version === void 0 ? '1.0' : _ref$version;
|
|
1235
1231
|
return /*#__PURE__*/function () {
|
|
1236
|
-
var _ref2 = _asyncToGenerator(
|
|
1232
|
+
var _ref2 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee(c, next) {
|
|
1237
1233
|
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
1238
1234
|
while (1) switch (_context.prev = _context.next) {
|
|
1239
1235
|
case 0:
|
package/dist/esm/browser.js
CHANGED
|
@@ -816,6 +816,14 @@ function Context(config) {
|
|
|
816
816
|
configurable: false,
|
|
817
817
|
enumerable: false,
|
|
818
818
|
},
|
|
819
|
+
hasBlock: {
|
|
820
|
+
value(name) {
|
|
821
|
+
return this.getBlocks().hasOwnProperty(name)
|
|
822
|
+
},
|
|
823
|
+
writable: false,
|
|
824
|
+
configurable: false,
|
|
825
|
+
enumerable: false,
|
|
826
|
+
},
|
|
819
827
|
include: {
|
|
820
828
|
value(path, data, cx) {
|
|
821
829
|
const context = cx === false ? {} : this.clone(true);
|
package/dist/esm/index.js
CHANGED
|
@@ -819,6 +819,14 @@ function Context(config) {
|
|
|
819
819
|
configurable: false,
|
|
820
820
|
enumerable: false,
|
|
821
821
|
},
|
|
822
|
+
hasBlock: {
|
|
823
|
+
value(name) {
|
|
824
|
+
return this.getBlocks().hasOwnProperty(name)
|
|
825
|
+
},
|
|
826
|
+
writable: false,
|
|
827
|
+
configurable: false,
|
|
828
|
+
enumerable: false,
|
|
829
|
+
},
|
|
822
830
|
include: {
|
|
823
831
|
value(path, data, cx) {
|
|
824
832
|
const context = cx === false ? {} : this.clone(true);
|
package/dist/esm/worker.js
CHANGED
|
@@ -810,6 +810,14 @@ function Context(config) {
|
|
|
810
810
|
configurable: false,
|
|
811
811
|
enumerable: false,
|
|
812
812
|
},
|
|
813
|
+
hasBlock: {
|
|
814
|
+
value(name) {
|
|
815
|
+
return this.getBlocks().hasOwnProperty(name)
|
|
816
|
+
},
|
|
817
|
+
writable: false,
|
|
818
|
+
configurable: false,
|
|
819
|
+
enumerable: false,
|
|
820
|
+
},
|
|
813
821
|
include: {
|
|
814
822
|
value(path, data, cx) {
|
|
815
823
|
const context = cx === false ? {} : this.clone(true);
|