string-process-comma-separated 4.1.18 → 4.1.20

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/.eslintcache ADDED
@@ -0,0 +1 @@
1
+ [{"/home/runner/work/codsen/codsen/packages/string-process-comma-separated/examples/_quickTake.js":"1","/home/runner/work/codsen/codsen/packages/string-process-comma-separated/perf/check.js":"2","/home/runner/work/codsen/codsen/packages/string-process-comma-separated/rollup.config.js":"3","/home/runner/work/codsen/codsen/packages/string-process-comma-separated/src/main.ts":"4","/home/runner/work/codsen/codsen/packages/string-process-comma-separated/test/test.js":"5"},{"size":1275,"mtime":1760280945970,"results":"6","hashOfConfig":"7"},{"size":851,"mtime":1760280945970,"results":"8","hashOfConfig":"9"},{"size":373,"mtime":1760280945970,"results":"10","hashOfConfig":"7"},{"size":15672,"mtime":1760280945970,"results":"11","hashOfConfig":"9"},{"size":15098,"mtime":1760280945970,"results":"12","hashOfConfig":"13"},{"filePath":"14","messages":"15","suppressedMessages":"16","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},"1f1u168",{"filePath":"17","messages":"18","suppressedMessages":"19","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},"91l1rm",{"filePath":"20","messages":"21","suppressedMessages":"22","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"23","messages":"24","suppressedMessages":"25","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"26","messages":"27","suppressedMessages":"28","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},"ns3qdb","/home/runner/work/codsen/codsen/packages/string-process-comma-separated/examples/_quickTake.js",[],[],"/home/runner/work/codsen/codsen/packages/string-process-comma-separated/perf/check.js",[],[],"/home/runner/work/codsen/codsen/packages/string-process-comma-separated/rollup.config.js",[],[],"/home/runner/work/codsen/codsen/packages/string-process-comma-separated/src/main.ts",[],[],"/home/runner/work/codsen/codsen/packages/string-process-comma-separated/test/test.js",[],["29","30","31","32"],{"ruleId":"33","severity":2,"message":"34","line":5,"column":17,"nodeType":null,"messageId":"35","endLine":5,"endColumn":19,"suppressions":"36"},{"ruleId":"33","severity":2,"message":"37","line":5,"column":21,"nodeType":null,"messageId":"35","endLine":5,"endColumn":23,"suppressions":"38"},{"ruleId":"33","severity":2,"message":"39","line":5,"column":33,"nodeType":null,"messageId":"35","endLine":5,"endColumn":37,"suppressions":"40"},{"ruleId":"33","severity":2,"message":"41","line":5,"column":44,"nodeType":null,"messageId":"35","endLine":5,"endColumn":49,"suppressions":"42"},"@typescript-eslint/no-unused-vars","'is' is defined but never used.","unusedVar",["43"],"'ok' is defined but never used.",["44"],"'type' is defined but never used.",["45"],"'match' is defined but never used.",["46"],{"kind":"47","justification":"48"},{"kind":"47","justification":"48"},{"kind":"47","justification":"48"},{"kind":"47","justification":"48"},"directive",""]
package/LICENSE CHANGED
@@ -1,6 +1,6 @@
1
1
  MIT License
2
2
 
3
- Copyright (c) 2010-2025 Roy Revelt and other contributors
3
+ Copyright © 2010-2025 Roy Revelt and other contributors
4
4
 
5
5
  Permission is hereby granted, free of charge, to any person obtaining
6
6
  a copy of this software and associated documentation files (the
@@ -19,4 +19,4 @@ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
19
19
  NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
20
20
  LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
21
21
  OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
22
- WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
22
+ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
package/README.md CHANGED
@@ -82,8 +82,8 @@ To report bugs or request features or assistance, [raise an issue](https://githu
82
82
 
83
83
  ## Licence
84
84
 
85
- MIT License.
85
+ MIT License
86
86
 
87
- Copyright © 2010-2025 Roy Revelt and other contributors.
87
+ Copyright © 2010-2025 Roy Revelt and other contributors
88
88
 
89
89
  <p align="center"><img src="https://codsen.com/images/png-codsen-ok.png" width="98" alt="ok" align="center"> <img src="https://codsen.com/images/png-codsen-1.png" width="148" alt="codsen" align="center"> <img src="https://codsen.com/images/png-codsen-star-small.png" width="32" alt="star" align="center"></p>
@@ -1,11 +1,11 @@
1
1
  /**
2
2
  * @name string-process-comma-separated
3
3
  * @fileoverview Extracts chunks from possibly comma or whatever-separated string
4
- * @version 4.1.18
5
- * @author Roy Revelt, Codsen Ltd
4
+ * @version 4.1.20
5
+ * @author Roy Revelt
6
6
  * @license MIT
7
7
  * {@link https://codsen.com/os/string-process-comma-separated/}
8
8
  */
9
9
 
10
- var $="4.1.18";var O=$;function E(s,l){if(typeof s!="string")throw new Error(`string-process-comma-separated: [THROW_ID_01] input must be string! It was given as ${typeof s}, equal to:
11
- ${JSON.stringify(s,null,4)}`);if(!s.length||!l||!l.cb&&!l.errCb)return;let e={...{from:0,to:s.length,offset:0,leadingWhitespaceOK:!1,trailingWhitespaceOK:!1,oneSpaceAfterCommaOK:!1,innerWhitespaceAllowed:!1,separator:",",cb:null,errCb:null},...l};Number.isInteger(l.from)||(e.from=0),Number.isInteger(l.to)||(e.to=s.length),Number.isInteger(l.offset)||(e.offset=0);let i=null,o=null,p=!1,a=[],f=null,n=!0;for(let t=e.from;t<e.to;t++){if(s[t].trim()&&s[t]!==e.separator&&(f=t),i===null&&s[t].trim()&&(!e.separator||s[t]!==e.separator)&&(p||(p=!0),a.length&&(a.length>1&&a.forEach((r,m)=>{m&&e.errCb&&e.errCb([[r+e.offset,r+1+e.offset]],"Remove separator.",n)}),a=[]),i=t),Number.isInteger(i)&&(t>i&&e.separator&&s[t]===e.separator||t+1===e.to)){let r=s.slice(i,t+1===e.to&&s[t]!==e.separator&&s[t].trim()?t+1:t);typeof e.cb=="function"&&e.cb(i+e.offset,(t+1===e.to&&s[t]!==e.separator&&s[t].trim()?t+1:f+1)+e.offset),i=null}if(!s[t].trim()&&o===null&&(o=t),o!==null&&(s[t].trim()||t+1===e.to)){if(o===e.from)!e.leadingWhitespaceOK&&typeof e.errCb=="function"&&e.errCb([[o+e.offset,(t+1===e.to?t+1:t)+e.offset]],"Remove whitespace.",n);else if(!s[t].trim()&&t+1===e.to)!e.trailingWhitespaceOK&&typeof e.errCb=="function"&&e.errCb([[o+e.offset,t+1+e.offset]],"Remove whitespace.",n);else if((!e.oneSpaceAfterCommaOK||!(s[t].trim()&&t>e.from+1&&s[t-1]===" "&&s[t-2]===","))&&(!e.innerWhitespaceAllowed||!(p&&s[o-1]&&s[t].trim()&&s[t]!==e.separator&&s[o-1]!==e.separator))){let r=o,m=t;t+1===e.to&&s[t]!==e.separator&&!s[t].trim()&&(m+=1);let u="";e.oneSpaceAfterCommaOK&&(s[o]===" "&&s[o-1]===e.separator?r+=1:s[o]!==" "&&(u=" "));let c="Remove whitespace.";!e.innerWhitespaceAllowed&&p&&s[o-1]&&s[t].trim()&&s[t]!==e.separator&&s[o-1]!==e.separator&&(n=!1,c="Bad whitespace."),u.length&&e.errCb?e.errCb([[r+e.offset,m+e.offset,u]],c,n):e.errCb&&e.errCb([[r+e.offset,m+e.offset]],c,n),n=!0}o=null}s[t]===e.separator&&(!p&&e.errCb?e.errCb([[t+e.offset,t+1+e.offset]],"Remove separator.",n):a.push(t)),t+1===e.to&&e.errCb&&a.forEach(r=>{e.errCb([[r+e.offset,r+1+e.offset]],"Remove separator.",n)})}}export{E as processCommaSep,O as version};
10
+ var $="4.1.20";var O=$;function E(s,l){if(typeof s!="string")throw new Error(`string-process-comma-separated: [THROW_ID_01] input must be string! It was given as ${typeof s}, equal to:
11
+ ${JSON.stringify(s,null,4)}`);if(!s.length||!l||!l.cb&&!l.errCb)return;let e={...{from:0,to:s.length,offset:0,leadingWhitespaceOK:!1,trailingWhitespaceOK:!1,oneSpaceAfterCommaOK:!1,innerWhitespaceAllowed:!1,separator:",",cb:null,errCb:null},...l};Number.isInteger(l.from)||(e.from=0),Number.isInteger(l.to)||(e.to=s.length),Number.isInteger(l.offset)||(e.offset=0);let i=null,o=null,p=!1,a=[],f=null,n=!0;for(let t=e.from;t<e.to;t++){if(s[t].trim()&&s[t]!==e.separator&&(f=t),i===null&&s[t].trim()&&(!e.separator||s[t]!==e.separator)&&(p||(p=!0),a.length&&(a.length>1&&a.forEach((r,u)=>{u&&e.errCb&&e.errCb([[r+e.offset,r+1+e.offset]],"Remove separator.",n)}),a=[]),i=t),Number.isInteger(i)&&(t>i&&e.separator&&s[t]===e.separator||t+1===e.to)){let r=s.slice(i,t+1===e.to&&s[t]!==e.separator&&s[t].trim()?t+1:t);typeof e.cb=="function"&&e.cb(i+e.offset,(t+1===e.to&&s[t]!==e.separator&&s[t].trim()?t+1:f+1)+e.offset),i=null}if(!s[t].trim()&&o===null&&(o=t),o!==null&&(s[t].trim()||t+1===e.to)){if(o===e.from)!e.leadingWhitespaceOK&&typeof e.errCb=="function"&&e.errCb([[o+e.offset,(t+1===e.to?t+1:t)+e.offset]],"Remove whitespace.",n);else if(!s[t].trim()&&t+1===e.to)!e.trailingWhitespaceOK&&typeof e.errCb=="function"&&e.errCb([[o+e.offset,t+1+e.offset]],"Remove whitespace.",n);else if((!e.oneSpaceAfterCommaOK||!(s[t].trim()&&t>e.from+1&&s[t-1]===" "&&s[t-2]===","))&&(!e.innerWhitespaceAllowed||!(p&&s[o-1]&&s[t].trim()&&s[t]!==e.separator&&s[o-1]!==e.separator))){let r=o,u=t;t+1===e.to&&s[t]!==e.separator&&!s[t].trim()&&(u+=1);let m="";e.oneSpaceAfterCommaOK&&(s[o]===" "&&s[o-1]===e.separator?r+=1:s[o]!==" "&&(m=" "));let c="Remove whitespace.";!e.innerWhitespaceAllowed&&p&&s[o-1]&&s[t].trim()&&s[t]!==e.separator&&s[o-1]!==e.separator&&(n=!1,c="Bad whitespace."),m.length&&e.errCb?e.errCb([[r+e.offset,u+e.offset,m]],c,n):e.errCb&&e.errCb([[r+e.offset,u+e.offset]],c,n),n=!0}o=null}s[t]===e.separator&&(!p&&e.errCb?e.errCb([[t+e.offset,t+1+e.offset]],"Remove separator.",n):a.push(t)),t+1===e.to&&e.errCb&&a.forEach(r=>{e.errCb([[r+e.offset,r+1+e.offset]],"Remove separator.",n)})}}export{E as processCommaSep,O as version};
@@ -1,10 +1,10 @@
1
1
  /**
2
2
  * @name string-process-comma-separated
3
3
  * @fileoverview Extracts chunks from possibly comma or whatever-separated string
4
- * @version 4.1.18
5
- * @author Roy Revelt, Codsen Ltd
4
+ * @version 4.1.20
5
+ * @author Roy Revelt
6
6
  * @license MIT
7
7
  * {@link https://codsen.com/os/string-process-comma-separated/}
8
8
  */
9
9
 
10
- "use strict";var stringProcessCommaSeparated=(()=>{var c=Object.defineProperty;var v=Object.getOwnPropertyDescriptor;var S=Object.getOwnPropertyNames,g=Object.getOwnPropertySymbols;var O=Object.prototype.hasOwnProperty,y=Object.prototype.propertyIsEnumerable;var h=(t,o,r)=>o in t?c(t,o,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[o]=r,b=(t,o)=>{for(var r in o||(o={}))O.call(o,r)&&h(t,r,o[r]);if(g)for(var r of g(o))y.call(o,r)&&h(t,r,o[r]);return t};var C=(t,o)=>{for(var r in o)c(t,r,{get:o[r],enumerable:!0})},N=(t,o,r,e)=>{if(o&&typeof o=="object"||typeof o=="function")for(let l of S(o))!O.call(t,l)&&l!==r&&c(t,l,{get:()=>o[l],enumerable:!(e=v(o,l))||e.enumerable});return t};var A=t=>N(c({},"__esModule",{value:!0}),t);var x={};C(x,{processCommaSep:()=>V,version:()=>D});var E="4.1.18";var D=E;function V(t,o){if(typeof t!="string")throw new Error("string-process-comma-separated: [THROW_ID_01] input must be string! It was given as ".concat(typeof t,", equal to:\n").concat(JSON.stringify(t,null,4)));if(!t.length||!o||!o.cb&&!o.errCb)return;let r={from:0,to:t.length,offset:0,leadingWhitespaceOK:!1,trailingWhitespaceOK:!1,oneSpaceAfterCommaOK:!1,innerWhitespaceAllowed:!1,separator:",",cb:null,errCb:null},e=b(b({},r),o);Number.isInteger(o.from)||(e.from=0),Number.isInteger(o.to)||(e.to=t.length),Number.isInteger(o.offset)||(e.offset=0);let l=null,n=null,m=!1,p=[],d=null,a=!0;for(let s=e.from;s<e.to;s++){if(t[s].trim()&&t[s]!==e.separator&&(d=s),l===null&&t[s].trim()&&(!e.separator||t[s]!==e.separator)&&(m||(m=!0),p.length&&(p.length>1&&p.forEach((i,u)=>{u&&e.errCb&&e.errCb([[i+e.offset,i+1+e.offset]],"Remove separator.",a)}),p=[]),l=s),Number.isInteger(l)&&(s>l&&e.separator&&t[s]===e.separator||s+1===e.to)){let i=t.slice(l,s+1===e.to&&t[s]!==e.separator&&t[s].trim()?s+1:s);typeof e.cb=="function"&&e.cb(l+e.offset,(s+1===e.to&&t[s]!==e.separator&&t[s].trim()?s+1:d+1)+e.offset),l=null}if(!t[s].trim()&&n===null&&(n=s),n!==null&&(t[s].trim()||s+1===e.to)){if(n===e.from)!e.leadingWhitespaceOK&&typeof e.errCb=="function"&&e.errCb([[n+e.offset,(s+1===e.to?s+1:s)+e.offset]],"Remove whitespace.",a);else if(!t[s].trim()&&s+1===e.to)!e.trailingWhitespaceOK&&typeof e.errCb=="function"&&e.errCb([[n+e.offset,s+1+e.offset]],"Remove whitespace.",a);else if((!e.oneSpaceAfterCommaOK||!(t[s].trim()&&s>e.from+1&&t[s-1]===" "&&t[s-2]===","))&&(!e.innerWhitespaceAllowed||!(m&&t[n-1]&&t[s].trim()&&t[s]!==e.separator&&t[n-1]!==e.separator))){let i=n,u=s;s+1===e.to&&t[s]!==e.separator&&!t[s].trim()&&(u+=1);let f="";e.oneSpaceAfterCommaOK&&(t[n]===" "&&t[n-1]===e.separator?i+=1:t[n]!==" "&&(f=" "));let $="Remove whitespace.";!e.innerWhitespaceAllowed&&m&&t[n-1]&&t[s].trim()&&t[s]!==e.separator&&t[n-1]!==e.separator&&(a=!1,$="Bad whitespace."),f.length&&e.errCb?e.errCb([[i+e.offset,u+e.offset,f]],$,a):e.errCb&&e.errCb([[i+e.offset,u+e.offset]],$,a),a=!0}n=null}t[s]===e.separator&&(!m&&e.errCb?e.errCb([[s+e.offset,s+1+e.offset]],"Remove separator.",a):p.push(s)),s+1===e.to&&e.errCb&&p.forEach(i=>{e.errCb([[i+e.offset,i+1+e.offset]],"Remove separator.",a)})}}return A(x);})();
10
+ "use strict";var stringProcessCommaSeparated=(()=>{var c=Object.defineProperty;var v=Object.getOwnPropertyDescriptor;var S=Object.getOwnPropertyNames,g=Object.getOwnPropertySymbols;var O=Object.prototype.hasOwnProperty,y=Object.prototype.propertyIsEnumerable;var h=(t,o,r)=>o in t?c(t,o,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[o]=r,b=(t,o)=>{for(var r in o||(o={}))O.call(o,r)&&h(t,r,o[r]);if(g)for(var r of g(o))y.call(o,r)&&h(t,r,o[r]);return t};var C=(t,o)=>{for(var r in o)c(t,r,{get:o[r],enumerable:!0})},N=(t,o,r,e)=>{if(o&&typeof o=="object"||typeof o=="function")for(let l of S(o))!O.call(t,l)&&l!==r&&c(t,l,{get:()=>o[l],enumerable:!(e=v(o,l))||e.enumerable});return t};var A=t=>N(c({},"__esModule",{value:!0}),t);var x={};C(x,{processCommaSep:()=>V,version:()=>D});var E="4.1.20";var D=E;function V(t,o){if(typeof t!="string")throw new Error("string-process-comma-separated: [THROW_ID_01] input must be string! It was given as ".concat(typeof t,", equal to:\n").concat(JSON.stringify(t,null,4)));if(!t.length||!o||!o.cb&&!o.errCb)return;let r={from:0,to:t.length,offset:0,leadingWhitespaceOK:!1,trailingWhitespaceOK:!1,oneSpaceAfterCommaOK:!1,innerWhitespaceAllowed:!1,separator:",",cb:null,errCb:null},e=b(b({},r),o);Number.isInteger(o.from)||(e.from=0),Number.isInteger(o.to)||(e.to=t.length),Number.isInteger(o.offset)||(e.offset=0);let l=null,n=null,u=!1,p=[],d=null,a=!0;for(let s=e.from;s<e.to;s++){if(t[s].trim()&&t[s]!==e.separator&&(d=s),l===null&&t[s].trim()&&(!e.separator||t[s]!==e.separator)&&(u||(u=!0),p.length&&(p.length>1&&p.forEach((i,m)=>{m&&e.errCb&&e.errCb([[i+e.offset,i+1+e.offset]],"Remove separator.",a)}),p=[]),l=s),Number.isInteger(l)&&(s>l&&e.separator&&t[s]===e.separator||s+1===e.to)){let i=t.slice(l,s+1===e.to&&t[s]!==e.separator&&t[s].trim()?s+1:s);typeof e.cb=="function"&&e.cb(l+e.offset,(s+1===e.to&&t[s]!==e.separator&&t[s].trim()?s+1:d+1)+e.offset),l=null}if(!t[s].trim()&&n===null&&(n=s),n!==null&&(t[s].trim()||s+1===e.to)){if(n===e.from)!e.leadingWhitespaceOK&&typeof e.errCb=="function"&&e.errCb([[n+e.offset,(s+1===e.to?s+1:s)+e.offset]],"Remove whitespace.",a);else if(!t[s].trim()&&s+1===e.to)!e.trailingWhitespaceOK&&typeof e.errCb=="function"&&e.errCb([[n+e.offset,s+1+e.offset]],"Remove whitespace.",a);else if((!e.oneSpaceAfterCommaOK||!(t[s].trim()&&s>e.from+1&&t[s-1]===" "&&t[s-2]===","))&&(!e.innerWhitespaceAllowed||!(u&&t[n-1]&&t[s].trim()&&t[s]!==e.separator&&t[n-1]!==e.separator))){let i=n,m=s;s+1===e.to&&t[s]!==e.separator&&!t[s].trim()&&(m+=1);let f="";e.oneSpaceAfterCommaOK&&(t[n]===" "&&t[n-1]===e.separator?i+=1:t[n]!==" "&&(f=" "));let $="Remove whitespace.";!e.innerWhitespaceAllowed&&u&&t[n-1]&&t[s].trim()&&t[s]!==e.separator&&t[n-1]!==e.separator&&(a=!1,$="Bad whitespace."),f.length&&e.errCb?e.errCb([[i+e.offset,m+e.offset,f]],$,a):e.errCb&&e.errCb([[i+e.offset,m+e.offset]],$,a),a=!0}n=null}t[s]===e.separator&&(!u&&e.errCb?e.errCb([[s+e.offset,s+1+e.offset]],"Remove separator.",a):p.push(s)),s+1===e.to&&e.errCb&&p.forEach(i=>{e.errCb([[i+e.offset,i+1+e.offset]],"Remove separator.",a)})}}return A(x);})();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "string-process-comma-separated",
3
- "version": "4.1.18",
3
+ "version": "4.1.20",
4
4
  "description": "Extracts chunks from possibly comma or whatever-separated string",
5
5
  "keywords": [
6
6
  "characters",
@@ -43,7 +43,7 @@
43
43
  "examples": "node '../../ops/scripts/run-examples.js'",
44
44
  "lect": "node '../../ops/lect/lect.js' && npm run prettier -- 'README.md' '.all-contributorsrc' 'rollup.config.js' --write",
45
45
  "letspublish": "npm publish --provenance || :",
46
- "lint": "eslint . --fix",
46
+ "lint": "eslint . --fix --concurrency=auto --cache",
47
47
  "perf": "node perf/check.js",
48
48
  "prep": "echo 'ready'",
49
49
  "prettier": "prettier",
@@ -70,7 +70,7 @@
70
70
  }
71
71
  },
72
72
  "dependencies": {
73
- "codsen-utils": "^1.6.17"
73
+ "codsen-utils": "^1.6.19"
74
74
  },
75
75
  "publishConfig": {
76
76
  "registry": "https://registry.npmjs.org/"