{"_id":"packrup","_rev":"3976663","name":"packrup","description":"Node Schema.org for Simple and Automated Google Rich Results","dist-tags":{"latest":"0.1.2"},"maintainers":[{"name":"harlan_zw","email":""}],"time":{"modified":"2025-09-01T01:59:23.000Z","created":"2022-09-07T05:36:08.385Z","0.1.2":"2024-03-11T08:18:19.765Z","0.1.1":"2024-03-11T08:16:15.002Z","0.1.0":"2022-09-08T13:47:31.227Z","0.0.6":"2022-09-07T11:58:45.102Z","0.0.5":"2022-09-07T11:30:49.750Z","0.0.4":"2022-09-07T08:32:26.685Z","0.0.3":"2022-09-07T05:45:57.925Z","0.0.2":"2022-09-07T05:37:21.479Z","0.0.1":"2022-09-07T05:36:08.385Z"},"users":{},"author":{"name":"Harlan Wilton","email":"harlan@harlanzw.com"},"repository":{"type":"git","url":"git+https://github.com/harlan-zw/packrup.git"},"versions":{"0.1.2":{"name":"packrup","type":"module","version":"0.1.2","packageManager":"pnpm@8.15.4","description":"Node Schema.org for Simple and Automated Google Rich Results","author":{"name":"Harlan Wilton","email":"harlan@harlanzw.com"},"license":"MIT","funding":"https://github.com/sponsors/harlan-zw","homepage":"https://github.com/harlan-zw/packrup#readme","repository":{"type":"git","url":"git+https://github.com/harlan-zw/packrup.git"},"bugs":{"url":"https://github.com/harlan-zw/packrup/issues"},"keywords":["pack object","pack string","pack array"],"sideEffects":false,"exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.mjs","require":"./dist/index.cjs"}},"main":"dist/index.cjs","module":"dist/index.mjs","types":"dist/index.d.ts","devDependencies":{"@antfu/eslint-config":"^2.8.0","@types/fs-extra":"^11.0.4","@vitest/ui":"^1.3.1","bumpp":"^9.4.0","eslint":"^8.57.0","fs-extra":"^11.2.0","jsdom":"^24.0.0","typescript":"^5.4.2","unbuild":"^2.0.0","utility-types":"^3.11.0","vitest":"^1.3.1"},"scripts":{"build":"unbuild","stub":"unbuild --stub","test":"vitest","export:sizes":"npx export-size . -r","release":"pnpm build && bumpp && pnpm -r publish --no-git-checks","lint":"eslint . --fix"},"_id":"packrup@0.1.2","_integrity":"sha512-ZcKU7zrr5GlonoS9cxxrb5HVswGnyj6jQvwFBa6p5VFw7G71VAHcUKL5wyZSU/ECtPM/9gacWxy2KFQKt1gMNA==","_resolved":"/tmp/4c71d22f2142e8ee4e0258f17ca133d7/packrup-0.1.2.tgz","_from":"file:packrup-0.1.2.tgz","_nodeVersion":"20.11.1","_npmVersion":"10.2.4","dist":{"shasum":"7e6c50e5b79a1e68cd717e79fd06d40abb8f1583","size":4280,"noattachment":false,"key":"/packrup/-/packrup-0.1.2.tgz","tarball":"http://registry.cnpm.dingdandao.com/packrup/download/packrup-0.1.2.tgz"},"_npmUser":{"name":"harlan_zw","email":"harlan@harlanzw.com"},"directories":{},"maintainers":[{"name":"harlan_zw","email":""}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/packrup_0.1.2_1710145099626_0.5514398852762421"},"_hasShrinkwrap":false,"_cnpmcore_publish_time":"2024-03-11T08:18:19.765Z","publish_time":1710145099765,"_source_registry_name":"default","_cnpm_publish_time":1710145099765},"0.1.1":{"name":"packrup","type":"module","version":"0.1.1","packageManager":"pnpm@8.15.4","description":"Node Schema.org for Simple and Automated Google Rich Results","author":{"name":"Harlan Wilton","email":"harlan@harlanzw.com"},"license":"MIT","funding":"https://github.com/sponsors/harlan-zw","homepage":"https://github.com/harlan-zw/packrup#readme","repository":{"type":"git","url":"git+https://github.com/harlan-zw/packrup.git"},"bugs":{"url":"https://github.com/harlan-zw/packrup/issues"},"keywords":["pack object","pack string","pack array"],"sideEffects":false,"exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.mjs","require":"./dist/index.cjs"}},"main":"dist/index.cjs","module":"dist/index.mjs","types":"dist/index.d.ts","devDependencies":{"@antfu/eslint-config":"^2.8.0","@types/fs-extra":"^11.0.4","@vitest/ui":"^1.3.1","bumpp":"^9.4.0","eslint":"^8.57.0","fs-extra":"^11.2.0","jsdom":"^24.0.0","typescript":"^5.4.2","unbuild":"^2.0.0","utility-types":"^3.11.0","vitest":"^1.3.1"},"scripts":{"build":"unbuild","stub":"unbuild --stub","test":"vitest","export:sizes":"npx export-size . -r","release":"pnpm build && bumpp && pnpm -r publish --no-git-checks","lint":"eslint . --fix"},"_id":"packrup@0.1.1","_integrity":"sha512-Ap3OKGRiwCJ6laSIScaNtACNvYWZdH+34DOENWw8KMoUeaKcJw5dzplDaGR21LuOKL2FIp+FKbS9PAL7qKEveA==","_resolved":"/tmp/9dd65f7e73faa0ad7b3e8c773d73a24c/packrup-0.1.1.tgz","_from":"file:packrup-0.1.1.tgz","_nodeVersion":"20.11.1","_npmVersion":"10.2.4","dist":{"shasum":"11415c3e4ed57591edc13bc67f92335a37a4f600","size":4279,"noattachment":false,"key":"/packrup/-/packrup-0.1.1.tgz","tarball":"http://registry.cnpm.dingdandao.com/packrup/download/packrup-0.1.1.tgz"},"_npmUser":{"name":"harlan_zw","email":"harlan@harlanzw.com"},"directories":{},"maintainers":[{"name":"harlan_zw","email":""}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/packrup_0.1.1_1710144974848_0.11739839824644371"},"_hasShrinkwrap":false,"_cnpmcore_publish_time":"2024-03-11T08:16:15.002Z","publish_time":1710144975002,"_source_registry_name":"default","_cnpm_publish_time":1710144975002},"0.1.0":{"name":"packrup","version":"0.1.0","packageManager":"pnpm@7.8.0","description":"Node Schema.org for Simple and Automated Google Rich Results","author":{"name":"Harlan Wilton","email":"harlan@harlanzw.com"},"license":"MIT","funding":"https://github.com/sponsors/harlan-zw","homepage":"https://github.com/harlan-zw/packrup#readme","repository":{"type":"git","url":"git+https://github.com/harlan-zw/packrup.git"},"bugs":{"url":"https://github.com/harlan-zw/packrup/issues"},"keywords":["pack object","pack string","pack array"],"sideEffects":false,"exports":{".":{"types":"./dist/index.d.ts","require":"./dist/index.cjs","import":"./dist/index.mjs"}},"main":"dist/index.cjs","module":"dist/index.mjs","types":"dist/index.d.ts","devDependencies":{"@antfu/eslint-config":"^0.26.3","@types/fs-extra":"^9.0.13","@vitest/ui":"^0.23.1","bumpp":"^8.2.1","eslint":"^8.23.0","fs-extra":"^10.1.0","jsdom":"^20.0.0","typescript":"^4.8.2","unbuild":"^0.8.10","utility-types":"^3.10.0","vitest":"^0.23.1"},"scripts":{"build":"unbuild","stub":"unbuild --stub","test":"vitest","export:sizes":"npx export-size . -r","release":"bumpp package.json --commit --push --tag","lint":"eslint \"**/*.{ts,vue,json,yml}\" --fix"},"_id":"packrup@0.1.0","_integrity":"sha512-HnUl9ztHGty5ZK13WM8Q7854SWPKH/eCT+MiTO0P1qCu1Y4S5PPJ8E9MwD3cnjSr7PUPzXDnmOVJIKM043OfJQ==","_resolved":"/tmp/9c5e3700777d0fa6e95b30c8b1658cb8/packrup-0.1.0.tgz","_from":"file:packrup-0.1.0.tgz","_nodeVersion":"16.17.0","_npmVersion":"8.15.0","dist":{"shasum":"8a2d865a45aaee9807504046548678fa3382b6e3","size":3892,"noattachment":false,"key":"/packrup/-/packrup-0.1.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/packrup/download/packrup-0.1.0.tgz"},"_npmUser":{"name":"harlan_zw","email":"harlan@harlanzw.com"},"directories":{},"maintainers":[{"name":"harlan_zw","email":""}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/packrup_0.1.0_1662644851044_0.25366117055353987"},"_hasShrinkwrap":false,"_cnpmcore_publish_time":"2022-09-08T13:57:30.694Z","publish_time":1662644851227,"_cnpm_publish_time":1662644851227},"0.0.6":{"name":"packrup","version":"0.0.6","packageManager":"pnpm@7.8.0","description":"Node Schema.org for Simple and Automated Google Rich Results","author":{"name":"Harlan Wilton","email":"harlan@harlanzw.com"},"license":"MIT","funding":"https://github.com/sponsors/harlan-zw","homepage":"https://github.com/harlan-zw/packrup#readme","repository":{"type":"git","url":"git+https://github.com/harlan-zw/packrup.git"},"bugs":{"url":"https://github.com/harlan-zw/packrup/issues"},"keywords":["pack object","pack string","pack array"],"sideEffects":false,"exports":{".":{"types":"./dist/index.d.ts","require":"./dist/index.cjs","import":"./dist/index.mjs"}},"main":"dist/index.cjs","module":"dist/index.mjs","types":"dist/index.d.ts","devDependencies":{"@antfu/eslint-config":"^0.26.3","@types/fs-extra":"^9.0.13","@vitest/ui":"^0.23.1","bumpp":"^8.2.1","eslint":"^8.23.0","fs-extra":"^10.1.0","jsdom":"^20.0.0","typescript":"^4.8.2","unbuild":"^0.8.10","utility-types":"^3.10.0","vitest":"^0.23.1"},"scripts":{"build":"unbuild","stub":"unbuild --stub","test":"vitest","export:sizes":"npx export-size . -r","release":"bumpp package.json --commit --push --tag","lint":"eslint \"**/*.{ts,vue,json,yml}\" --fix"},"_id":"packrup@0.0.6","_integrity":"sha512-WdZU2JMpIWiV22R5jhg86AZcOadKi59ta07WCuEvdv/TOyVlsOz+amo6Odt3GAMFAqx1lrhJ3mdC9dJf5cAQ+A==","_resolved":"/tmp/1fa6956ff5ac8f0d3b4bfa94ad6b81b8/packrup-0.0.6.tgz","_from":"file:packrup-0.0.6.tgz","_nodeVersion":"16.17.0","_npmVersion":"8.15.0","dist":{"shasum":"6f3d236b3397f7ff8adca39c5ffd69724d2e8a87","size":3453,"noattachment":false,"key":"/packrup/-/packrup-0.0.6.tgz","tarball":"http://registry.cnpm.dingdandao.com/packrup/download/packrup-0.0.6.tgz"},"_npmUser":{"name":"harlan_zw","email":"harlan@harlanzw.com"},"directories":{},"maintainers":[{"name":"harlan_zw","email":""}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/packrup_0.0.6_1662551924940_0.8602188371547224"},"_hasShrinkwrap":false,"_cnpmcore_publish_time":"2022-09-07T12:09:42.045Z","publish_time":1662551925102,"_cnpm_publish_time":1662551925102},"0.0.5":{"name":"packrup","version":"0.0.5","packageManager":"pnpm@7.8.0","description":"Node Schema.org for Simple and Automated Google Rich Results","author":{"name":"Harlan Wilton","email":"harlan@harlanzw.com"},"license":"MIT","funding":"https://github.com/sponsors/harlan-zw","homepage":"https://github.com/harlan-zw/packrup#readme","repository":{"type":"git","url":"git+https://github.com/harlan-zw/packrup.git"},"bugs":{"url":"https://github.com/harlan-zw/packrup/issues"},"keywords":["pack object","pack string","pack array"],"sideEffects":false,"exports":{".":{"types":"./dist/index.d.ts","require":"./dist/index.cjs","import":"./dist/index.mjs"}},"main":"dist/index.cjs","module":"dist/index.mjs","types":"dist/index.d.ts","devDependencies":{"@antfu/eslint-config":"^0.26.3","@types/fs-extra":"^9.0.13","@vitest/ui":"^0.23.1","bumpp":"^8.2.1","eslint":"^8.23.0","fs-extra":"^10.1.0","jsdom":"^20.0.0","typescript":"^4.8.2","unbuild":"^0.8.10","utility-types":"^3.10.0","vitest":"^0.23.1"},"scripts":{"build":"unbuild","stub":"unbuild --stub","test":"vitest","export:sizes":"npx export-size . -r","release":"bumpp package.json --commit --push --tag","lint":"eslint \"**/*.{ts,vue,json,yml}\" --fix"},"_id":"packrup@0.0.5","_integrity":"sha512-rReclIKeVYgXnF7X2uGdOp4XdN5G/gk+7d/wjw24Nf55g2oY/r2CYxraAZywhym4ZEefBGMZ5IBkcfH1wMQIXw==","_resolved":"/tmp/0f577da31cc3ff993d6ee7eab2a8cba7/packrup-0.0.5.tgz","_from":"file:packrup-0.0.5.tgz","_nodeVersion":"16.17.0","_npmVersion":"8.15.0","dist":{"shasum":"de384f66b4ce7f84745dba67e82997b0185c8a46","size":3455,"noattachment":false,"key":"/packrup/-/packrup-0.0.5.tgz","tarball":"http://registry.cnpm.dingdandao.com/packrup/download/packrup-0.0.5.tgz"},"_npmUser":{"name":"harlan_zw","email":"harlan@harlanzw.com"},"directories":{},"maintainers":[{"name":"harlan_zw","email":""}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/packrup_0.0.5_1662550249587_0.2361530048385485"},"_hasShrinkwrap":false,"_cnpmcore_publish_time":"2022-09-07T11:58:59.572Z","publish_time":1662550249750,"_cnpm_publish_time":1662550249750},"0.0.4":{"name":"packrup","version":"0.0.4","packageManager":"pnpm@7.8.0","description":"Node Schema.org for Simple and Automated Google Rich Results","author":{"name":"Harlan Wilton","email":"harlan@harlanzw.com"},"license":"MIT","funding":"https://github.com/sponsors/harlan-zw","homepage":"https://github.com/harlan-zw/packrup#readme","repository":{"type":"git","url":"git+https://github.com/harlan-zw/packrup.git"},"bugs":{"url":"https://github.com/harlan-zw/packrup/issues"},"keywords":["pack object","pack string","pack array"],"sideEffects":false,"exports":{".":{"types":"./dist/index.d.ts","require":"./dist/index.cjs","import":"./dist/index.mjs"}},"main":"dist/index.cjs","module":"dist/index.mjs","types":"dist/index.d.ts","devDependencies":{"@antfu/eslint-config":"^0.26.3","@types/fs-extra":"^9.0.13","@vitest/ui":"^0.23.1","bumpp":"^8.2.1","eslint":"^8.23.0","fs-extra":"^10.1.0","jsdom":"^20.0.0","typescript":"^4.8.2","unbuild":"^0.8.10","utility-types":"^3.10.0","vitest":"^0.23.1"},"scripts":{"build":"unbuild","stub":"unbuild --stub","test":"vitest","export:sizes":"npx export-size . -r","release":"bumpp package.json --commit --push --tag","lint":"eslint \"**/*.{ts,vue,json,yml}\" --fix"},"_id":"packrup@0.0.4","_integrity":"sha512-NdFOaQwduqP7DxJauUSkogJKs4sBc9khyqm8D5pmy1EkHU65BqVb+z6ewmnAxhXZma3jecan2AYrJxwllWLsew==","_resolved":"/tmp/5b1c6a2c39f6f67bd623f7b99129b61b/packrup-0.0.4.tgz","_from":"file:packrup-0.0.4.tgz","_nodeVersion":"16.17.0","_npmVersion":"8.15.0","dist":{"shasum":"53a9e28333f6cf172d7cbf6a58af70c69c37cc90","size":3394,"noattachment":false,"key":"/packrup/-/packrup-0.0.4.tgz","tarball":"http://registry.cnpm.dingdandao.com/packrup/download/packrup-0.0.4.tgz"},"_npmUser":{"name":"harlan_zw","email":"harlan@harlanzw.com"},"directories":{},"maintainers":[{"name":"harlan_zw","email":""}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/packrup_0.0.4_1662539546538_0.9335301672180687"},"_hasShrinkwrap":false,"_cnpmcore_publish_time":"2022-09-07T08:45:01.684Z","publish_time":1662539546685,"_cnpm_publish_time":1662539546685},"0.0.3":{"name":"packrup","version":"0.0.3","packageManager":"pnpm@7.8.0","description":"Node Schema.org for Simple and Automated Google Rich Results","author":{"name":"Harlan Wilton","email":"harlan@harlanzw.com"},"license":"MIT","funding":"https://github.com/sponsors/harlan-zw","homepage":"https://github.com/harlan-zw/packrup#readme","repository":{"type":"git","url":"git+https://github.com/harlan-zw/packrup.git"},"bugs":{"url":"https://github.com/harlan-zw/packrup/issues"},"keywords":["pack object","pack string","pack array"],"sideEffects":false,"exports":{".":{"types":"./dist/index.d.ts","require":"./dist/index.cjs","import":"./dist/index.mjs"}},"main":"dist/index.cjs","module":"dist/index.mjs","types":"dist/index.d.ts","devDependencies":{"@antfu/eslint-config":"^0.26.3","@types/fs-extra":"^9.0.13","@vitest/ui":"^0.23.1","bumpp":"^8.2.1","eslint":"^8.23.0","fs-extra":"^10.1.0","jsdom":"^20.0.0","typescript":"^4.8.2","unbuild":"^0.8.10","utility-types":"^3.10.0","vitest":"^0.23.1"},"scripts":{"build":"unbuild","stub":"unbuild --stub","test":"vitest","export:sizes":"npx export-size . -r","release":"bumpp package.json --commit --push --tag","lint":"eslint \"**/*.{ts,vue,json,yml}\" --fix"},"_id":"packrup@0.0.3","_integrity":"sha512-JeGQVLtE0HsvKyjAVjkoId3+p+VaLipgzH5qt7WKK0WljzJpdPbXakjvVApsviSX5ZlZIIQXhbR6zuy2twgW6w==","_resolved":"/tmp/c19a484b5dbc3073dfd19e3b457514e7/packrup-0.0.3.tgz","_from":"file:packrup-0.0.3.tgz","_nodeVersion":"16.17.0","_npmVersion":"8.15.0","dist":{"shasum":"980bf2e3e6acbe7642c28a4ef0e96606f0c222b3","size":3206,"noattachment":false,"key":"/packrup/-/packrup-0.0.3.tgz","tarball":"http://registry.cnpm.dingdandao.com/packrup/download/packrup-0.0.3.tgz"},"_npmUser":{"name":"harlan_zw","email":"harlan@harlanzw.com"},"directories":{},"maintainers":[{"name":"harlan_zw","email":""}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/packrup_0.0.3_1662529557745_0.2258407928413919"},"_hasShrinkwrap":false,"_cnpmcore_publish_time":"2022-09-07T05:47:53.349Z","publish_time":1662529557925,"_cnpm_publish_time":1662529557925},"0.0.2":{"name":"packrup","version":"0.0.2","packageManager":"pnpm@7.8.0","description":"Node Schema.org for Simple and Automated Google Rich Results","author":{"name":"Harlan Wilton","email":"harlan@harlanzw.com"},"license":"MIT","funding":"https://github.com/sponsors/harlan-zw","homepage":"https://github.com/harlan-zw/packrup#readme","repository":{"type":"git","url":"git+https://github.com/harlan-zw/packrup.git"},"bugs":{"url":"https://github.com/harlan-zw/packrup/issues"},"keywords":["pack object","pack string","pack array"],"sideEffects":false,"exports":{".":{"types":"./dist/index.d.ts","require":"./dist/index.cjs","import":"./dist/index.mjs"}},"main":"dist/index.cjs","module":"dist/index.mjs","types":"dist/index.d.ts","devDependencies":{"@antfu/eslint-config":"^0.26.3","@types/fs-extra":"^9.0.13","@vitest/ui":"^0.23.1","bumpp":"^8.2.1","eslint":"^8.23.0","fs-extra":"^10.1.0","jsdom":"^20.0.0","typescript":"^4.8.2","unbuild":"^0.8.10","utility-types":"^3.10.0","vitest":"^0.23.1"},"scripts":{"build":"unbuild","stub":"unbuild --stub","test":"vitest","export:sizes":"npx export-size . -r","release":"bumpp package.json --commit --push --tag","lint":"eslint \"**/*.{ts,vue,json,yml}\" --fix"},"_id":"packrup@0.0.2","_integrity":"sha512-lS9FjHV+BuuhqnSiJ0p3I+Mj4jGVU80zaTfoKTyPapoWoqxI/pBPwUheWJa3FP95xdMATKydCGREj262YZoN/w==","_resolved":"/tmp/dd88c5ae86dad1319579aee2c04458b9/packrup-0.0.2.tgz","_from":"file:packrup-0.0.2.tgz","_nodeVersion":"16.16.0","_npmVersion":"8.11.0","dist":{"shasum":"5a0fc37bfac3ffc9fa9e228df2aa7dc6143f5a6f","size":3194,"noattachment":false,"key":"/packrup/-/packrup-0.0.2.tgz","tarball":"http://registry.cnpm.dingdandao.com/packrup/download/packrup-0.0.2.tgz"},"_npmUser":{"name":"harlan_zw","email":"harlan@harlanzw.com"},"directories":{},"maintainers":[{"name":"harlan_zw","email":""}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/packrup_0.0.2_1662529041351_0.8608520569137181"},"_hasShrinkwrap":false,"_cnpmcore_publish_time":"2022-09-07T05:38:08.550Z","publish_time":1662529041479,"_cnpm_publish_time":1662529041479},"0.0.1":{"name":"packrup","version":"0.0.1","packageManager":"pnpm@7.8.0","description":"Node Schema.org for Simple and Automated Google Rich Results","author":{"name":"Harlan Wilton","email":"harlan@harlanzw.com"},"license":"MIT","funding":"https://github.com/sponsors/harlan-zw","homepage":"https://github.com/harlan-zw/packrup#readme","repository":{"type":"git","url":"git+https://github.com/harlan-zw/packrup.git"},"bugs":{"url":"https://github.com/harlan-zw/packrup/issues"},"keywords":["pack object","pack string","pack array"],"sideEffects":false,"exports":{".":{"types":"./dist/index.d.ts","require":"./dist/index.cjs","import":"./dist/index.mjs"}},"main":"dist/index.cjs","module":"dist/index.mjs","types":"dist/index.d.ts","devDependencies":{"@antfu/eslint-config":"^0.26.3","@types/fs-extra":"^9.0.13","@vitest/ui":"^0.23.1","bumpp":"^8.2.1","eslint":"^8.23.0","fs-extra":"^10.1.0","jsdom":"^20.0.0","typescript":"^4.8.2","unbuild":"^0.8.10","utility-types":"^3.10.0","vitest":"^0.23.1"},"scripts":{"build":"unbuild","stub":"unbuild --stub","test":"vitest","export:sizes":"npx export-size . -r","release":"bumpp package.json --commit --push --tag","lint":"eslint \"**/*.{ts,vue,json,yml}\" --fix"},"_id":"packrup@0.0.1","_integrity":"sha512-G0vmVPsE9qezOdr7lc2gLTZHJasvP9MSur9aC2nLV/yWVyqtHOQrv+1y6eVYMzrAO67OsIs7CCh+yhEFSNa6UA==","_resolved":"/tmp/05d22db8274e037aa50deb99ddfda728/packrup-0.0.1.tgz","_from":"file:packrup-0.0.1.tgz","_nodeVersion":"16.17.0","_npmVersion":"8.15.0","dist":{"shasum":"f58519ae45d5f83e07bf47f0bd85c37de7a14a1b","size":3195,"noattachment":false,"key":"/packrup/-/packrup-0.0.1.tgz","tarball":"http://registry.cnpm.dingdandao.com/packrup/download/packrup-0.0.1.tgz"},"_npmUser":{"name":"harlan_zw","email":"harlan@harlanzw.com"},"directories":{},"maintainers":[{"name":"harlan_zw","email":""}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/packrup_0.0.1_1662528968210_0.45527873176981415"},"_hasShrinkwrap":false,"_cnpmcore_publish_time":"2022-09-07T05:38:07.750Z","publish_time":1662528968385,"_cnpm_publish_time":1662528968385}},"readme":"<h1 align='center'>packrup</h1>\n\n<p align=\"center\">\n<a href='https://github.com/harlan-zw/packrup/actions/workflows/test.yml'>\n</a>\n<a href=\"https://www.npmjs.com/package/packrup\" target=\"__blank\"><img src=\"https://img.shields.io/npm/v/packrup?style=flat&colorA=002438&colorB=28CF8D\" alt=\"NPM version\"></a>\n<a href=\"https://www.npmjs.com/package/packrup\" target=\"__blank\"><img alt=\"NPM Downloads\" src=\"https://img.shields.io/npm/dm/packrup?flat&colorA=002438&colorB=28CF8D\"></a>\n<a href=\"https://github.com/harlan-zw/packrup\" target=\"__blank\"><img alt=\"GitHub stars\" src=\"https://img.shields.io/github/stars/harlan-zw/packrup?flat&colorA=002438&colorB=28CF8D\"></a>\n</p>\n\n<p align=\"center\">\nSimple utils to pack (and unpack) arrays and strings to a flat object.\n</p>\n\n<p align=\"center\">\n<table>\n<tbody>\n<td align=\"center\">\n<img width=\"800\" height=\"0\" /><br>\n<i>Status:</i> Stable</b> <br>\n<sup> Please report any issues ????</sup><br>\n<sub>Made possible by my <a href=\"https://github.com/sponsors/harlan-zw\">Sponsor Program ????</a><br> Follow me <a href=\"https://twitter.com/harlan_zw\">@harlan_zw</a> ???? • Join <a href=\"https://discord.gg/275MBUBvgP\">Discord</a> for help</sub><br>\n<img width=\"800\" height=\"0\" />\n</td>\n</tbody>\n</table>\n</p>\n\n## Background\n\nThe [zhead](https://github.com/harlan-zw/zhead) package provides a flat-object style API for HTML `<meta>` tags,\nto make this happen we need to pack and unpack arrays and strings to a flat object.\n\nFor example, the following object:\n\n```json\n{\n  \"viewport\": {\n    \"content\": {\n      \"width\": \"device-width\",\n      \"initial-scale\": \"1\"\n    }\n  }\n}\n```\n\nCan be packed to the below (and vice versa):\n\n```html\n<meta name=\"viewport\" content=\"width=device-width, initial-scale=1\">\n```\n\nFor an example see [useSeoMeta](https://github.com/unjs/unhead/blob/main/packages/shared/src/meta.ts).\n\n## Features\n\n- Pack arrays, objects and strings to a flat object\n- Handles duplicates with `key`\n- Supports nested key selections with `dot.notation`\n- ???? Composable, tree-shakable and tiny (< 1kb, see [export-size-report](https://github.com/harlan-zw/packrup/blob/main/export-size-report.json))\n\n## Help Wanted\n\nThese utils were meant to be fully typed, but I struggled with the implementation. If you want a fun TypeScript challenge\nthen please open a PR :).\n\n## Installation\n\n```bash\nnpm install --save-dev packrup\n\n# Using yarn\nyarn add --dev packrup\n```\n\n## API\n\n### packArray\n\n**Arguments**\n\n- _input_ - `array`\n\n  The array to pack\n\n- _options_ -  `{ key: string | string[], value: string | string[] }`\n\n  The options to use to resolve the key and value.\n  By default, will choose first 2 keys of an object.\n\n```ts\nimport { packArray } from 'packrup'\n\npackArray([\n  { 'http-equiv': 'content-security-policy', 'content': 'content-src none' }\n])\n\n// {\n//    'content-security-policy': 'content-src none',\n// }\n```\n\n### packObject\n\n**Arguments**\n\n- _input_ - `object`\n\n  The record to pack.\n\n- _options_ -  `{ key: string | string[], value: string | string[] }`\n\n  The options to use to resolve the key and value.\n  By default, will choose first 2 keys of an object.\n\n```ts\nimport { packObject } from 'packrup'\n\npackObject({\n  image: {\n    src: {\n      '1x': 'https://example.com/image.png',\n      '2x': 'https://example.com/image@2x.png'\n    },\n    alt: 'Example Image'\n  },\n}, {\n  key: 'image.src.1x',\n  value: 'image.alt'\n})\n\n// {\n//   \"https://example.com/image.png\": \"Example Image\",\n// }\n```\n\n### packString\n\n```ts\nimport { packString } from 'packrup'\n\nconst head = packString('src=\"https://example.com/image.jpg\" width=\"800\" height=\"600\"')\n// {\n//   \"height\": \"600\",\n//   \"src\": \"https://example.com/image.jpg\",\n//   \"width\": \"800\",\n// }\n```\n\n### unpackToArray\n\n**Arguments**\n\n- _input_ - `array`\n\n  The array to pack\n\n- _options_ -  `{ key: string | string[], value: string | string[] }`\n\n  The options to use to resolve the key and value.\n  By default, will choose first 2 keys of an object.\n\n```ts\nimport { unpackToArray } from 'packrup'\n\nunpackToArray({\n  'content-security-policy': 'content-src none',\n}, { key: 'http-equiv', value: 'content' })\n```\n\n### unpackToString\n\n**Arguments**\n\n- _input_ - `object`\n\n  The record to unpack to a string.\n\n- _options_\n\n```ts\nexport interface TransformValueOptions {\n  entrySeparator?: string\n  keyValueSeparator?: string\n  wrapValue?: string\n  resolve?: (ctx: { key: string, value: unknown }) => string | void\n}\n```\n\n```ts\nimport { unpackToString } from 'packrup'\n\nunpackToString({\n  'noindex': true,\n  'nofollow': true,\n  'max-snippet': 20,\n  'maxi-image-preview': 'large',\n}, {\n  resolve({ key, value }) {\n    if (typeof value === 'boolean')\n      return `${key}`\n  },\n  keyValueSeparator: ':',\n  entrySeparator: ', ',\n})\n\n// \"noindex, nofollow, max-snippet:20, maxi-image-preview:large\"\n```\n\n## Sponsors\n\n<p align=\"center\">\n  <a href=\"https://raw.githubusercontent.com/harlan-zw/static/main/sponsors.svg\">\n    <img src='https://raw.githubusercontent.com/harlan-zw/static/main/sponsors.svg'/>\n  </a>\n</p>\n\n## License\n\nMIT License © 2022-PRESENT [Harlan Wilton](https://github.com/harlan-zw)\n","_attachments":{},"homepage":"https://github.com/harlan-zw/packrup#readme","bugs":{"url":"https://github.com/harlan-zw/packrup/issues"},"license":"MIT"}