{"_id":"structured-headers","_rev":"4521989","name":"structured-headers","description":"Implementation of Structured Field Values for HTTP (RFC9651, RFC8941)","dist-tags":{"alpha":"2.0.0-alpha.1","latest":"2.0.2"},"maintainers":[{"name":"evrt","email":""}],"time":{"modified":"2026-04-09T13:09:02.000Z","created":"2018-12-06T05:01:57.295Z","2.0.2":"2025-07-30T15:40:24.342Z","2.0.1":"2025-06-03T15:55:11.022Z","2.0.0":"2024-10-03T02:37:48.866Z","2.0.0-alpha.1":"2024-02-23T23:07:49.266Z","2.0.0-alpha.0":"2024-01-29T16:38:53.986Z","1.0.1":"2023-08-03T01:50:26.276Z","1.0.0":"2023-06-13T03:49:02.502Z","0.5.0":"2022-09-13T19:31:01.309Z","0.4.1":"2021-06-10T07:38:56.070Z","0.4.0":"2021-05-16T03:45:22.680Z","0.3.0":"2019-10-04T01:19:39.474Z","0.2.0":"2019-04-27T05:01:02.655Z","0.1.0":"2018-12-06T05:01:57.295Z"},"users":{},"author":{"name":"Evert Pot","email":"me@evertpot.com"},"repository":{"type":"git","url":"git+ssh://git@github.com/evert/structured-header.git"},"versions":{"2.0.2":{"name":"structured-headers","version":"2.0.2","description":"Implementation of Structured Field Values for HTTP (RFC9651, RFC8941)","type":"module","exports":{"import":"./dist/index.js","require":"./cjs/index.cjs"},"source":"src/index.ts","scripts":{"test":"make test","prepare":"make build","build":"make build"},"repository":{"type":"git","url":"git+ssh://git@github.com/evert/structured-header.git"},"keywords":["http","structured-header","structured-fields","structured fields","RFC9651","RFC8941","headers"],"author":{"name":"Evert Pot","email":"me@evertpot.com"},"license":"MIT","bugs":{"url":"https://github.com/evert/structured-header/issues"},"homepage":"https://github.com/evert/structured-header#readme","devDependencies":{"@types/node":"^18.19.10","@typescript-eslint/eslint-plugin":"^8.8.0","@typescript-eslint/parser":"^8.8.0","base32-decode":"^1.0.0","base32-encode":"^2.0.0","eslint":"^9.11.1","eslint-plugin-import":"^2.32.0","tsup":"^8.3.0","typescript":"^5.1.3"},"engines":{"npm":">=6","node":">=18"},"_id":"structured-headers@2.0.2","gitHead":"a3bffd51d6fdc9e866cebb4377d3ec98f73010de","_nodeVersion":"18.20.8","_npmVersion":"10.8.2","dist":{"shasum":"14a97c7dd8cb198010346606548b007ad31fa953","size":29459,"noattachment":false,"key":"/structured-headers/-/structured-headers-2.0.2.tgz","tarball":"http://registry.cnpm.dingdandao.com/structured-headers/download/structured-headers-2.0.2.tgz"},"_npmUser":{"name":"evrt","email":"me@evertpot.com"},"directories":{},"maintainers":[{"name":"evrt","email":""}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/structured-headers_2.0.2_1753890024111_0.4070346550043036"},"_hasShrinkwrap":false,"_cnpmcore_publish_time":"2025-07-30T15:40:24.342Z","publish_time":1753890024342,"_source_registry_name":"default","_cnpm_publish_time":1753890024342},"2.0.1":{"name":"structured-headers","version":"2.0.1","description":"Implementation of Structured Field Values for HTTP (RFC9651, RFC8941)","type":"module","exports":{"import":"./dist/index.js","require":"./cjs/index.cjs"},"source":"src/index.ts","scripts":{"test":"make test","prepare":"make build","build":"make build"},"repository":{"type":"git","url":"git+ssh://git@github.com/evert/structured-header.git"},"keywords":["http","structured-header","structured-fields","structured fields","RFC9651","RFC8941","headers"],"author":{"name":"Evert Pot","email":"me@evertpot.com"},"license":"MIT","bugs":{"url":"https://github.com/evert/structured-header/issues"},"homepage":"https://github.com/evert/structured-header#readme","devDependencies":{"@types/node":"^18.19.10","@typescript-eslint/eslint-plugin":"^8.8.0","@typescript-eslint/parser":"^8.8.0","base32-decode":"^1.0.0","base32-encode":"^2.0.0","eslint":"^9.11.1","tsup":"^8.3.0","typescript":"^5.1.3"},"engines":{"npm":">=6","node":">=18"},"_id":"structured-headers@2.0.1","gitHead":"19d2acfcfd1a312b4f06988826d5fd6e576db428","_nodeVersion":"18.20.8","_npmVersion":"10.8.2","dist":{"shasum":"fc06476faaf76d744fbae198381e87179e47f2a8","size":29456,"noattachment":false,"key":"/structured-headers/-/structured-headers-2.0.1.tgz","tarball":"http://registry.cnpm.dingdandao.com/structured-headers/download/structured-headers-2.0.1.tgz"},"_npmUser":{"name":"evrt","email":"me@evertpot.com"},"directories":{},"maintainers":[{"name":"evrt","email":""}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/structured-headers_2.0.1_1748966110855_0.44891090705429604"},"_hasShrinkwrap":false,"_cnpmcore_publish_time":"2025-06-03T15:55:11.022Z","publish_time":1748966111022,"_source_registry_name":"default","_cnpm_publish_time":1748966111022},"2.0.0":{"name":"structured-headers","version":"2.0.0","description":"Implementation of Structured Field Values for HTTP (RFC9651, RFC8941)","type":"module","exports":{"import":"./dist/index.js","require":"./cjs/index.cjs"},"source":"src/index.ts","scripts":{"test":"make test","prepare":"make build","build":"make build"},"repository":{"type":"git","url":"git+ssh://git@github.com/evert/structured-header.git"},"keywords":["http","structured-header","structured-fields","structured fields","RFC9651","RFC8941","headers"],"author":{"name":"Evert Pot","email":"me@evertpot.com"},"license":"MIT","bugs":{"url":"https://github.com/evert/structured-header/issues"},"homepage":"https://github.com/evert/structured-header#readme","devDependencies":{"@types/node":"^18.19.10","@typescript-eslint/eslint-plugin":"^8.8.0","@typescript-eslint/parser":"^8.8.0","base32-decode":"^1.0.0","base32-encode":"^2.0.0","eslint":"^9.11.1","tsup":"^8.3.0","typescript":"^5.1.3"},"engines":{"npm":">=6","node":">=18"},"_id":"structured-headers@2.0.0","gitHead":"14f6744afdad67bca234e6c6a91712fdaf804b41","_nodeVersion":"18.20.4","_npmVersion":"10.7.0","dist":{"shasum":"b8759de60a94cc9eb48716d1fde1b365fbfb0b75","size":29304,"noattachment":false,"key":"/structured-headers/-/structured-headers-2.0.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/structured-headers/download/structured-headers-2.0.0.tgz"},"_npmUser":{"name":"evrt","email":"me@evertpot.com"},"directories":{},"maintainers":[{"name":"evrt","email":""}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/structured-headers_2.0.0_1727923068641_0.9696710464554927"},"_hasShrinkwrap":false,"_cnpmcore_publish_time":"2024-10-03T02:37:48.866Z","publish_time":1727923068866,"_source_registry_name":"default","_cnpm_publish_time":1727923068866},"2.0.0-alpha.1":{"name":"structured-headers","version":"2.0.0-alpha.1","description":"Implementation of RFC8941, structured headers for HTTP.","type":"module","exports":"./dist/index.js","source":"src/index.ts","types":"dist/index.d.ts","scripts":{"test":"make test","prepare":"make build","build":"make build"},"repository":{"type":"git","url":"git+ssh://git@github.com/evert/structured-header.git"},"keywords":["http","structured-header","structured-fields","structured fields","RFC8941","headers"],"author":{"name":"Evert Pot","email":"me@evertpot.com"},"license":"MIT","bugs":{"url":"https://github.com/evert/structured-header/issues"},"homepage":"https://github.com/evert/structured-header#readme","devDependencies":{"@types/chai":"^4.3.3","@types/node":"^18.19.10","@typescript-eslint/eslint-plugin":"^6.19.1","@typescript-eslint/parser":"^6.19.1","base32-decode":"^1.0.0","base32-encode":"^2.0.0","chai":"^5.0.3","eslint":"^8.23.0","typescript":"^5.1.3"},"engines":{"npm":">=6","node":">=18"},"_id":"structured-headers@2.0.0-alpha.1","readmeFilename":"readme.md","gitHead":"6d4f30b325f5548e1fc4502702a150d48134fd29","_nodeVersion":"20.10.0","_npmVersion":"10.2.3","dist":{"shasum":"9e0e470d3931dbebf84c5ada6402a780c4c532d2","size":30150,"noattachment":false,"key":"/structured-headers/-/structured-headers-2.0.0-alpha.1.tgz","tarball":"http://registry.cnpm.dingdandao.com/structured-headers/download/structured-headers-2.0.0-alpha.1.tgz"},"_npmUser":{"name":"evrt","email":"me@evertpot.com"},"directories":{},"maintainers":[{"name":"evrt","email":""}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/structured-headers_2.0.0-alpha.1_1708729669073_0.743281055442861"},"_hasShrinkwrap":false,"_cnpmcore_publish_time":"2024-02-23T23:07:49.266Z","publish_time":1708729669266,"_source_registry_name":"default","_cnpm_publish_time":1708729669266},"2.0.0-alpha.0":{"name":"structured-headers","version":"2.0.0-alpha.0","description":"Implementation of RFC8941, structured headers for HTTP.","type":"module","exports":"dist/index.js","source":"src/index.ts","types":"dist/index.d.ts","scripts":{"test":"make test","prepare":"make build","build":"make build"},"repository":{"type":"git","url":"git+ssh://git@github.com/evert/structured-header.git"},"keywords":["http","structured-header","structured-fields","structured fields","RFC8941","headers"],"author":{"name":"Evert Pot","email":"me@evertpot.com"},"license":"MIT","bugs":{"url":"https://github.com/evert/structured-header/issues"},"homepage":"https://github.com/evert/structured-header#readme","devDependencies":{"@types/chai":"^4.3.3","@types/node":"^18.19.10","@typescript-eslint/eslint-plugin":"^6.19.1","@typescript-eslint/parser":"^6.19.1","base32-decode":"^1.0.0","base32-encode":"^2.0.0","chai":"^5.0.3","eslint":"^8.23.0","typescript":"^5.1.3"},"engines":{"npm":">=6","node":">=18"},"_id":"structured-headers@2.0.0-alpha.0","readmeFilename":"readme.md","gitHead":"40a9a8d0df1ec17c33a4238f4d2123806b806918","_nodeVersion":"20.10.0","_npmVersion":"10.2.3","dist":{"shasum":"b7c5e4fec102cf77c50154f85ff2b497f3a5dec9","size":30148,"noattachment":false,"key":"/structured-headers/-/structured-headers-2.0.0-alpha.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/structured-headers/download/structured-headers-2.0.0-alpha.0.tgz"},"_npmUser":{"name":"evrt","email":"me@evertpot.com"},"directories":{},"maintainers":[{"name":"evrt","email":""}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/structured-headers_2.0.0-alpha.0_1706546333816_0.005102805945347955"},"_hasShrinkwrap":false,"_cnpmcore_publish_time":"2024-01-29T16:38:53.986Z","publish_time":1706546333986,"_source_registry_name":"default","_cnpm_publish_time":1706546333986},"1.0.1":{"name":"structured-headers","version":"1.0.1","description":"Implementation of RFC8941, structured headers for HTTP.","main":"dist/index.js","scripts":{"test":"make test","prepare":"make build","build":"make build"},"repository":{"type":"git","url":"git+ssh://git@github.com/evert/structured-header.git"},"keywords":["http","structured-header","structured-fields","structured fields","RFC8941","headers"],"author":{"name":"Evert Pot","email":"me@evertpot.com"},"license":"MIT","bugs":{"url":"https://github.com/evert/structured-header/issues"},"homepage":"https://github.com/evert/structured-header#readme","devDependencies":{"@types/chai":"^4.3.3","@types/mocha":"^10.0.1","@types/node":"^12.20.13","@typescript-eslint/eslint-plugin":"^5.62.0","@typescript-eslint/parser":"^5.62.0","base32-decode":"^1.0.0","base32-encode":"^1.1.1","chai":"^4.2.0","eslint":"^8.23.0","mocha":"^10.0.0","nyc":"^15.1.0","ts-node":"^10.0.0","typescript":"^5.1.3","webpack":"^5.86.0","webpack-cli":"^5.1.4"},"nyc":{"extension":[".ts"]},"mocha":{"require":["ts-node/register"],"recursive":true,"extension":["ts","js","tsx"],"exit":true},"browserslist":["last 2 versions","not ie 11","not op_mini all"],"engines":{"npm":">=6","node":">= 14"},"gitHead":"6560ceaaa7945df332db503cc9dd9bf879126c06","_id":"structured-headers@1.0.1","_nodeVersion":"14.21.3","_npmVersion":"6.14.18","dist":{"shasum":"1821e434e0fe45bdd78f07c779b16519ab520415","size":27124,"noattachment":false,"key":"/structured-headers/-/structured-headers-1.0.1.tgz","tarball":"http://registry.cnpm.dingdandao.com/structured-headers/download/structured-headers-1.0.1.tgz"},"_npmUser":{"name":"evrt","email":"me@evertpot.com"},"directories":{},"maintainers":[{"name":"evrt","email":""}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/structured-headers_1.0.1_1691027426077_0.29043738244457273"},"_hasShrinkwrap":false,"_cnpmcore_publish_time":"2023-08-03T01:50:26.276Z","publish_time":1691027426276,"_source_registry_name":"default","_cnpm_publish_time":1691027426276},"1.0.0":{"name":"structured-headers","version":"1.0.0","description":"Implementation of RFC8941, structured headers for HTTP.","main":"dist/index.js","scripts":{"test":"make test","prepare":"make build","build":"make build"},"repository":{"type":"git","url":"git+ssh://git@github.com/evert/structured-header.git"},"keywords":["http","structured-header","structured-fields","structured fields","RFC8941","headers"],"author":{"name":"Evert Pot","email":"me@evertpot.com"},"license":"MIT","bugs":{"url":"https://github.com/evert/structured-header/issues"},"homepage":"https://github.com/evert/structured-header#readme","devDependencies":{"@types/chai":"^4.3.3","@types/mocha":"^10.0.1","@types/node":"^12.20.13","@typescript-eslint/eslint-plugin":"^5.36.2","@typescript-eslint/parser":"^5.36.2","base32-decode":"^1.0.0","base32-encode":"^1.1.1","chai":"^4.2.0","eslint":"^8.23.0","mocha":"^10.0.0","nyc":"^15.1.0","ts-node":"^10.0.0","typescript":"^5.1.3","webpack":"^5.86.0","webpack-cli":"^5.1.4"},"nyc":{"extension":[".ts"]},"mocha":{"require":["ts-node/register"],"recursive":true,"extension":["ts","js","tsx"],"exit":true},"browserslist":["last 2 versions","not ie 11","not op_mini all"],"engines":{"npm":">=6","node":">= 14"},"gitHead":"18f8f4fe4651ca3ac6ea313b1d8626282b1045c4","_id":"structured-headers@1.0.0","_nodeVersion":"14.21.3","_npmVersion":"6.14.18","dist":{"shasum":"2fb0c642c114efd5e9e75c3d90de6a2c7ebd333b","size":26635,"noattachment":false,"key":"/structured-headers/-/structured-headers-1.0.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/structured-headers/download/structured-headers-1.0.0.tgz"},"_npmUser":{"name":"evrt","email":"me@evertpot.com"},"directories":{},"maintainers":[{"name":"evrt","email":""}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/structured-headers_1.0.0_1686628142325_0.7235064612074615"},"_hasShrinkwrap":false,"_cnpmcore_publish_time":"2023-06-13T03:49:02.502Z","publish_time":1686628142502,"_source_registry_name":"default","_cnpm_publish_time":1686628142502},"0.5.0":{"name":"structured-headers","version":"0.5.0","description":"Implementation of RFC8941, structured headers for HTTP.","main":"dist/index.js","scripts":{"test":"make test","prepare":"make build","build":"make build"},"repository":{"type":"git","url":"git+ssh://git@github.com/evert/structured-header.git"},"keywords":["http","structured-header","RFC8941","headers"],"author":{"name":"Evert Pot","email":"me@evertpot.com"},"license":"MIT","bugs":{"url":"https://github.com/evert/structured-header/issues"},"homepage":"https://github.com/evert/structured-header#readme","devDependencies":{"@types/chai":"^4.3.3","@types/mocha":"^9.1.1","@types/node":"^12.20.13","@typescript-eslint/eslint-plugin":"^5.36.2","@typescript-eslint/parser":"^5.36.2","base32-decode":"^1.0.0","base32-encode":"^1.1.1","chai":"^4.2.0","eslint":"^8.23.0","mocha":"^10.0.0","nyc":"^15.1.0","ts-node":"^10.0.0","typescript":"^4.2.4","webpack":"^5.37.0","webpack-cli":"^4.7.0"},"nyc":{"extension":[".ts"]},"mocha":{"require":["ts-node/register"],"recursive":true,"extension":["ts","js","tsx"],"exit":true},"browserslist":["last 2 versions","not ie 11","not op_mini all"],"types":"./dist/index.d.ts","gitHead":"09da58dc435c943295be271e4ac829ad411906b6","_id":"structured-headers@0.5.0","_nodeVersion":"18.8.0","_npmVersion":"8.18.0","dist":{"shasum":"409e1e7a0119819edc82d45547211bd633a2ebf8","size":25394,"noattachment":false,"key":"/structured-headers/-/structured-headers-0.5.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/structured-headers/download/structured-headers-0.5.0.tgz"},"_npmUser":{"name":"evrt","email":"me@evertpot.com"},"directories":{},"maintainers":[{"name":"evrt","email":""}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/structured-headers_0.5.0_1663097461029_0.4564105275353576"},"_hasShrinkwrap":false,"_cnpmcore_publish_time":"2022-09-13T19:34:06.635Z","publish_time":1663097461309,"_cnpm_publish_time":1663097461309},"0.4.1":{"name":"structured-headers","version":"0.4.1","description":"Implementation of RFC8941, structured headers for HTTP.","main":"dist/index.js","scripts":{"test":"make test","prepare":"make build","build":"make build"},"repository":{"type":"git","url":"git+ssh://git@github.com/evert/structured-header.git"},"keywords":["http","structured-header","RFC8941","headers"],"author":{"name":"Evert Pot","email":"me@evertpot.com"},"license":"MIT","bugs":{"url":"https://github.com/evert/structured-header/issues"},"homepage":"https://github.com/evert/structured-header#readme","devDependencies":{"@types/node":"^12.20.13","@typescript-eslint/eslint-plugin":"^4.23.0","@typescript-eslint/parser":"^4.23.0","base32-decode":"^1.0.0","base32-encode":"^1.1.1","chai":"^4.2.0","eslint":"^7.26.0","mocha":"^9.0.0","nyc":"^15.1.0","ts-node":"^10.0.0","typescript":"^4.2.4","webpack":"^5.37.0","webpack-cli":"^4.7.0"},"nyc":{"extension":[".ts"]},"mocha":{"require":["ts-node/register"],"recursive":true,"extension":["ts","js","tsx"],"exit":true},"browserslist":["last 2 versions","not ie 11","not op_mini all"],"gitHead":"f83b278e51d6b6cf565908342e0ca3f57f5b7bd1","_id":"structured-headers@0.4.1","_nodeVersion":"14.16.1","_npmVersion":"7.13.0","dist":{"shasum":"77abd9410622c6926261c09b9d16cf10592694d1","size":22322,"noattachment":false,"key":"/structured-headers/-/structured-headers-0.4.1.tgz","tarball":"http://registry.cnpm.dingdandao.com/structured-headers/download/structured-headers-0.4.1.tgz"},"_npmUser":{"name":"evrt","email":"me@evertpot.com"},"directories":{},"maintainers":[{"name":"evrt","email":""}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/structured-headers_0.4.1_1623310735864_0.05989599041845528"},"_hasShrinkwrap":false,"_cnpmcore_publish_time":"2021-12-24T07:47:38.626Z","publish_time":1623310736070,"_cnpm_publish_time":1623310736070},"0.4.0":{"name":"structured-headers","version":"0.4.0","description":"Implementation of draft-ietf-httpbis-header-structure, structured headers for HTTP.","main":"index.js","scripts":{"test":"make test","prepare":"make build","build":"make build"},"repository":{"type":"git","url":"git+ssh://git@github.com/evert/structured-header.git"},"keywords":["http","structured-header","RFC8941","headers"],"author":{"name":"Evert Pot","email":"me@evertpot.com"},"license":"MIT","bugs":{"url":"https://github.com/evert/structured-header/issues"},"homepage":"https://github.com/evert/structured-header#readme","devDependencies":{"@types/node":"^12.20.13","@typescript-eslint/eslint-plugin":"^4.23.0","@typescript-eslint/parser":"^4.23.0","base32-decode":"^1.0.0","base32-encode":"^1.1.1","chai":"^4.2.0","eslint":"^7.26.0","mocha":"^8.4.0","nyc":"^15.1.0","ts-node":"^9.1.1","typescript":"^4.2.4","webpack":"^5.37.0","webpack-cli":"^4.7.0"},"nyc":{"extension":[".ts"]},"mocha":{"require":["ts-node/register"],"recursive":true,"extension":["ts","js","tsx"],"exit":true},"browserslist":["last 2 versions","not ie 11","not op_mini all"],"gitHead":"7f0d3f5513658ad74496608b9d891b25b2eb09bc","_id":"structured-headers@0.4.0","_nodeVersion":"14.16.1","_npmVersion":"7.8.0","dist":{"shasum":"4c1fd8d84516e933e8d883a2b28e32121cc42a49","size":24144,"noattachment":false,"key":"/structured-headers/-/structured-headers-0.4.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/structured-headers/download/structured-headers-0.4.0.tgz"},"_npmUser":{"name":"evrt","email":"me@evertpot.com"},"directories":{},"maintainers":[{"name":"evrt","email":""}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/structured-headers_0.4.0_1621136722487_0.7767443304649229"},"_hasShrinkwrap":false,"_cnpmcore_publish_time":"2021-12-24T07:47:37.541Z","publish_time":1621136722680,"_cnpm_publish_time":1621136722680},"0.3.0":{"name":"structured-headers","version":"0.3.0","description":"Implementation of draft-ietf-httpbis-header-structure, structured headers for HTTP.","main":"index.js","scripts":{"test":"eslint lib/ && nyc mocha","prepare":"make build","build":"make build"},"repository":{"type":"git","url":"git+ssh://git@github.com/evert/structured-header.git"},"keywords":["http","structured-header"],"author":{"name":"Evert Pot","email":"me@evertpot.com"},"license":"MIT","bugs":{"url":"https://github.com/evert/structured-header/issues"},"homepage":"https://github.com/evert/structured-header#readme","devDependencies":{"@types/node":"^12.7.11","base32-encode":"^1.1.1","chai":"^4.2.0","mocha":"^6.2.1","nyc":"^14.1.1","ts-node":"^8.4.1","tslint":"^5.20.0","typescript":"^3.6.3","webpack":"^4.41.0","webpack-cli":"^3.3.9"},"nyc":{"extension":[".ts"]},"gitHead":"27a9a48efeedc886a478f8904b078851b9822991","_id":"structured-headers@0.3.0","_nodeVersion":"10.15.3","_npmVersion":"6.10.2","dist":{"shasum":"89653c5b819dba63010eaae3e6de0d608ee795e9","size":8994,"noattachment":false,"key":"/structured-headers/-/structured-headers-0.3.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/structured-headers/download/structured-headers-0.3.0.tgz"},"maintainers":[{"name":"evrt","email":""}],"_npmUser":{"name":"evrt","email":"me@evertpot.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/structured-headers_0.3.0_1570151979344_0.7420117713020138"},"_hasShrinkwrap":false,"_cnpmcore_publish_time":"2021-12-24T07:47:36.490Z","publish_time":1570151979474,"_cnpm_publish_time":1570151979474},"0.2.0":{"name":"structured-headers","version":"0.2.0","description":"Implementation of draft-ietf-httpbis-header-structure, structured headers for HTTP.","main":"index.js","scripts":{"test":"eslint lib/ && nyc mocha","prepare":"make build","build":"make build"},"repository":{"type":"git","url":"git+ssh://git@github.com/evert/structured-header.git"},"keywords":["http","structured-header"],"author":{"name":"Evert Pot","email":"me@evertpot.com"},"license":"MIT","bugs":{"url":"https://github.com/evert/structured-header/issues"},"homepage":"https://github.com/evert/structured-header#readme","devDependencies":{"@types/node":"^11.13.7","base32-encode":"^1.1.1","chai":"^4.2.0","mocha":"^6.1.4","nyc":"^14.0.0","ts-node":"^8.1.0","tslint":"^5.16.0","typescript":"^3.4.5","webpack":"^4.30.0","webpack-cli":"^3.3.1"},"nyc":{"extension":[".ts"]},"gitHead":"573169c714bc513af062eb46b8e096d79fb24fd4","_id":"structured-headers@0.2.0","_nodeVersion":"10.15.3","_npmVersion":"6.9.0","dist":{"shasum":"4e753defe5c5f8fb68ccad5d3998c736b532f26b","size":8924,"noattachment":false,"key":"/structured-headers/-/structured-headers-0.2.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/structured-headers/download/structured-headers-0.2.0.tgz"},"maintainers":[{"name":"evrt","email":""}],"_npmUser":{"name":"evrt","email":"me@evertpot.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/structured-headers_0.2.0_1556341262503_0.10300403509223299"},"_hasShrinkwrap":false,"_cnpmcore_publish_time":"2021-12-24T07:47:35.582Z","publish_time":1556341262655,"_cnpm_publish_time":1556341262655},"0.1.0":{"name":"structured-headers","version":"0.1.0","description":"Implementation of draft-ietf-httpbis-header-structure, structured headers for HTTP.","main":"index.js","scripts":{"test":"eslint lib/ && nyc mocha","prepare":"make build","build":"make build"},"repository":{"type":"git","url":"git+ssh://git@github.com/evert/structured-header.git"},"keywords":["http","structured-header"],"author":{"name":"Evert Pot","email":"me@evertpot.com"},"license":"MIT","bugs":{"url":"https://github.com/evert/structured-header/issues"},"homepage":"https://github.com/evert/structured-header#readme","devDependencies":{"@types/node":"^10.12.12","base32-encode":"^1.1.0","chai":"^4.2.0","mocha":"^5.2.0","nyc":"^13.1.0","tslint":"^5.11.0","typescript":"^3.2.1","webpack":"^4.27.1","webpack-cli":"^3.1.2"},"gitHead":"2b67d1e116e4906fd5b4677d6f104b07e78de67a","_id":"structured-headers@0.1.0","_npmVersion":"6.4.1","_nodeVersion":"10.12.0","_npmUser":{"name":"evrt","email":"me@evertpot.com"},"dist":{"shasum":"b23d9bac22552a0c19d36bcdd183d217ea925f66","size":7164,"noattachment":false,"key":"/structured-headers/-/structured-headers-0.1.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/structured-headers/download/structured-headers-0.1.0.tgz"},"maintainers":[{"name":"evrt","email":""}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/structured-headers_0.1.0_1544072517063_0.27793104798625246"},"_hasShrinkwrap":false,"_cnpmcore_publish_time":"2021-12-24T07:47:34.684Z","publish_time":1544072517295,"_cnpm_publish_time":1544072517295}},"readme":"Structured Headers parser for Javascript\n========================================\n\nThis library implements a parser and serializer for the [Structured Field Values for HTTP][2]\nspecification. ([RFC9651][3], [RFC8941][1]).\n\nThis specification defines a standard serialization for complex HTTP header\nvalues, including lists (arrays), dictionaries (maps) and also numbers,\nbooleans, binary data, timestamps and Unicode strings.\n\nThe library is written in Typescript, and the examples in this document are\ntoo, but plain Javascript is also fully supported. It ships with ESM and\nCommonJS builds and has 0 dependencies.\n\nCompatibility\n-------------\n\nThis package has 2805 unittests, the vast majority are supplied from the\nofficial [HTTP WG test suite][2].\n\nHowever, there are 2 differences in the serializer:\n\n1. Javascript can't differentiate between `1.0` and `1`. As a result we're\n   skipping the tests that require a serialiation output of `1.0`.\n2. Javascript rounds slightly different from the spec. The tests suggest that\n   `0.0025` should round to the nearest event number (`0.002`), but Javascript\n   rounds to `0.003`.\n\nNo fix is planned for #1, because there's no reasonably way to fix this\nwithout wrapping every number in a custom class, and this will negatively\nimpact the developer experience. We do intend to fix #2 in the future with a\ncustom rounding algorithm.\n\nThis library emits and expects the _exact_ data structures as they are\nsuggested by the RFC. The result of this is that the returned types can be\na bit complex.\n\nIn the future we intend to loosen the required types for the serializer, and\nadd new helper functions that give you simpler structures _if_ you don't need\ncertain features for a header (such as `Parameters`).\n\nLet us know what you would like to see here!\n\nInstallation\n------------\n\nUsing npm:\n\n```\nnpm install structured-headers\n```\n\nAPI\n---\n\n### Parsing an item\n\nThe following are examples of `item` headers:\n\nParsed as string\n\n```\n# Parsed an ASCII string\nHeader: \"foo\"\n\n# A simple string, called a 'Token' in the spec\nHeader: foo\n\n# A Unicode string, called a 'Display String' in the spec. They use\n# percent encoding, but encode a different set of characters than\n# URLs.\nHeader %\"Frysl%C3%A2n\"\n\n# Parsed as number\nHeader: 5\nHeader: -10\nHeader: 5.01415\n\n# Parsed into boolean\nHeader: ?1\nHeader: ?0\n\n# Binaries are base64 encoded\nHeader: :RE0gbWUgZm9yIGEgZnJlZSBjb29raWU=:\n\n# Items can have parameters\nHeader: \"Hello world\"; a=\"5\"\n\n# Parsed into a Date object\nHeader: @1686634251\n```\n\nTo parse these header values, use the `parseItem`:\n\n```typescript\nimport { parseItem } from 'structured-headers';\n\nconsole.log(\n  parseItem(header)\n);\n```\n\nparseItem returns a tuple (array with 2 items), the first item is the value,\nthe second is a `Map` object with parameters.\n\nThe type is roughly:\n\n```typescript\n// The raw value\ntype BareItem = number | string | Token | ArrayBuffer | boolean | Date | DisplayString;\n\n// The return type of parseItem\ntype Item = [\n  BareItem,\n  Map<string, BareItem>\n];\n```\n\n### Parsing a list\n\nA list is an array of items. Some examples:\n\n```\n# A simple list\nHeader: 5, \"foo\", bar, ?1\n\n# Each element can have parameters\nHeader: sometoken; param1; param2=hi, 42\n\n# A list can also contain lists itself. These are called 'inner lists' and\n# use parenthesis\nHeader: sometoken, (innerlistitem1 innerlistitem2), (anotherlist)\n```\n\n\nTo parse these:\n\n```typescript\nimport { parseList } from 'structured-headers';\n\nconsole.log(\n  parseList(header)\n);\n```\n\n`parseList` returns an array with each member. The return type is:\n\n```typescript\ntype InnerList = [Item[], Parameters];\ntype List = (InnerList|Item)[];\n```\n\n### Parsing a dictionary\n\nA dictionary is a key->value object. Examples:\n\n```\n# A simple dictionary\nHeader: fn=\"evert\", ln=\"pot\", coffee=?1\n\n# Each item may have parameters too\nHeader: foo=123; q=1, bar=123, q=0.5\n\n# A dictionary value may be an inner list again\nHeader: foo=(1 2 3)\n```\n\nTo parse dictionaries:\n\n```typescript\nimport { parseDictionary } from 'structured-headers';\n\nconsole.log(\n  parseDictionary(header)\n);\n```\n\nThe return type for `parseDictionary` is a `Map`.\n\n```typescript\ntype Dictionary = Map<string, Item|InnerList>;\n```\n\n\n### Serializing\n\nThe serialiser functions work the exact same way, but in opposite direction.\nThey all return strings.\n\nCurrently the serializes expect the *exact type* that the parsers return, but\nthe intention is to loosen the types for serialization, so it's a bit more\nergnomic to call. Want this? Let me know by opening an issue.\n\n\n```javascript\nimport {\n  serializeDictionary,\n  serializeList,\n  serializeItem\n} from 'structured-headers';\n\n// Returns \"foo\", \"bar\"\nserializeList([\n  ['foo', new Map()],\n  ['bar', new Map()],\n]);\n\n// Returns a=1, b=?0\nsh.serializeDictionary({\n  a: 1,\n  b: false,\n});\n\n// Returns 42\nserializeItem(42);\n\n48,65,6C,6C,6F,2C,20,57,6F,72,6C,64,21.\n\n72, 101, 108, 108,\n  111,  32, 119, 111,\n  114, 108, 100\n\n\n// Returns 5.5\nserializeItem(5.5);\n\n// Returns \"hello world\"\nserializeItem(\"hello world\");\n\n// Returns %\"Frysl%C3%A2n\"\nserializeItem(\"Fryslân\");\n\n// Returns ?1\nserializeItem(true);\n\n// Returns a base-64 representation like: *aGVsbG8=*\nserializeItem(\n    new UInt8Array(\n        [72, 101, 108, 108, 111,  32, 119, 111, 114, 108, 100]\n    ).buffer\n);\n\n// Returns a unix timestamp\nserializeItem(new Date());\n\n// Parameters to items can be passed as the second argument\n// Returns \"hello\", q=5\nserializeItem(\n  \"hello\",\n  new Map(['q', 5])\n);\n```\n\nBrowser support\n---------------\n\nThere is a minified version of this library in the `browser/` directory. This minified\nfile will expose a global variable called 'structuredHeader' which contains the rest\nof the api.\n\n\n[1]: https://datatracker.ietf.org/doc/html/rfc8941\n[2]: https://github.com/httpwg/structured-field-tests\n[3]: https://www.rfc-editor.org/rfc/rfc9651.html\n","_attachments":{},"homepage":"https://github.com/evert/structured-header#readme","bugs":{"url":"https://github.com/evert/structured-header/issues"},"license":"MIT"}