@nyaomaru/divider 2.0.14 → 2.0.15
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.cjs +2 -1
- package/dist/index.js +2 -1
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -504,7 +504,8 @@ function countUnescaped(text, quote) {
|
|
|
504
504
|
// src/utils/divide-preserve.ts
|
|
505
505
|
function dividePreserve(input, separator) {
|
|
506
506
|
if (isEmptyString(input)) return [""];
|
|
507
|
-
|
|
507
|
+
const regex = getRegex([separator]);
|
|
508
|
+
return regex == null ? [input] : input.split(regex);
|
|
508
509
|
}
|
|
509
510
|
|
|
510
511
|
// src/utils/strip-outer-quotes.ts
|
package/dist/index.js
CHANGED
|
@@ -470,7 +470,8 @@ function countUnescaped(text, quote) {
|
|
|
470
470
|
// src/utils/divide-preserve.ts
|
|
471
471
|
function dividePreserve(input, separator) {
|
|
472
472
|
if (isEmptyString(input)) return [""];
|
|
473
|
-
|
|
473
|
+
const regex = getRegex([separator]);
|
|
474
|
+
return regex == null ? [input] : input.split(regex);
|
|
474
475
|
}
|
|
475
476
|
|
|
476
477
|
// src/utils/strip-outer-quotes.ts
|