table 6.0.6 → 6.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.
- package/README.md +0 -1
- package/dist/schemas/config.json +3 -0
- package/dist/validators.js +24 -4
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
<a name="table"></a>
|
|
2
2
|
# Table
|
|
3
3
|
|
|
4
|
-
[](https://gitspo.com/mentions/gajus/table)
|
|
5
4
|
[](https://travis-ci.org/gajus/table)
|
|
6
5
|
[](https://coveralls.io/github/gajus/table)
|
|
7
6
|
[](https://www.npmjs.org/package/table)
|
package/dist/schemas/config.json
CHANGED
package/dist/validators.js
CHANGED
|
@@ -16,6 +16,9 @@ const schema13 = {
|
|
|
16
16
|
},
|
|
17
17
|
"drawHorizontalLine": {
|
|
18
18
|
"typeof": "function"
|
|
19
|
+
},
|
|
20
|
+
"singleLine": {
|
|
21
|
+
"typeof": "boolean"
|
|
19
22
|
}
|
|
20
23
|
},
|
|
21
24
|
"additionalProperties": false
|
|
@@ -797,7 +800,7 @@ function validate43(data, {
|
|
|
797
800
|
let errors = 0;
|
|
798
801
|
if (data && typeof data == "object" && !Array.isArray(data)) {
|
|
799
802
|
for (const key0 in data) {
|
|
800
|
-
if (!((((key0 === "border") || (key0 === "columns")) || (key0 === "columnDefault")) || (key0 === "drawHorizontalLine"))) {
|
|
803
|
+
if (!(((((key0 === "border") || (key0 === "columns")) || (key0 === "columnDefault")) || (key0 === "drawHorizontalLine")) || (key0 === "singleLine"))) {
|
|
801
804
|
const err0 = {
|
|
802
805
|
keyword: "additionalProperties",
|
|
803
806
|
dataPath,
|
|
@@ -865,8 +868,25 @@ function validate43(data, {
|
|
|
865
868
|
errors++;
|
|
866
869
|
}
|
|
867
870
|
}
|
|
871
|
+
if (data.singleLine !== undefined) {
|
|
872
|
+
if (typeof data.singleLine != "boolean") {
|
|
873
|
+
const err2 = {
|
|
874
|
+
keyword: "typeof",
|
|
875
|
+
dataPath: dataPath + "/singleLine",
|
|
876
|
+
schemaPath: "#/properties/singleLine/typeof",
|
|
877
|
+
params: {},
|
|
878
|
+
message: "should pass \"typeof\" keyword validation"
|
|
879
|
+
};
|
|
880
|
+
if (vErrors === null) {
|
|
881
|
+
vErrors = [err2];
|
|
882
|
+
} else {
|
|
883
|
+
vErrors.push(err2);
|
|
884
|
+
}
|
|
885
|
+
errors++;
|
|
886
|
+
}
|
|
887
|
+
}
|
|
868
888
|
} else {
|
|
869
|
-
const
|
|
889
|
+
const err3 = {
|
|
870
890
|
keyword: "type",
|
|
871
891
|
dataPath,
|
|
872
892
|
schemaPath: "#/type",
|
|
@@ -876,9 +896,9 @@ function validate43(data, {
|
|
|
876
896
|
message: "should be object"
|
|
877
897
|
};
|
|
878
898
|
if (vErrors === null) {
|
|
879
|
-
vErrors = [
|
|
899
|
+
vErrors = [err3];
|
|
880
900
|
} else {
|
|
881
|
-
vErrors.push(
|
|
901
|
+
vErrors.push(err3);
|
|
882
902
|
}
|
|
883
903
|
errors++;
|
|
884
904
|
}
|
package/package.json
CHANGED