@teselagen/sequence-utils 0.3.17 → 0.3.18
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/index.js +1 -1
- package/index.mjs +1 -1
- package/index.umd.js +1 -1
- package/package.json +1 -1
- package/src/filterSequenceString.js +1 -1
- package/src/filterSequenceString.test.js +4 -10
package/index.js
CHANGED
|
@@ -12326,7 +12326,7 @@ const modifiableTypes = [
|
|
|
12326
12326
|
let allWarnings = [];
|
|
12327
12327
|
let makeToast = /* @__PURE__ */ __name(() => {
|
|
12328
12328
|
if (typeof window !== "undefined" && window.toastr && allWarnings.length) {
|
|
12329
|
-
window.toastr.warning(allWarnings.join("\n"));
|
|
12329
|
+
window.toastr.warning(lodashExports.uniq(allWarnings).join("\n"));
|
|
12330
12330
|
}
|
|
12331
12331
|
allWarnings = [];
|
|
12332
12332
|
}, "makeToast");
|
package/index.mjs
CHANGED
|
@@ -12324,7 +12324,7 @@ const modifiableTypes = [
|
|
|
12324
12324
|
let allWarnings = [];
|
|
12325
12325
|
let makeToast = /* @__PURE__ */ __name(() => {
|
|
12326
12326
|
if (typeof window !== "undefined" && window.toastr && allWarnings.length) {
|
|
12327
|
-
window.toastr.warning(allWarnings.join("\n"));
|
|
12327
|
+
window.toastr.warning(lodashExports.uniq(allWarnings).join("\n"));
|
|
12328
12328
|
}
|
|
12329
12329
|
allWarnings = [];
|
|
12330
12330
|
}, "makeToast");
|
package/index.umd.js
CHANGED
|
@@ -12328,7 +12328,7 @@ var __name = (target, value) => __defProp(target, "name", { value, configurable:
|
|
|
12328
12328
|
let allWarnings = [];
|
|
12329
12329
|
let makeToast = /* @__PURE__ */ __name(() => {
|
|
12330
12330
|
if (typeof window !== "undefined" && window.toastr && allWarnings.length) {
|
|
12331
|
-
window.toastr.warning(allWarnings.join("\n"));
|
|
12331
|
+
window.toastr.warning(lodashExports.uniq(allWarnings).join("\n"));
|
|
12332
12332
|
}
|
|
12333
12333
|
allWarnings = [];
|
|
12334
12334
|
}, "makeToast");
|
package/package.json
CHANGED
|
@@ -9,7 +9,7 @@ let allWarnings = [];
|
|
|
9
9
|
|
|
10
10
|
let makeToast = () => {
|
|
11
11
|
if (typeof window !== "undefined" && window.toastr && allWarnings.length) {
|
|
12
|
-
window.toastr.warning(allWarnings.join("\n"));
|
|
12
|
+
window.toastr.warning(uniq(allWarnings).join("\n"));
|
|
13
13
|
}
|
|
14
14
|
allWarnings = [];
|
|
15
15
|
};
|
|
@@ -8,23 +8,17 @@ describe("filterSequenceString", () => {
|
|
|
8
8
|
});
|
|
9
9
|
expect(str).toBe("tatuuaga");
|
|
10
10
|
// expect(warnings[0]).toBe('Replaced "t" with "u" 2 times');
|
|
11
|
-
expect(warnings[0]).toBe(
|
|
12
|
-
"Invalid character(s) detected and removed: -, - "
|
|
13
|
-
);
|
|
11
|
+
expect(warnings[0]).toBe("Invalid character(s) detected and removed: - ");
|
|
14
12
|
});
|
|
15
13
|
it("should not convert u's to t's for isDna (default isDna=true) seqs", () => {
|
|
16
14
|
const [str, warnings] = filterSequenceString("tatuuag--a", {});
|
|
17
15
|
// expect(warnings[0]).toBe('Replaced "u" with "t" 2 times');
|
|
18
|
-
expect(warnings[0]).toBe(
|
|
19
|
-
"Invalid character(s) detected and removed: -, - "
|
|
20
|
-
);
|
|
16
|
+
expect(warnings[0]).toBe("Invalid character(s) detected and removed: - ");
|
|
21
17
|
expect(str).toBe("tatuuaga");
|
|
22
18
|
});
|
|
23
19
|
it("should filter out unwanted chars", () => {
|
|
24
20
|
const [str, warnings] = filterSequenceString("tatag--a");
|
|
25
|
-
expect(warnings[0]).toBe(
|
|
26
|
-
"Invalid character(s) detected and removed: -, - "
|
|
27
|
-
);
|
|
21
|
+
expect(warnings[0]).toBe("Invalid character(s) detected and removed: - ");
|
|
28
22
|
expect(str).toBe("tataga");
|
|
29
23
|
});
|
|
30
24
|
it("should handle additional chars option", () => {
|
|
@@ -51,7 +45,7 @@ describe("filterSequenceString", () => {
|
|
|
51
45
|
);
|
|
52
46
|
// expect(warnings[0]).toBe(`Replaced "." with "*" 2 times`);
|
|
53
47
|
expect(warnings[0]).toBe(
|
|
54
|
-
'Invalid character(s) detected and removed: 3, 4, 2, ",
|
|
48
|
+
'Invalid character(s) detected and removed: 3, 4, 2, ", ,, ., / '
|
|
55
49
|
);
|
|
56
50
|
expect(str).toBe("bbbxtgalmfwkqespvicyhrnd");
|
|
57
51
|
});
|