qesuite 1.0.3 → 1.0.4
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/index.js +9 -0
- package/dist/index.mjs +9 -0
- package/index.ts +10 -1
- package/package.json +1 -1
- package/versions/1_0_4.md +1 -0
package/dist/index.js
CHANGED
|
@@ -50,6 +50,15 @@ __export(QESuite_exports, {
|
|
|
50
50
|
module.exports = __toCommonJS(QESuite_exports);
|
|
51
51
|
var QESpecification = class {
|
|
52
52
|
constructor(spec, USL = NaN, LSL = NaN, tolerance = NaN, tol_plus = NaN, tol_minus = NaN, units = "") {
|
|
53
|
+
if (typeof spec === "object") {
|
|
54
|
+
this.nominal = spec == null ? void 0 : spec.spec;
|
|
55
|
+
this.USL = spec == null ? void 0 : spec.USL;
|
|
56
|
+
this.LSL = spec == null ? void 0 : spec.LSL;
|
|
57
|
+
this.tolerance = spec == null ? void 0 : spec.tolerance;
|
|
58
|
+
this.tol_plus = spec == null ? void 0 : spec.tol_plus;
|
|
59
|
+
this.tol_minus = spec == null ? void 0 : spec.tol_minus;
|
|
60
|
+
this.units = spec == null ? void 0 : spec.units;
|
|
61
|
+
}
|
|
53
62
|
if (Number.isNaN(Number(spec))) {
|
|
54
63
|
let parsed = this.ParseSpec(spec);
|
|
55
64
|
this.nominal = parsed.nominal;
|
package/dist/index.mjs
CHANGED
|
@@ -1,6 +1,15 @@
|
|
|
1
1
|
// index.ts
|
|
2
2
|
var QESpecification = class {
|
|
3
3
|
constructor(spec, USL = NaN, LSL = NaN, tolerance = NaN, tol_plus = NaN, tol_minus = NaN, units = "") {
|
|
4
|
+
if (typeof spec === "object") {
|
|
5
|
+
this.nominal = spec == null ? void 0 : spec.spec;
|
|
6
|
+
this.USL = spec == null ? void 0 : spec.USL;
|
|
7
|
+
this.LSL = spec == null ? void 0 : spec.LSL;
|
|
8
|
+
this.tolerance = spec == null ? void 0 : spec.tolerance;
|
|
9
|
+
this.tol_plus = spec == null ? void 0 : spec.tol_plus;
|
|
10
|
+
this.tol_minus = spec == null ? void 0 : spec.tol_minus;
|
|
11
|
+
this.units = spec == null ? void 0 : spec.units;
|
|
12
|
+
}
|
|
4
13
|
if (Number.isNaN(Number(spec))) {
|
|
5
14
|
let parsed = this.ParseSpec(spec);
|
|
6
15
|
this.nominal = parsed.nominal;
|
package/index.ts
CHANGED
|
@@ -5,7 +5,16 @@
|
|
|
5
5
|
// Specification Classes
|
|
6
6
|
export class QESpecification{
|
|
7
7
|
constructor(spec: any, USL: number = NaN, LSL: number = NaN, tolerance: number = NaN, tol_plus: number = NaN, tol_minus: number = NaN, units: string = ''){
|
|
8
|
-
|
|
8
|
+
if(typeof spec === "object"){
|
|
9
|
+
this.nominal = spec?.spec;
|
|
10
|
+
this.USL = spec?.USL;
|
|
11
|
+
this.LSL = spec?.LSL;
|
|
12
|
+
this.tolerance = spec?.tolerance;
|
|
13
|
+
this.tol_plus = spec?.tol_plus;
|
|
14
|
+
this.tol_minus = spec?.tol_minus;
|
|
15
|
+
this.units = spec?.units;
|
|
16
|
+
}
|
|
17
|
+
if(Number.isNaN(Number(spec))){
|
|
9
18
|
let parsed = this.ParseSpec(spec);
|
|
10
19
|
this.nominal = parsed.nominal;
|
|
11
20
|
this.USL = parsed.USL;
|
package/package.json
CHANGED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
Added check to QESpecification class to keep from throwing error if the type is already input.
|