properties-file 5.0.2 → 5.0.3

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/README.md CHANGED
@@ -3,7 +3,7 @@
3
3
  [![License](https://img.shields.io/npm/l/make-coverage-badge.svg?color=brightgreen)](https://opensource.org/licenses/MIT)
4
4
  [![Download Stats](https://img.shields.io/npm/dw/properties-file.svg?color=brightgreen)](https://www.npmjs.com/package/properties-file)
5
5
  ![Coverage](https://img.shields.io/badge/coverage-100%25-brightgreen.svg)
6
- ![Package Size](https://img.shields.io/badge/min%2Bgzip-1.1%20kB-brightgreen)
6
+ ![Package Size](https://img.shields.io/badge/min%2Bgzip-1014%20B-brightgreen)
7
7
  ![Dependencies](https://img.shields.io/badge/dependencies-0-brightgreen)
8
8
 
9
9
  `.properties` file parser, editor, formatter and bundler integrations.
@@ -28,7 +28,7 @@ npm install properties-file
28
28
  - `PropertiesEditor` enables insertion, edition, and removal of entries while preserving formatting.
29
29
  - `escapeKey` and `escapeValue` convert any content to `.properties` compatible format.
30
30
  - Bundler integrations for Webpack, Rollup/Vite, esbuild, and Bun to import `.properties` files directly. See [BUNDLER.md](./docs/BUNDLER.md).
31
- - **Tiny with 0 dependencies** — `getProperties` is only 1.1 kB min+gzip.
31
+ - **Tiny with 0 dependencies** — `getProperties` is only 1014 B min+gzip.
32
32
  - **Runs everywhere** — compiled to ES5, works in any browser and on Node.js all the way back to v0.10 (2013). [Verified via Docker](./tests/node-compat/).
33
33
  - **100% test coverage** based on the output from a Java implementation.
34
34
  - Active maintenance (many popular `.properties` packages have been inactive for years). See our [detailed comparison](./docs/COMPARISON.md) with other packages.
@@ -7,6 +7,16 @@ export type KeyValuePairObject = {
7
7
  /**
8
8
  * Converts the content of a `.properties` file to a key-value pair object.
9
9
  *
10
+ * This is a self-contained, zero-dependency parser optimized for minimal
11
+ * bundle size. It implements the Java `java.util.Properties` specification:
12
+ *
13
+ * - BOM detection and skipping
14
+ * - Comment lines (`#` or `!`)
15
+ * - Line continuations (trailing odd backslash)
16
+ * - Key-value separator detection (`=`, `:`, or whitespace)
17
+ * - Escape sequence processing (`\\n`, `\\t`, `\\r`, `\\f`, `\\\\`, `\\uXXXX`)
18
+ * - Last-value-wins semantics for duplicate keys
19
+ *
10
20
  * @param content - The content of a `.properties` file.
11
21
  *
12
22
  * @returns A key/value object representing the content of a `.properties` file.
package/dist/cjs/index.js CHANGED
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0}),Object.defineProperty(exports,"getProperties",{enumerable:!0,get:function(){return getProperties}});var _parseproperties=require("./parse-properties.js"),getProperties=function(e){return(0,_parseproperties.parseProperties)(e)};
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0}),Object.defineProperty(exports,"getProperties",{enumerable:!0,get:function(){return getProperties}});var CH_TAB=9,CH_FF=12,CH_SPACE=32,CH_BANG=33,CH_HASH=35,CH_COLON=58,CH_EQUALS=61,CH_BACKSLASH=92,CH_LOWER_F=102,CH_LOWER_N=110,CH_LOWER_R=114,CH_LOWER_T=116,CH_LOWER_U=117,CH_BOM=65279,skipWhitespace=function(e,r,t){for(;r<t;){var C=e.charCodeAt(r);if(C!==CH_SPACE&&C!==CH_TAB&&C!==CH_FF)break;r++}return r},isHexDigit=function(e){return e>=48&&e<=57||e>=65&&e<=70||e>=97&&e<=102},hexValue=function(e){return e>=48&&e<=57?e-48:e>=65&&e<=70?e-55:e-87},unescapeContent=function(e){for(var r=e.length,t="",C=0,a=0;a<r;)if(e.charCodeAt(a)===CH_BACKSLASH){switch(a>C&&(t+=e.slice(C,a)),a++,e.charCodeAt(a)){case CH_LOWER_N:t+="\n",a++;break;case CH_LOWER_T:t+="\t",a++;break;case CH_LOWER_R:t+="\r",a++;break;case CH_LOWER_F:t+="\f",a++;break;case CH_LOWER_U:if(a+4>=r||!isHexDigit(e.charCodeAt(a+1))||!isHexDigit(e.charCodeAt(a+2))||!isHexDigit(e.charCodeAt(a+3))||!isHexDigit(e.charCodeAt(a+4))){var i=e.slice(a-1,a+5);throw new Error("malformed escaped unicode characters '".concat(i,"'"))}var c=hexValue(e.charCodeAt(a+1))<<12|hexValue(e.charCodeAt(a+2))<<8|hexValue(e.charCodeAt(a+3))<<4|hexValue(e.charCodeAt(a+4));t+=String.fromCharCode(c),a+=5;break;default:t+=e.charAt(a),a++}C=a}else a++;return C<r&&(t+=e.slice(C,r)),t},getProperties=function(e){for(var r="string"==typeof e?e:e.toString(),t={},C=(r.length>0&&r.charCodeAt(0)===CH_BOM?r.slice(1):r).split(/\r\n|\r|\n/),a=C.length,i=0;i<a;){var c=C[i],o=c.length,s=skipWhitespace(c,0,o);if(s>=o)i++;else{var H=c.charCodeAt(s);if(H!==CH_HASH&&H!==CH_BANG){for(var _=0,n=o-1;n>=0&&c.charCodeAt(n)===CH_BACKSLASH;n--)_++;var A=_%2==1,h=void 0,l=void 0;if(A){var f=(s>0?c.slice(s):c).slice(0,-1),d=[f];for(l=-1!==f.indexOf("\\");A&&i+1<a;){var u=C[++i],p=u.length,O=skipWhitespace(u,0,p);_=0;for(var v=p-1;v>=O&&u.charCodeAt(v)===CH_BACKSLASH;v--)_++;var L=(A=_%2==1)?u.slice(O,p-1):u.slice(O);l||-1===L.indexOf("\\")||(l=!0),d.push(L)}h=d.join("")}else l=-1!==(h=s>0?c.slice(s):c).indexOf("\\");for(var S=h.length,g=0,E=!1;g<S;){var x=h.charCodeAt(g);if(x!==CH_BACKSLASH){if(!E&&(x===CH_EQUALS||x===CH_COLON||x===CH_SPACE||x===CH_TAB||x===CH_FF))break;E=!1,g++}else E=!E,g++}var W=g;if(W<S){var B=h.charCodeAt(W);B!==CH_SPACE&&B!==CH_TAB&&B!==CH_FF||(W=skipWhitespace(h,W,S))<S&&(B=h.charCodeAt(W)),W<S&&(B===CH_EQUALS||B===CH_COLON)&&(W++,W=skipWhitespace(h,W,S))}var k=h.slice(0,g),R=h.slice(W);t[l?unescapeContent(k):k]=l?unescapeContent(R):R,i++}else i++}}return t};
@@ -7,6 +7,16 @@ export type KeyValuePairObject = {
7
7
  /**
8
8
  * Converts the content of a `.properties` file to a key-value pair object.
9
9
  *
10
+ * This is a self-contained, zero-dependency parser optimized for minimal
11
+ * bundle size. It implements the Java `java.util.Properties` specification:
12
+ *
13
+ * - BOM detection and skipping
14
+ * - Comment lines (`#` or `!`)
15
+ * - Line continuations (trailing odd backslash)
16
+ * - Key-value separator detection (`=`, `:`, or whitespace)
17
+ * - Escape sequence processing (`\\n`, `\\t`, `\\r`, `\\f`, `\\\\`, `\\uXXXX`)
18
+ * - Last-value-wins semantics for duplicate keys
19
+ *
10
20
  * @param content - The content of a `.properties` file.
11
21
  *
12
22
  * @returns A key/value object representing the content of a `.properties` file.
package/dist/esm/index.js CHANGED
@@ -1 +1 @@
1
- import{parseProperties}from"./parse-properties.js";export var getProperties=function(r){return parseProperties(r)};
1
+ var CH_TAB=9,CH_FF=12,CH_SPACE=32,CH_BANG=33,CH_HASH=35,CH_COLON=58,CH_EQUALS=61,CH_BACKSLASH=92,CH_LOWER_F=102,CH_LOWER_N=110,CH_LOWER_R=114,CH_LOWER_T=116,CH_LOWER_U=117,CH_BOM=65279,skipWhitespace=function(e,r,C){for(;r<C;){var a=e.charCodeAt(r);if(a!==CH_SPACE&&a!==CH_TAB&&a!==CH_FF)break;r++}return r},isHexDigit=function(e){return e>=48&&e<=57||e>=65&&e<=70||e>=97&&e<=102},hexValue=function(e){return e>=48&&e<=57?e-48:e>=65&&e<=70?e-55:e-87},unescapeContent=function(e){for(var r=e.length,C="",a=0,t=0;t<r;)if(e.charCodeAt(t)===CH_BACKSLASH){switch(t>a&&(C+=e.slice(a,t)),t++,e.charCodeAt(t)){case CH_LOWER_N:C+="\n",t++;break;case CH_LOWER_T:C+="\t",t++;break;case CH_LOWER_R:C+="\r",t++;break;case CH_LOWER_F:C+="\f",t++;break;case CH_LOWER_U:if(t+4>=r||!isHexDigit(e.charCodeAt(t+1))||!isHexDigit(e.charCodeAt(t+2))||!isHexDigit(e.charCodeAt(t+3))||!isHexDigit(e.charCodeAt(t+4))){var i=e.slice(t-1,t+5);throw new Error("malformed escaped unicode characters '".concat(i,"'"))}var c=hexValue(e.charCodeAt(t+1))<<12|hexValue(e.charCodeAt(t+2))<<8|hexValue(e.charCodeAt(t+3))<<4|hexValue(e.charCodeAt(t+4));C+=String.fromCharCode(c),t+=5;break;default:C+=e.charAt(t),t++}a=t}else t++;return a<r&&(C+=e.slice(a,r)),C};export var getProperties=function(e){for(var r="string"==typeof e?e:e.toString(),C={},a=(r.length>0&&r.charCodeAt(0)===CH_BOM?r.slice(1):r).split(/\r\n|\r|\n/),t=a.length,i=0;i<t;){var c=a[i],H=c.length,_=skipWhitespace(c,0,H);if(_>=H)i++;else{var o=c.charCodeAt(_);if(o!==CH_HASH&&o!==CH_BANG){for(var s=0,A=H-1;A>=0&&c.charCodeAt(A)===CH_BACKSLASH;A--)s++;var n=s%2==1,h=void 0,l=void 0;if(n){var f=(_>0?c.slice(_):c).slice(0,-1),d=[f];for(l=-1!==f.indexOf("\\");n&&i+1<t;){var v=a[++i],u=v.length,L=skipWhitespace(v,0,u);s=0;for(var O=u-1;O>=L&&v.charCodeAt(O)===CH_BACKSLASH;O--)s++;var S=(n=s%2==1)?v.slice(L,u-1):v.slice(L);l||-1===S.indexOf("\\")||(l=!0),d.push(S)}h=d.join("")}else l=-1!==(h=_>0?c.slice(_):c).indexOf("\\");for(var p=h.length,E=0,g=!1;E<p;){var W=h.charCodeAt(E);if(W!==CH_BACKSLASH){if(!g&&(W===CH_EQUALS||W===CH_COLON||W===CH_SPACE||W===CH_TAB||W===CH_FF))break;g=!1,E++}else g=!g,E++}var x=E;if(x<p){var B=h.charCodeAt(x);B!==CH_SPACE&&B!==CH_TAB&&B!==CH_FF||(x=skipWhitespace(h,x,p))<p&&(B=h.charCodeAt(x)),x<p&&(B===CH_EQUALS||B===CH_COLON)&&(x++,x=skipWhitespace(h,x,p))}var k=h.slice(0,E),R=h.slice(x);C[l?unescapeContent(k):k]=l?unescapeContent(R):R,i++}else i++}}return C};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "properties-file",
3
- "version": "5.0.2",
3
+ "version": "5.0.3",
4
4
  "description": ".properties file parser, editor, formatter and bundler integrations.",
5
5
  "keywords": [
6
6
  ".properties",
@@ -1,22 +0,0 @@
1
- import type { KeyValuePairObject } from './index.js';
2
- /**
3
- * Parse a `.properties` file content string into a key-value pair object.
4
- *
5
- * This is a functional, single-pass parser that implements the Java
6
- * `java.util.Properties` specification:
7
- *
8
- * - BOM detection and skipping
9
- * - Comment lines (`#` or `!`)
10
- * - Line continuations (trailing odd backslash)
11
- * - Key-value separator detection (`=`, `:`, or whitespace)
12
- * - Escape sequence processing (`\\n`, `\\t`, `\\r`, `\\f`, `\\\\`, `\\uXXXX`)
13
- * - Last-value-wins semantics for duplicate keys
14
- *
15
- * All character inspection uses `charCodeAt()` (ES5). No regex, no
16
- * intermediate object allocations.
17
- *
18
- * @param content - The content of a `.properties` file (string or Buffer).
19
- *
20
- * @returns A key-value pair object where every value is a string.
21
- */
22
- export declare const parseProperties: (content: string | Buffer) => KeyValuePairObject;
@@ -1 +0,0 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0}),Object.defineProperty(exports,"parseProperties",{enumerable:!0,get:function(){return parseProperties}});var CH_TAB=9,CH_LF=10,CH_FF=12,CH_CR=13,CH_SPACE=32,CH_BANG=33,CH_HASH=35,CH_COLON=58,CH_EQUALS=61,CH_BACKSLASH=92,CH_LOWER_F=102,CH_LOWER_N=110,CH_LOWER_R=114,CH_LOWER_T=116,CH_LOWER_U=117,CH_BOM=65279,skipWhitespace=function(e,C,r){for(;C<r;){var a=e.charCodeAt(C);if(a!==CH_SPACE&&a!==CH_TAB&&a!==CH_FF)break;C++}return C},isHexDigit=function(e){return e>=48&&e<=57||e>=65&&e<=70||e>=97&&e<=102},hexValue=function(e){return e>=48&&e<=57?e-48:e>=65&&e<=70?e-55:e-87},unescapeContent=function(e,C,r,a,t){if(!a)return e.slice(C,r);for(var H="",_=C,c=C;c<r;)if(e.charCodeAt(c)===CH_BACKSLASH){switch(c>_&&(H+=e.slice(_,c)),c++,e.charCodeAt(c)){case CH_LOWER_N:H+="\n",c++;break;case CH_LOWER_T:H+="\t",c++;break;case CH_LOWER_R:H+="\r",c++;break;case CH_LOWER_F:H+="\f",c++;break;case CH_LOWER_U:if(c+4>=r||!isHexDigit(e.charCodeAt(c+1))||!isHexDigit(e.charCodeAt(c+2))||!isHexDigit(e.charCodeAt(c+3))||!isHexDigit(e.charCodeAt(c+4))){var i=e.slice(c-1,c+5);throw new Error("malformed escaped unicode characters '".concat(i,"' in property starting at line ").concat(t))}var o=hexValue(e.charCodeAt(c+1))<<12|hexValue(e.charCodeAt(c+2))<<8|hexValue(e.charCodeAt(c+3))<<4|hexValue(e.charCodeAt(c+4));H+=String.fromCharCode(o),c+=5;break;default:H+=e.charAt(c),c++}_=c}else c++;return _<r&&(H+=e.slice(_,r)),H},parseProperties=function(e){var C="string"==typeof e?e:e.toString(),r=C.length,a={},t=0,H=1;for(r>0&&C.charCodeAt(0)===CH_BOM&&(t=1);t<r&&!((t=skipWhitespace(C,t,r))>=r);){var _=C.charCodeAt(t);if(_!==CH_LF)if(_!==CH_CR)if(_!==CH_HASH&&_!==CH_BANG){for(var c=H,i=t,o=0,A=!1;t<r&&(_=C.charCodeAt(t))!==CH_LF&&_!==CH_CR;)_===CH_BACKSLASH?(o++,A=!0):o=0,t++;if(o%2==1){var s=[C.slice(i,t-1)],h=A;for(t<r&&(C.charCodeAt(t)===CH_CR?++t<r&&C.charCodeAt(t)===CH_LF&&t++:t++,H++),t=skipWhitespace(C,t,r);;){var n=t;o=0;for(var d=!1;t<r&&(_=C.charCodeAt(t))!==CH_LF&&_!==CH_CR;)_===CH_BACKSLASH?(o++,d=!0):o=0,t++;var f=o%2==1,p=f?t-1:t;if(s.push(C.slice(n,p)),d&&(h=!0),t<r&&(C.charCodeAt(t)===CH_CR?++t<r&&C.charCodeAt(t)===CH_LF&&t++:t++,H++),!f)break;t=skipWhitespace(C,t,r)}for(var L=s.join(""),u=L.length,S=0,l=!1;S<u;)if((_=L.charCodeAt(S))!==CH_BACKSLASH){if(!l&&(_===CH_EQUALS||_===CH_COLON||_===CH_SPACE||_===CH_TAB||_===CH_FF))break;l=!1,S++}else l=!l,S++;var F=S;F<u&&((_=L.charCodeAt(F))!==CH_SPACE&&_!==CH_TAB&&_!==CH_FF||(F=skipWhitespace(L,F,u))<u&&(_=L.charCodeAt(F)),F<u&&(_===CH_EQUALS||_===CH_COLON)&&(F++,F=skipWhitespace(L,F,u))),a[unescapeContent(L,0,S,h,c)]=unescapeContent(L,F,u,h,c)}else{var O=t;t<r&&(C.charCodeAt(t)===CH_CR?++t<r&&C.charCodeAt(t)===CH_LF&&t++:t++,H++);for(var E=i,R=!1;E<O;)if((_=C.charCodeAt(E))!==CH_BACKSLASH){if(!R&&(_===CH_EQUALS||_===CH_COLON||_===CH_SPACE||_===CH_TAB||_===CH_FF))break;R=!1,E++}else R=!R,E++;var k=E;k<O&&((_=C.charCodeAt(k))!==CH_SPACE&&_!==CH_TAB&&_!==CH_FF||(k=skipWhitespace(C,k,O))<O&&(_=C.charCodeAt(k)),k<O&&(_===CH_EQUALS||_===CH_COLON)&&(k++,k=skipWhitespace(C,k,O))),a[unescapeContent(C,i,E,A,c)]=unescapeContent(C,k,O,A,c)}}else for(;t<r;){if((_=C.charCodeAt(t))===CH_LF){t++,H++;break}if(_===CH_CR){++t<r&&C.charCodeAt(t)===CH_LF&&t++,H++;break}t++}else++t<r&&C.charCodeAt(t)===CH_LF&&t++,H++;else t++,H++}return a};
@@ -1,22 +0,0 @@
1
- import type { KeyValuePairObject } from './index.js';
2
- /**
3
- * Parse a `.properties` file content string into a key-value pair object.
4
- *
5
- * This is a functional, single-pass parser that implements the Java
6
- * `java.util.Properties` specification:
7
- *
8
- * - BOM detection and skipping
9
- * - Comment lines (`#` or `!`)
10
- * - Line continuations (trailing odd backslash)
11
- * - Key-value separator detection (`=`, `:`, or whitespace)
12
- * - Escape sequence processing (`\\n`, `\\t`, `\\r`, `\\f`, `\\\\`, `\\uXXXX`)
13
- * - Last-value-wins semantics for duplicate keys
14
- *
15
- * All character inspection uses `charCodeAt()` (ES5). No regex, no
16
- * intermediate object allocations.
17
- *
18
- * @param content - The content of a `.properties` file (string or Buffer).
19
- *
20
- * @returns A key-value pair object where every value is a string.
21
- */
22
- export declare const parseProperties: (content: string | Buffer) => KeyValuePairObject;
@@ -1 +0,0 @@
1
- var CH_TAB=9,CH_LF=10,CH_FF=12,CH_CR=13,CH_SPACE=32,CH_BANG=33,CH_HASH=35,CH_COLON=58,CH_EQUALS=61,CH_BACKSLASH=92,CH_LOWER_F=102,CH_LOWER_N=110,CH_LOWER_R=114,CH_LOWER_T=116,CH_LOWER_U=117,CH_BOM=65279,skipWhitespace=function(e,C,r){for(;C<r;){var a=e.charCodeAt(C);if(a!==CH_SPACE&&a!==CH_TAB&&a!==CH_FF)break;C++}return C},isHexDigit=function(e){return e>=48&&e<=57||e>=65&&e<=70||e>=97&&e<=102},hexValue=function(e){return e>=48&&e<=57?e-48:e>=65&&e<=70?e-55:e-87},unescapeContent=function(e,C,r,a,t){if(!a)return e.slice(C,r);for(var H="",_=C,c=C;c<r;)if(e.charCodeAt(c)===CH_BACKSLASH){switch(c>_&&(H+=e.slice(_,c)),c++,e.charCodeAt(c)){case CH_LOWER_N:H+="\n",c++;break;case CH_LOWER_T:H+="\t",c++;break;case CH_LOWER_R:H+="\r",c++;break;case CH_LOWER_F:H+="\f",c++;break;case CH_LOWER_U:if(c+4>=r||!isHexDigit(e.charCodeAt(c+1))||!isHexDigit(e.charCodeAt(c+2))||!isHexDigit(e.charCodeAt(c+3))||!isHexDigit(e.charCodeAt(c+4))){var i=e.slice(c-1,c+5);throw new Error("malformed escaped unicode characters '".concat(i,"' in property starting at line ").concat(t))}var A=hexValue(e.charCodeAt(c+1))<<12|hexValue(e.charCodeAt(c+2))<<8|hexValue(e.charCodeAt(c+3))<<4|hexValue(e.charCodeAt(c+4));H+=String.fromCharCode(A),c+=5;break;default:H+=e.charAt(c),c++}_=c}else c++;return _<r&&(H+=e.slice(_,r)),H};export var parseProperties=function(e){var C="string"==typeof e?e:e.toString(),r=C.length,a={},t=0,H=1;for(r>0&&C.charCodeAt(0)===CH_BOM&&(t=1);t<r&&!((t=skipWhitespace(C,t,r))>=r);){var _=C.charCodeAt(t);if(_!==CH_LF)if(_!==CH_CR)if(_!==CH_HASH&&_!==CH_BANG){for(var c=H,i=t,A=0,o=!1;t<r&&(_=C.charCodeAt(t))!==CH_LF&&_!==CH_CR;)_===CH_BACKSLASH?(A++,o=!0):A=0,t++;if(A%2==1){var s=[C.slice(i,t-1)],h=o;for(t<r&&(C.charCodeAt(t)===CH_CR?++t<r&&C.charCodeAt(t)===CH_LF&&t++:t++,H++),t=skipWhitespace(C,t,r);;){var n=t;A=0;for(var L=!1;t<r&&(_=C.charCodeAt(t))!==CH_LF&&_!==CH_CR;)_===CH_BACKSLASH?(A++,L=!0):A=0,t++;var d=A%2==1,f=d?t-1:t;if(s.push(C.slice(n,f)),L&&(h=!0),t<r&&(C.charCodeAt(t)===CH_CR?++t<r&&C.charCodeAt(t)===CH_LF&&t++:t++,H++),!d)break;t=skipWhitespace(C,t,r)}for(var p=s.join(""),S=p.length,u=0,F=!1;u<S;)if((_=p.charCodeAt(u))!==CH_BACKSLASH){if(!F&&(_===CH_EQUALS||_===CH_COLON||_===CH_SPACE||_===CH_TAB||_===CH_FF))break;F=!1,u++}else F=!F,u++;var l=u;l<S&&((_=p.charCodeAt(l))!==CH_SPACE&&_!==CH_TAB&&_!==CH_FF||(l=skipWhitespace(p,l,S))<S&&(_=p.charCodeAt(l)),l<S&&(_===CH_EQUALS||_===CH_COLON)&&(l++,l=skipWhitespace(p,l,S))),a[unescapeContent(p,0,u,h,c)]=unescapeContent(p,l,S,h,c)}else{var E=t;t<r&&(C.charCodeAt(t)===CH_CR?++t<r&&C.charCodeAt(t)===CH_LF&&t++:t++,H++);for(var O=i,R=!1;O<E;)if((_=C.charCodeAt(O))!==CH_BACKSLASH){if(!R&&(_===CH_EQUALS||_===CH_COLON||_===CH_SPACE||_===CH_TAB||_===CH_FF))break;R=!1,O++}else R=!R,O++;var k=O;k<E&&((_=C.charCodeAt(k))!==CH_SPACE&&_!==CH_TAB&&_!==CH_FF||(k=skipWhitespace(C,k,E))<E&&(_=C.charCodeAt(k)),k<E&&(_===CH_EQUALS||_===CH_COLON)&&(k++,k=skipWhitespace(C,k,E))),a[unescapeContent(C,i,O,o,c)]=unescapeContent(C,k,E,o,c)}}else for(;t<r;){if((_=C.charCodeAt(t))===CH_LF){t++,H++;break}if(_===CH_CR){++t<r&&C.charCodeAt(t)===CH_LF&&t++,H++;break}t++}else++t<r&&C.charCodeAt(t)===CH_LF&&t++,H++;else t++,H++}return a};