@nyaomaru/divider 1.9.15 → 1.9.16

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 CHANGED
@@ -407,8 +407,7 @@ function dividerNumberString(input, options) {
407
407
  // src/utils/quoted.ts
408
408
  function dividePreserve(input, separator) {
409
409
  if (isEmptyString(input)) return [""];
410
- const divided = divider(input, separator);
411
- return divided.join(separator) === input ? divided : input.split(separator);
410
+ return divider(input, separator, { preserveEmpty: true });
412
411
  }
413
412
  function countUnescaped(text, quote) {
414
413
  const pair = quote + quote;
package/dist/index.js CHANGED
@@ -374,8 +374,7 @@ function dividerNumberString(input, options) {
374
374
  // src/utils/quoted.ts
375
375
  function dividePreserve(input, separator) {
376
376
  if (isEmptyString(input)) return [""];
377
- const divided = divider(input, separator);
378
- return divided.join(separator) === input ? divided : input.split(separator);
377
+ return divider(input, separator, { preserveEmpty: true });
379
378
  }
380
379
  function countUnescaped(text, quote) {
381
380
  const pair = quote + quote;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@nyaomaru/divider",
3
3
  "type": "module",
4
- "version": "1.9.15",
4
+ "version": "1.9.16",
5
5
  "description": "To divide string or string[] with a given separator",
6
6
  "main": "./dist/index.cjs",
7
7
  "module": "./dist/index.js",