email-all-chars-within-ascii 4.0.13 → 4.0.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/CHANGELOG.md CHANGED
@@ -3,6 +3,12 @@
3
3
  All notable changes to this project will be documented in this file.
4
4
  See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
5
5
 
6
+ ## 4.0.16 (2022-04-18)
7
+
8
+ ### Bug Fixes
9
+
10
+ - tweak types ([38893fc](https://github.com/codsen/codsen/commit/38893fcafddd3673b19cb43eb0ab1ebdcdb22df6))
11
+
6
12
  ## 4.0.0 (2021-09-09)
7
13
 
8
14
  ### Features
package/README.md CHANGED
@@ -26,7 +26,7 @@
26
26
 
27
27
  ## Install
28
28
 
29
- The latest version is **ESM only**: Node 12+ is needed to use it and it must be `import`ed instead of `require`d. If your project is not on ESM yet and you want to use `require`, use an older version of this program, `3.1.0`.
29
+ This package is [pure ESM](https://gist.github.com/sindresorhus/a39789f98801d908bbc7ff3ecc99d99c). If you're not ready yet, install an older version of this program, 3.1.0 (`npm i email-all-chars-within-ascii@3.1.0`).
30
30
 
31
31
  ```bash
32
32
  npm i email-all-chars-within-ascii
@@ -1,15 +1,15 @@
1
1
  /**
2
2
  * @name email-all-chars-within-ascii
3
3
  * @fileoverview Scans all characters within a string and checks are they within ASCII range
4
- * @version 4.0.13
4
+ * @version 4.0.16
5
5
  * @author Roy Revelt, Codsen Ltd
6
6
  * @license MIT
7
7
  * {@link https://codsen.com/os/email-all-chars-within-ascii/}
8
8
  */
9
9
 
10
- var a="4.0.13";var h=a,p={lineLength:500};function y(e,r){if(typeof e!="string")throw new Error(`email-all-chars-within-ascii/within(): [THROW_ID_01] The input is not string but ${typeof e}, equal to: ${JSON.stringify(e,null,4)}`);if(r&&typeof r!="object")throw new Error(`email-all-chars-within-ascii/within(): [THROW_ID_02] The opts is not a plain object but ${typeof r}, equal to:
11
- ${JSON.stringify(r,null,4)}`);if(!e.length)return[];let o={...p,...r},i=0,s=1,l=[];for(let t=0,c=e.length;t<=c;t++)if(o.lineLength&&(!e[t]||e[t]==="\r"||e[t]===`
12
- `)&&i>o.lineLength&&l.push({type:"line length",line:s,column:i,positionIdx:t,value:i}),e[t]==="\r"||e[t]===`
13
- `?(i=0,(e[t]===`
10
+ var a="4.0.16";var h=a,p={lineLength:500};function y(e,r){if(typeof e!="string")throw new Error(`email-all-chars-within-ascii/within(): [THROW_ID_01] The input is not string but ${typeof e}, equal to: ${JSON.stringify(e,null,4)}`);if(r&&typeof r!="object")throw new Error(`email-all-chars-within-ascii/within(): [THROW_ID_02] The resolvedOpts is not a plain object but ${typeof r}, equal to:
11
+ ${JSON.stringify(r,null,4)}`);if(!e.length)return[];let o={...p,...r},n=0,s=1,l=[];for(let t=0,c=e.length;t<=c;t++)if(o.lineLength&&(!e[t]||e[t]==="\r"||e[t]===`
12
+ `)&&n>o.lineLength&&l.push({type:"line length",line:s,column:n,positionIdx:t,value:n}),e[t]==="\r"||e[t]===`
13
+ `?(n=0,(e[t]===`
14
14
  `||e[t+1]!==`
15
- `)&&(s+=1)):i+=1,e[t]){let n=e[t].codePointAt(0);(n===void 0||n>126||n<9||n===11||n===12||n>13&&n<32)&&l.push({type:"character",line:s,column:i,positionIdx:t,value:e[t],codePoint:n,UTF32Hex:e[t].charCodeAt(0).toString(16).padStart(4,"0").toLowerCase()})}return l}export{p as defaults,h as version,y as within};
15
+ `)&&(s+=1)):n+=1,e[t]){let i=e[t].codePointAt(0);(i===void 0||i>126||i<9||i===11||i===12||i>13&&i<32)&&l.push({type:"character",line:s,column:n,positionIdx:t,value:e[t],codePoint:i,UTF32Hex:e[t].charCodeAt(0).toString(16).padStart(4,"0").toLowerCase()})}return l}export{p as defaults,h as version,y as within};
@@ -1,15 +1,15 @@
1
1
  /**
2
2
  * @name email-all-chars-within-ascii
3
3
  * @fileoverview Scans all characters within a string and checks are they within ASCII range
4
- * @version 4.0.13
4
+ * @version 4.0.16
5
5
  * @author Roy Revelt, Codsen Ltd
6
6
  * @license MIT
7
7
  * {@link https://codsen.com/os/email-all-chars-within-ascii/}
8
8
  */
9
9
 
10
- var emailAllCharsWithinAscii=(()=>{var o=Object.defineProperty;var b=Object.getOwnPropertyDescriptor;var $=Object.getOwnPropertyNames,u=Object.getOwnPropertySymbols;var d=Object.prototype.hasOwnProperty,f=Object.prototype.propertyIsEnumerable;var p=(e,t,n)=>t in e?o(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,c=(e,t)=>{for(var n in t||(t={}))d.call(t,n)&&p(e,n,t[n]);if(u)for(var n of u(t))f.call(t,n)&&p(e,n,t[n]);return e};var g=(e,t)=>{for(var n in t)o(e,n,{get:t[n],enumerable:!0})},w=(e,t,n,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let s of $(t))!d.call(e,s)&&s!==n&&o(e,s,{get:()=>t[s],enumerable:!(r=b(t,s))||r.enumerable});return e};var x=e=>w(o({},"__esModule",{value:!0}),e);var R={};g(R,{defaults:()=>h,version:()=>E,within:()=>j});var m="4.0.13";var E=m,h={lineLength:500};function j(e,t){if(typeof e!="string")throw new Error(`email-all-chars-within-ascii/within(): [THROW_ID_01] The input is not string but ${typeof e}, equal to: ${JSON.stringify(e,null,4)}`);if(t&&typeof t!="object")throw new Error(`email-all-chars-within-ascii/within(): [THROW_ID_02] The opts is not a plain object but ${typeof t}, equal to:
11
- ${JSON.stringify(t,null,4)}`);if(!e.length)return[];let n=c(c({},h),t),r=0,s=1,a=[];for(let i=0,y=e.length;i<=y;i++)if(n.lineLength&&(!e[i]||e[i]==="\r"||e[i]===`
12
- `)&&r>n.lineLength&&a.push({type:"line length",line:s,column:r,positionIdx:i,value:r}),e[i]==="\r"||e[i]===`
13
- `?(r=0,(e[i]===`
14
- `||e[i+1]!==`
15
- `)&&(s+=1)):r+=1,e[i]){let l=e[i].codePointAt(0);(l===void 0||l>126||l<9||l===11||l===12||l>13&&l<32)&&a.push({type:"character",line:s,column:r,positionIdx:i,value:e[i],codePoint:l,UTF32Hex:e[i].charCodeAt(0).toString(16).padStart(4,"0").toLowerCase()})}return a}return x(R);})();
10
+ var emailAllCharsWithinAscii=(()=>{var o=Object.defineProperty;var b=Object.getOwnPropertyDescriptor;var g=Object.getOwnPropertyNames,u=Object.getOwnPropertySymbols;var d=Object.prototype.hasOwnProperty,$=Object.prototype.propertyIsEnumerable;var p=(e,t,i)=>t in e?o(e,t,{enumerable:!0,configurable:!0,writable:!0,value:i}):e[t]=i,c=(e,t)=>{for(var i in t||(t={}))d.call(t,i)&&p(e,i,t[i]);if(u)for(var i of u(t))$.call(t,i)&&p(e,i,t[i]);return e};var f=(e,t)=>{for(var i in t)o(e,i,{get:t[i],enumerable:!0})},w=(e,t,i,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let s of g(t))!d.call(e,s)&&s!==i&&o(e,s,{get:()=>t[s],enumerable:!(r=b(t,s))||r.enumerable});return e};var v=e=>w(o({},"__esModule",{value:!0}),e);var j={};f(j,{defaults:()=>h,version:()=>O,within:()=>E});var m="4.0.16";var O=m,h={lineLength:500};function E(e,t){if(typeof e!="string")throw new Error(`email-all-chars-within-ascii/within(): [THROW_ID_01] The input is not string but ${typeof e}, equal to: ${JSON.stringify(e,null,4)}`);if(t&&typeof t!="object")throw new Error(`email-all-chars-within-ascii/within(): [THROW_ID_02] The resolvedOpts is not a plain object but ${typeof t}, equal to:
11
+ ${JSON.stringify(t,null,4)}`);if(!e.length)return[];let i=c(c({},h),t),r=0,s=1,a=[];for(let n=0,y=e.length;n<=y;n++)if(i.lineLength&&(!e[n]||e[n]==="\r"||e[n]===`
12
+ `)&&r>i.lineLength&&a.push({type:"line length",line:s,column:r,positionIdx:n,value:r}),e[n]==="\r"||e[n]===`
13
+ `?(r=0,(e[n]===`
14
+ `||e[n+1]!==`
15
+ `)&&(s+=1)):r+=1,e[n]){let l=e[n].codePointAt(0);(l===void 0||l>126||l<9||l===11||l===12||l>13&&l<32)&&a.push({type:"character",line:s,column:r,positionIdx:n,value:e[n],codePoint:l,UTF32Hex:e[n].charCodeAt(0).toString(16).padStart(4,"0").toLowerCase()})}return a}return v(j);})();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "email-all-chars-within-ascii",
3
- "version": "4.0.13",
3
+ "version": "4.0.16",
4
4
  "description": "Scans all characters within a string and checks are they within ASCII range",
5
5
  "keywords": [
6
6
  "7bit",
@@ -66,6 +66,6 @@
66
66
  }
67
67
  },
68
68
  "dependencies": {
69
- "check-types-mini": "^7.1.0"
69
+ "check-types-mini": "^7.1.3"
70
70
  }
71
71
  }
package/types/index.d.ts CHANGED
@@ -12,6 +12,6 @@ interface Opts {
12
12
  lineLength: number;
13
13
  }
14
14
  declare const defaults: Opts;
15
- declare function within(str: string, originalOpts?: Partial<Opts>): Res[];
15
+ declare function within(str: string, opts?: Partial<Opts>): Res[];
16
16
 
17
17
  export { defaults, version, within };