{"_id":"@abw/badger-codecs","_rev":"7-564192567451c48b6457fe42e69a5ba3","name":"@abw/badger-codecs","dist-tags":{"alpha":"1.2.0-ts-alpha2","latest":"1.3.0"},"versions":{"1.0.1":{"name":"@abw/badger-codecs","version":"1.0.1","keywords":["badger","codecs","encode","decode","json","yaml","base64"],"author":{"name":"Andy Wardley"},"license":"MIT","_id":"@abw/badger-codecs@1.0.1","maintainers":[{"name":"abw","email":"abw@wardley.org"}],"homepage":"https://github.com/abw/badger-codecs-js#readme","bugs":{"url":"https://github.com/abw/badger-codecs-js/issues"},"dist":{"shasum":"20ec27df036338a7eeb4b57bf28cc750949b92ad","tarball":"https://registry.npmjs.org/@abw/badger-codecs/-/badger-codecs-1.0.1.tgz","fileCount":7,"integrity":"sha512-hjvfKKTHSBhuDaROciR0ztaxVLAcRVI7ICUn5e8gKJLp6G+bXgX/VYYjFHPGR5pcKInsoBGsbIyifTEwgGvOKg==","signatures":[{"sig":"MEUCIQCjQD/SbRkyTeGt82ODtNHeE7aS2CB1k3m4ysd+fyNangIgOVw//GJ4h4ZkTlLBN3EPqOsuhrUG4lvDyWPbmd5X6Sk=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":12424,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJkAwdNACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmoS3RAAnT32LdGHd7F/7CkkUS6LLvJK8jggs5q9V+/kIbsPW21c7H20\r\n39N3whuttSOifsMdPXX8QoskUXbkngsNVnYAIojal8t8Gq4CJjFof5I5hLQC\r\ne3BZx+hPWPbZprf9Z0vezpb+LcH1piNGzFx8Z3YVAWgg84d+rEgmffp0652J\r\nWTkJSxthFIZRZu8ZDbZg6yM3QGDFHaB+YGPpPos6LSnlri7kaksG2pwlriXo\r\njW2feqYkRDRXV2GOUvrq5+VTztag7jVXktPBbQIl2ogxEMsVoH2YUmlDr9bL\r\nJ820Pt5pabxyJKEJAZmpznxJKeD+iDLHuJrL+w6I/eggog1yQ7IRHpCQVwUI\r\n00KgvMnAz5vwH5jkDEVL+gPMKmuWlGUkmqfF/09dt0Nn5wQXIQ4kRO6pMnN0\r\nmKoV7o5akIoU+7GPBSI6isGPt+G9BIWtrlQWt2VLIV+yGQmsttitpPugj++a\r\nGQCvCO9ZMCK5P9zaaDRzVhW3sIdZvgDPXu2AlNm5As7ssyzcHcbHGrYPlqk/\r\n8Pmt51Tu3N1pRN/XqQ40DsJCi2gTOVFdgcuDZRYUjxuq8o1z9gZU3uhjMUxw\r\nO3q921f6JuvBs8IjpJoywpriuu9eez2w73FnAJtGmu2DodEVgIrJuOJcEFps\r\nX7XGMITpsR97ExSFiQGtWCG8DpbdavEm/Mg=\r\n=uAhT\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/badger-codecs.cjs.js","type":"module","module":"dist/badger-codecs.esm.js","exports":"./dist/badger-codecs.esm.js","gitHead":"929097068485eb80832cf7b64489064b6a6f4f2d","scripts":{"dev":"rollup -c -w","lint":"eslint 'src/**/*'","test":"ava --serial","build":"rollup -c","pretest":"pnpm run build"},"_npmUser":{"name":"abw","email":"abw@wardley.org"},"repository":{"url":"git+https://github.com/abw/badger-codecs-js.git","type":"git"},"_npmVersion":"8.19.2","description":"Wrapper functions for encoding/decoding data","directories":{},"_nodeVersion":"18.12.1","dependencies":{"js-yaml":"^4.1.0","@abw/badger-utils":"^1.0.16"},"_hasShrinkwrap":false,"devDependencies":{"ava":"^5.2.0","eslint":"^8.35.0","rollup":"^3.18.0","@rollup/plugin-terser":"^0.4.0","@rollup/plugin-commonjs":"^24.0.1","@rollup/plugin-node-resolve":"^15.0.1"},"_npmOperationalInternal":{"tmp":"tmp/badger-codecs_1.0.1_1677920076839_0.2524764580744767","host":"s3://npm-registry-packages"}},"1.0.2":{"name":"@abw/badger-codecs","version":"1.0.2","keywords":["badger","codecs","encode","decode","json","yaml","base64"],"author":{"name":"Andy Wardley"},"license":"MIT","_id":"@abw/badger-codecs@1.0.2","maintainers":[{"name":"abw","email":"abw@wardley.org"}],"homepage":"https://github.com/abw/badger-codecs-js#readme","bugs":{"url":"https://github.com/abw/badger-codecs-js/issues"},"dist":{"shasum":"7d45579f3ec4fdf62fa535003b6ed05561982af0","tarball":"https://registry.npmjs.org/@abw/badger-codecs/-/badger-codecs-1.0.2.tgz","fileCount":7,"integrity":"sha512-L8w3z+7MXiKZwRxSRYclKtk1+vWCbFKEDIfzN+xgpTBsHSox+36GdpbA1BoC+bJWSSagU5upYnOzStaGdnripg==","signatures":[{"sig":"MEUCIQD/acK+MxMyEIfC9KB4eL71i0Y8rgJKDMPuXJOFFmcK5gIgcK9GZdmKrurGHVu/tDKtgj65lDrNxIBdb/35cSDCvps=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":14191,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJkCbahACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmqTbw/+JK7tmEjAro/kVVi1lm09tq3ZN5WC17RO4yOHyWr0VM+GV9Ye\r\n5lsV8cgj8UiduDuUJ8s69DTUSZAadGF0UebhkEQlOnb36Equo+buuuI1ESiy\r\nLQdyoPq1eL2R6iYdqEZVHTNpzVqvzO3Sm+fPbi8HCQ/ZD37ZP5Sx61v7R2yJ\r\ny1/ppYv21bjq7EWzGgPNH64w70YbPhvsFJlIq7NgCSLOsZr229eB3i5TUzVq\r\n8eOKCMfnXY1nJCBkSjv7hS65n7h5tmH7eLH+vsswK0uIOAgIc/4Ew7j2AmYF\r\n5DMZlhj6myxVYFBI6EK7SzbIwMgEktZPaT1w6Ruf3wWSrwvZycO7x2H3lspj\r\n6Y0x0PR090e9ADZe+Tp/LyC+ADnz8jkesMWWWAx70x67obgSMukuqy2jnwoi\r\nNHbayqRy383s1yX/jD36nBRUdRnNyP9DpPNyoz0dbXR5J+epsFbdczQRU4+E\r\n9+jim6cm1E/w7xKE3jH8Fro1QeqZoMa2RBe6PumBbOK83rMVI/0kOsVx4lvP\r\n5W6XKsPvP8UA21/QtDwHIuf7xJtYt5zwpMGQmBlnZu9Py4lyOi5Bpko/PxKj\r\nYrZZIjoOWwLQMVX2tvRMsZR52lJVkL0tsEBu+NPUJx4RubfduHek4RxjX/CT\r\nWHWi4d8G7+yuBMLFobpSygbfBgpCS0GF/no=\r\n=3gPl\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/badger-codecs.cjs.js","type":"module","_from":"file:abw-badger-codecs-1.0.2.tgz","module":"dist/badger-codecs.esm.js","exports":"./dist/badger-codecs.esm.js","scripts":{"dev":"rollup -c -w","lint":"eslint 'src/**/*'","test":"ava --serial","build":"rollup -c","pretest":"pnpm run build"},"_npmUser":{"name":"abw","email":"abw@wardley.org"},"_resolved":"/private/var/folders/jw/y_b__hgj1n39hh2qgp9s8dnc0000gn/T/1e8994e838d924abab71c6ef7f829674/abw-badger-codecs-1.0.2.tgz","_integrity":"sha512-L8w3z+7MXiKZwRxSRYclKtk1+vWCbFKEDIfzN+xgpTBsHSox+36GdpbA1BoC+bJWSSagU5upYnOzStaGdnripg==","repository":{"url":"git+https://github.com/abw/badger-codecs-js.git","type":"git"},"_npmVersion":"8.19.2","description":"Wrapper functions for encoding/decoding data","directories":{},"_nodeVersion":"18.12.1","dependencies":{"js-yaml":"^4.1.0","@abw/badger-utils":"^1.0.16"},"_hasShrinkwrap":false,"devDependencies":{"ava":"^5.2.0","eslint":"^8.35.0","rollup":"^3.18.0","@rollup/plugin-terser":"^0.4.0","@rollup/plugin-commonjs":"^24.0.1","@rollup/plugin-node-resolve":"^15.0.1"},"_npmOperationalInternal":{"tmp":"tmp/badger-codecs_1.0.2_1678358176814_0.701070846192936","host":"s3://npm-registry-packages"}},"1.0.3":{"name":"@abw/badger-codecs","version":"1.0.3","keywords":["badger","codecs","encode","decode","json","yaml","base64"],"author":{"name":"Andy Wardley"},"license":"MIT","_id":"@abw/badger-codecs@1.0.3","maintainers":[{"name":"abw","email":"abw@wardley.org"}],"homepage":"https://github.com/abw/badger-codecs-js#readme","bugs":{"url":"https://github.com/abw/badger-codecs-js/issues"},"dist":{"shasum":"be351e7cff6a4c80739f04506ad554a605c382ff","tarball":"https://registry.npmjs.org/@abw/badger-codecs/-/badger-codecs-1.0.3.tgz","fileCount":7,"integrity":"sha512-baUQcCcYcnEkTq+LEJotDluwVX2uBA332/u2fPaZrQwp7UhmqxOV7hIJ4sZel6JpaXtp9VWXU9LvZlhOB59+Gw==","signatures":[{"sig":"MEUCIQDGsF+Lj9OwPSYAeE89urDMIp6uZHkYECWpcm60PMElUgIgZ/W+CYVtqGNrHvwdDK93oZnZc7n17vuZI/MGn+xCdRA=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":17415,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJkQQosACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmoywRAAiHBJkUbG7xdszCnZ4FOL65Ixsz8azxOWWKpOk0Nqsg5J8v8n\r\nQh/GQMen1j/4jKMwQuDIO3YxZII8/QvU0qMILiPsNvanojHU8bAeqlTZg1He\r\nN23IdH1mDId5zX/yJbisuXsKy+9Cwp4l7/QsmIROGGeXsCUNgCCmNG1eE7pP\r\nXFSVfVxB7bz3HHgOo0iBSwdCDCq3/agHpYv66JfsYkZql/6EtOX4cQh9J20N\r\nrsQICzMFaraJLd4RduyZ6EG3s0ztA4ZoIlNM7HWepV//PhR4VsE8nzoRym/z\r\nbZdz0O7sSzKlhwdi4ezY7pjAiYc8UJusj/WhhZg031OOZCKCVJnq8R2BdJHX\r\n/94PuygF3lOHGsgfrHjCmwtAd//o+cbeLShEuWmC04jU5YeWV15jkxWvpoSC\r\nFkgAt0RfZ2jeYzYDbzLH/64TnT/hzXnd/8PRmg6VLLIA73791BOUq10+BhIx\r\nvJlerpdLPF8gUOOn2bz3yLYa3HySmUCX4LYmMJ4nVPft3BT6utmD3n/ypXvO\r\nFln6LOWWWBhC9hwnuT+fy43B656/ydyv5PD89ivKZckBczhVHqovEOy/5FpU\r\nh2u52/tslFVxtMTeAERZ73+g8tlnYA6xvnX8RV47l4V7CLaENwbfq58Auv6K\r\nlGrujdz0mIeUbbXT9FXCZi33dkKPcjo5RVo=\r\n=NMGf\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/badger-codecs.cjs.js","type":"module","_from":"file:abw-badger-codecs-1.0.3.tgz","module":"dist/badger-codecs.esm.js","exports":"./dist/badger-codecs.esm.js","scripts":{"dev":"rollup -c -w","lint":"eslint 'src/**/*'","test":"ava --serial","build":"rollup -c","pretest":"pnpm run build"},"_npmUser":{"name":"abw","email":"abw@wardley.org"},"_resolved":"/private/var/folders/jw/y_b__hgj1n39hh2qgp9s8dnc0000gn/T/8e25c1be90fe200ff93e509fb193d808/abw-badger-codecs-1.0.3.tgz","_integrity":"sha512-baUQcCcYcnEkTq+LEJotDluwVX2uBA332/u2fPaZrQwp7UhmqxOV7hIJ4sZel6JpaXtp9VWXU9LvZlhOB59+Gw==","repository":{"url":"git+https://github.com/abw/badger-codecs-js.git","type":"git"},"_npmVersion":"8.19.2","description":"Wrapper functions for encoding/decoding data","directories":{},"_nodeVersion":"18.12.1","dependencies":{"js-yaml":"^4.1.0","@abw/badger-utils":"^1.0.16"},"_hasShrinkwrap":false,"devDependencies":{"ava":"^5.2.0","eslint":"^8.35.0","rollup":"^3.18.0","@rollup/plugin-terser":"^0.4.0","@rollup/plugin-commonjs":"^24.0.1","@rollup/plugin-node-resolve":"^15.0.1"},"_npmOperationalInternal":{"tmp":"tmp/badger-codecs_1.0.3_1681984044760_0.2900737989237585","host":"s3://npm-registry-packages"}},"1.2.0-ts-alpha":{"name":"@abw/badger-codecs","version":"1.2.0-ts-alpha","keywords":["badger","codecs","encode","decode","json","yaml","base64"],"author":{"name":"Andy Wardley"},"license":"MIT","_id":"@abw/badger-codecs@1.2.0-ts-alpha","maintainers":[{"name":"abw","email":"abw@wardley.org"}],"homepage":"https://github.com/abw/badger-codecs-js#readme","bugs":{"url":"https://github.com/abw/badger-codecs-js/issues"},"dist":{"shasum":"4feedd09809f0e26c1748638a695bad4892c588d","tarball":"https://registry.npmjs.org/@abw/badger-codecs/-/badger-codecs-1.2.0-ts-alpha.tgz","fileCount":17,"integrity":"sha512-rNe0W3jE651cWwtAOcC0UPtNUlR6dRy35gdsjQ/HuGjXwvOGxvIXyEBJ2TCVomKDe8PXxu/G7IygKVUVptuEAQ==","signatures":[{"sig":"MEQCIGZY3w2zHCzHPFQa+cPU4BJ/bPn2SbCy44wxbmZ3bXmSAiBwFO9gE3IAEb55DS4oPzg1NhahKGZcnjIo4M4BA5hy4A==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":486991},"main":"dist/badger-codecs.cjs","type":"module","_from":"file:abw-badger-codecs-1.2.0-ts-alpha.tgz","types":"./dist/index.d.ts","module":"dist/badger-codecs.js","exports":{".":{"import":{"types":"./dist/index.d.ts","default":"./dist/badger-codecs.js"},"require":"./dist/badger-codecs.cjs"}},"scripts":{"dev":"vitepress dev website","lint":"eslint 'src/**/*' 'test/**/*'","test":"vitest --ui --coverage","build":"$npm_execpath build:lib && $npm_execpath build:docs","pretest":"$npm_execpath build:lib","preview":"vitepress preview website","build:lib":"tsc && vite build","build:docs":"vitepress build website"},"_npmUser":{"name":"abw","email":"abw@wardley.org"},"_resolved":"/private/var/folders/jw/y_b__hgj1n39hh2qgp9s8dnc0000gn/T/c980cd8a9ef3dd5e8b95717c8ef5efa9/abw-badger-codecs-1.2.0-ts-alpha.tgz","_integrity":"sha512-rNe0W3jE651cWwtAOcC0UPtNUlR6dRy35gdsjQ/HuGjXwvOGxvIXyEBJ2TCVomKDe8PXxu/G7IygKVUVptuEAQ==","repository":{"url":"git+https://github.com/abw/badger-codecs-js.git","type":"git"},"_npmVersion":"10.2.3","description":"Wrapper functions for encoding/decoding data","directories":{},"_nodeVersion":"20.10.0","dependencies":{"js-yaml":"^4.1.0","@abw/badger-utils":"^1.2.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"ava":"^5.2.0","vite":"^6.0.6","eslint":"^9.17.0","rollup":"^3.18.0","vitest":"^2.1.8","globals":"^15.14.0","vitepress":"^1.5.0","@eslint/js":"^9.17.0","@vitest/ui":"^2.1.8","typescript":"^5.7.2","@types/node":"^22.10.2","vite-plugin-dts":"^4.4.0","@eslint/eslintrc":"^3.2.0","typescript-eslint":"^8.18.2","@vitest/coverage-v8":"^2.1.8","@rollup/plugin-terser":"^0.4.0","@rollup/plugin-commonjs":"^24.0.1","vite-plugin-node-polyfills":"^0.22.0","@rollup/plugin-node-resolve":"^15.0.1"},"_npmOperationalInternal":{"tmp":"tmp/badger-codecs_1.2.0-ts-alpha_1735375130326_0.40786607854779877","host":"s3://npm-registry-packages-npm-production"}},"1.2.0-ts-alpha2":{"name":"@abw/badger-codecs","version":"1.2.0-ts-alpha2","keywords":["badger","codecs","encode","decode","json","yaml","base64"],"author":{"name":"Andy Wardley"},"license":"MIT","_id":"@abw/badger-codecs@1.2.0-ts-alpha2","maintainers":[{"name":"abw","email":"abw@wardley.org"}],"homepage":"https://github.com/abw/badger-codecs-js#readme","bugs":{"url":"https://github.com/abw/badger-codecs-js/issues"},"dist":{"shasum":"0cb0534ea816dcf9c69a7fe3c0e7933791897a91","tarball":"https://registry.npmjs.org/@abw/badger-codecs/-/badger-codecs-1.2.0-ts-alpha2.tgz","fileCount":17,"integrity":"sha512-yuqlJcFnTS3Tee1OJ7+oVRdeUjx+l6LK26kIu3f/g72NlR6Wvt2XijLqzlGyDfxjyHf+FUXMK3FtzDLNVuAL4w==","signatures":[{"sig":"MEUCIQD4qTkhIwBTp9zW2oItM7NJQ6uSLCOGv5TlxqZ+c+PvAAIgM1Z+rTOZR3kzytQbFCNk7+2UngVIqTxaSDKAi7A/Ebs=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":487401},"main":"dist/badger-codecs.cjs","type":"module","_from":"file:abw-badger-codecs-1.2.0-ts-alpha2.tgz","types":"./dist/index.d.ts","module":"dist/badger-codecs.js","exports":{".":{"import":{"types":"./dist/index.d.ts","default":"./dist/badger-codecs.js"},"require":"./dist/badger-codecs.cjs"}},"scripts":{"dev":"vitepress dev website","lint":"eslint 'src/**/*' 'test/**/*'","test":"vitest --ui --coverage","build":"$npm_execpath build:lib && $npm_execpath build:docs","pretest":"$npm_execpath build:lib","preview":"vitepress preview website","build:lib":"tsc && vite build","build:docs":"vitepress build website"},"_npmUser":{"name":"abw","email":"abw@wardley.org"},"_resolved":"/private/var/folders/jw/y_b__hgj1n39hh2qgp9s8dnc0000gn/T/0e622d209a425095f1c4e1801c955b7b/abw-badger-codecs-1.2.0-ts-alpha2.tgz","_integrity":"sha512-yuqlJcFnTS3Tee1OJ7+oVRdeUjx+l6LK26kIu3f/g72NlR6Wvt2XijLqzlGyDfxjyHf+FUXMK3FtzDLNVuAL4w==","repository":{"url":"git+https://github.com/abw/badger-codecs-js.git","type":"git"},"_npmVersion":"10.2.3","description":"Wrapper functions for encoding/decoding data","directories":{},"_nodeVersion":"20.10.0","dependencies":{"js-yaml":"^4.1.0","@abw/badger-utils":"^1.2.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"ava":"^5.2.0","vite":"^6.0.6","eslint":"^9.17.0","rollup":"^3.18.0","vitest":"^2.1.8","globals":"^15.14.0","vitepress":"^1.5.0","@eslint/js":"^9.17.0","@vitest/ui":"^2.1.8","typescript":"^5.7.2","@types/node":"^22.10.2","vite-plugin-dts":"^4.4.0","@eslint/eslintrc":"^3.2.0","typescript-eslint":"^8.18.2","@vitest/coverage-v8":"^2.1.8","@rollup/plugin-terser":"^0.4.0","@rollup/plugin-commonjs":"^24.0.1","vite-plugin-node-polyfills":"^0.22.0","@rollup/plugin-node-resolve":"^15.0.1"},"_npmOperationalInternal":{"tmp":"tmp/badger-codecs_1.2.0-ts-alpha2_1735376043711_0.6348710868090421","host":"s3://npm-registry-packages-npm-production"}},"1.2.0":{"name":"@abw/badger-codecs","version":"1.2.0","keywords":["badger","codecs","encode","decode","json","yaml","base64"],"author":{"name":"Andy Wardley"},"license":"MIT","_id":"@abw/badger-codecs@1.2.0","maintainers":[{"name":"abw","email":"abw@wardley.org"}],"homepage":"https://github.com/abw/badger-codecs-js#readme","bugs":{"url":"https://github.com/abw/badger-codecs-js/issues"},"dist":{"shasum":"b45a30c6415beca789924cf90058ecd4723329ca","tarball":"https://registry.npmjs.org/@abw/badger-codecs/-/badger-codecs-1.2.0.tgz","fileCount":17,"integrity":"sha512-KJpYtFTmXQbivMr27UMZMWLEhtFzcRWhVYEj6Ycrrr08qqtdsk+Vd17H4toSdq1tvEeD8yZV2banjogRADYC2Q==","signatures":[{"sig":"MEYCIQCGPPQE61YHRGyky4Jb5vKNdMJ5If4pcAhEwvk2R+Sx0wIhAP59kkaGNqxvHLxxaAp7lt9UkO4VbmBBob8ZypJy59e1","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":487391},"main":"dist/badger-codecs.cjs","type":"module","_from":"file:abw-badger-codecs-1.2.0.tgz","types":"./dist/index.d.ts","module":"dist/badger-codecs.js","exports":{".":{"import":{"types":"./dist/index.d.ts","default":"./dist/badger-codecs.js"},"require":"./dist/badger-codecs.cjs"}},"scripts":{"dev":"vitepress dev website","lint":"eslint 'src/**/*' 'test/**/*'","test":"vitest --ui --coverage","build":"$npm_execpath build:lib && $npm_execpath build:docs","pretest":"$npm_execpath build:lib","preview":"vitepress preview website","build:lib":"tsc && vite build","build:docs":"vitepress build website"},"_npmUser":{"name":"abw","email":"abw@wardley.org"},"_resolved":"/private/var/folders/jw/y_b__hgj1n39hh2qgp9s8dnc0000gn/T/138ef1fbe612384d7e77b39792b01bb7/abw-badger-codecs-1.2.0.tgz","_integrity":"sha512-KJpYtFTmXQbivMr27UMZMWLEhtFzcRWhVYEj6Ycrrr08qqtdsk+Vd17H4toSdq1tvEeD8yZV2banjogRADYC2Q==","repository":{"url":"git+https://github.com/abw/badger-codecs-js.git","type":"git"},"_npmVersion":"10.2.3","description":"Wrapper functions for encoding/decoding data","directories":{},"_nodeVersion":"20.10.0","dependencies":{"js-yaml":"^4.1.0","@abw/badger-utils":"^1.2.0"},"_hasShrinkwrap":false,"devDependencies":{"ava":"^5.2.0","vite":"^6.0.6","eslint":"^9.17.0","rollup":"^3.18.0","vitest":"^2.1.8","globals":"^15.14.0","vitepress":"^1.5.0","@eslint/js":"^9.17.0","@vitest/ui":"^2.1.8","typescript":"^5.7.2","@types/node":"^22.10.2","vite-plugin-dts":"^4.4.0","@eslint/eslintrc":"^3.2.0","typescript-eslint":"^8.18.2","@vitest/coverage-v8":"^2.1.8","@rollup/plugin-terser":"^0.4.0","@rollup/plugin-commonjs":"^24.0.1","vite-plugin-node-polyfills":"^0.22.0","@rollup/plugin-node-resolve":"^15.0.1"},"_npmOperationalInternal":{"tmp":"tmp/badger-codecs_1.2.0_1735376351696_0.8494133208920931","host":"s3://npm-registry-packages-npm-production"}},"1.3.0":{"name":"@abw/badger-codecs","version":"1.3.0","description":"Wrapper functions for encoding/decoding data","type":"module","main":"dist/badger-codecs.cjs","module":"dist/badger-codecs.js","types":"./dist/index.d.ts","exports":{".":{"require":"./dist/badger-codecs.cjs","import":{"types":"./dist/index.d.ts","default":"./dist/badger-codecs.js"}}},"author":{"name":"Andy Wardley"},"license":"MIT","repository":{"type":"git","url":"git+https://github.com/abw/badger-codecs-js.git"},"bugs":{"url":"https://github.com/abw/badger-codecs-js/issues"},"keywords":["badger","codecs","encode","decode","json","yaml","base64"],"dependencies":{"@abw/badger-utils":"^1.2.0","yaml":"^2.8.1"},"devDependencies":{"@eslint/eslintrc":"^3.2.0","@eslint/js":"^9.17.0","@rollup/plugin-commonjs":"^24.0.1","@rollup/plugin-node-resolve":"^15.0.1","@rollup/plugin-terser":"^0.4.0","@types/node":"^22.10.2","@vitest/coverage-v8":"^2.1.8","@vitest/ui":"^2.1.8","ava":"^5.2.0","eslint":"^9.17.0","globals":"^15.14.0","rollup":"^3.18.0","typescript":"^5.7.2","typescript-eslint":"^8.18.2","vite":"^6.0.6","vite-plugin-dts":"^4.4.0","vite-plugin-node-polyfills":"^0.22.0","vitepress":"^1.5.0","vitest":"^2.1.8"},"scripts":{"dev":"vitepress dev website","preview":"vitepress preview website","build":"$npm_execpath build:lib && $npm_execpath build:docs","build:lib":"tsc && vite build","build:docs":"vitepress build website","lint":"eslint 'src/**/*' 'test/**/*'","test":"vitest --ui --coverage","pretest":"$npm_execpath build:lib"},"_id":"@abw/badger-codecs@1.3.0","homepage":"https://github.com/abw/badger-codecs-js#readme","_integrity":"sha512-T2gu6/2TNXeM5aX9ANimCl/fybVZbXC7rzRBVJLkMmsFshlEh0CEt6oYlP+CnqzszyRC/cuOga+ggDg5wb1vlw==","_resolved":"/private/var/folders/jw/y_b__hgj1n39hh2qgp9s8dnc0000gn/T/52a0c4333c096d51ffa0eb1b1f56262b/abw-badger-codecs-1.3.0.tgz","_from":"file:abw-badger-codecs-1.3.0.tgz","_nodeVersion":"22.18.0","_npmVersion":"10.9.3","dist":{"integrity":"sha512-T2gu6/2TNXeM5aX9ANimCl/fybVZbXC7rzRBVJLkMmsFshlEh0CEt6oYlP+CnqzszyRC/cuOga+ggDg5wb1vlw==","shasum":"40353e7aeb60ebddf959c9965e7d17f0b872be82","tarball":"https://registry.npmjs.org/@abw/badger-codecs/-/badger-codecs-1.3.0.tgz","fileCount":17,"unpackedSize":1126455,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIQCmf9jyqq4TZsArGYCrtzho6R+PG/xQBl5rAAIToh1wfQIgboJ46mUJdq8K/2/fDUYXwU3352ZOtVujQB5sfYpJ7nE="}]},"_npmUser":{"name":"abw","email":"abw@wardley.org"},"directories":{},"maintainers":[{"name":"abw","email":"abw@wardley.org"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/badger-codecs_1.3.0_1763898498709_0.7566922311661799"},"_hasShrinkwrap":false}},"time":{"created":"2023-03-04T08:54:36.762Z","modified":"2025-11-23T11:48:19.130Z","1.0.1":"2023-03-04T08:54:37.001Z","1.0.2":"2023-03-09T10:36:16.992Z","1.0.3":"2023-04-20T09:47:24.908Z","1.2.0-ts-alpha":"2024-12-28T08:38:50.527Z","1.2.0-ts-alpha2":"2024-12-28T08:54:03.960Z","1.2.0":"2024-12-28T08:59:11.878Z","1.3.0":"2025-11-23T11:48:18.939Z"},"bugs":{"url":"https://github.com/abw/badger-codecs-js/issues"},"author":{"name":"Andy Wardley"},"license":"MIT","homepage":"https://github.com/abw/badger-codecs-js#readme","keywords":["badger","codecs","encode","decode","json","yaml","base64"],"repository":{"type":"git","url":"git+https://github.com/abw/badger-codecs-js.git"},"description":"Wrapper functions for encoding/decoding data","maintainers":[{"name":"abw","email":"abw@wardley.org"}],"readme":"# Badger Codecs\n\nThis implements a consistent interface for encoding and decoding data to and\nfrom various different formats.\n\n## Installation\n\nInstall `badger-codecs` using your favourite package manager.\n\n### npm\n\nnpm add @abw/badger-codecs\n\n### pnpm\n\npnpm add @abw/badger-codecs\n\n### yarn\n\nyarn add @abw/badger-codecs\n\n# Why?\n\nIf you want to encode/decode some data as JSON, you can do this:\n\n```js\nconst encoded = JSON.stringify(data);\nconst decoded = JSON.parse(encoded);\n```\n\nOr if you want to encode/decode some data as YAML, you can do this:\n\n```js\nimport yaml from 'js-yaml';\nconst encoded = yaml.dump(data);\nconst decoded = yaml.load(encoded);\n```\n\nThis module provides a `codec()` function for selecting a codec.  The codec\nreturned has `encode()` and `decode()` functions which are wrappers around\nthe appropriate code for the format.\n\nFor JSON:\n\n```js\nimport { codec } from '@abw/badger-codecs'\nconst myCodec = codec('json');\nconst encoded = myCodec.encode(data);\nconst decoded = myCodec.decode(encoded);\n```\n\nOr for YAML:\n\n```js\nimport { codec } from '@abw/badger-codecs'\nconst myCodec = codec('yaml');\nconst encoded = myCodec.encode(data);\nconst decoded = myCodec.decode(encoded);\n```\n\nThe only thing that needs to change is the line that selects the codec.\n\nA typical example of use is where you have a function that expects to be\npassed a data file.  You can look at the file extension so see if it's\n`.json` or `.yaml` and select the correct codec accordingly.  You don't need\nan `if/else` statement to run the right piece of code.  You just select a\ncodec using the file extension and then call its `encode()` and `decode()`\nfunctions.\n\n## Codecs\n\nThe `json` codec is for encoding/decoding JSON.\n\nThe `yaml` codec is for encoding/decoding YAML.\n\nThe `base64` codec is for encoding/decoding UTF8 text to and from Base64.\n\nThe `yml` codec is provided as an alias for `yaml`, and `jsn` as an alias for\n`json`.  It's quite common to see YAML files with a `.yml` extension so this\nsimplifies the process of selecting a codec using the file extension.  I've\nnever see a JSON file with a `.jsn` extension in the wild, but it's provided\nfor the sake of consistency.\n\n## Chained Codecs\n\nYou can chain multiple codecs together with `+`.  For example, a codec to\nJSON encode some data and then Base64 encode it would be `json+base64`.\n\n```js\nimport { codec } from '@abw/badger-codecs'\nconst myCodec = codec('json+base64');\nconst encoded = myCodec.encode(data);\nconst decoded = myCodec.decode(encoded);\n```\n\nThe `encode()` function will apply the `encode()` function for each of the\nchained codecs in sequence.  The `decode()` function will apply the\n`decode()` function for each of them, but in reverse order.\n\n## Codec Configuration\n\nThe `codec()` function takes an optional second argument as an object of\nconfiguration options.\n\nFor the `json` codec the only option is `space` to set the number of spaces\nfor the indent level.  The default is 2.\n\n```js\nimport { codec } from '@abw/badger-codecs'\n\nconst json = codec('json', { space: 4 });   // set space to 4\n```\n\nFor the `yaml` code the configuration options are used when encoding YAML.\nThese include `indent` for the indent level (default is 2) and any of the\nother options supported by the `dump()` method of\n[js-yaml](https://www.npmjs.com/package/js-yaml).\n\n```js\nimport { codec } from '@abw/badger-codecs'\n\nconst yaml = codec('yaml', { indent: 4 });\n```\n\n## Global Configuration\n\nThe `codecConfig()` function can be used to set the global configuration\ndefaults for a codec.  Note that any changes made will only affect codecs\ncreated after that point.  You can still override the defaults by providing\na configuration when you create the codec.\n\n```js\nimport { codec, codecConfig } from '@abw/badger-codecs'\n\nconst json2 = codec('json')                 // has default space of 2\n\ncodecConfig('json', { space: 4 })           // set default space to 4\n\nconst json4 = codec('json')                 // has default space of 4\nconst json3 = codec('json', { space: 3 })   // explicit space of 3\n```\n\n## Adding Codecs\n\nThe module exports an `addCodec()` function which can be used to register\na new codec.  It expects three or four arguments: the codec name, an\n`encode()` function, a `decode()` function and an optional `config()`\nfunction to set the configuration defaults.\n\nThis trivial example shows how a codec can be registered for \"encoding\" text\nas upper case, and then \"decoding\" it back to lower case.\n\n```js\nimport { addCodec } from '@abw/badger-codecs'\n\naddCodec(\n  'upper',\n  lower => lower.toUpperCase(),\n  upper => upper.toLowerCase(),\n)\n```\n\nYou can now use the codec like any other.\n\n```js\nimport { codec } from '@abw/badger-codecs'\nconst myCodec = codec('upper');\nconst encoded = myCodec.encode(\"hello\");    // => HELLO\nconst decoded = myCodec.decode(\"HELLO\");    // => hello\n```\n\n**NOTE:** For consistency, all codecs are stored with lower case names.\nThat means that `codec(\"JSON\")` and `codec(\"json\")` both return the same\ncodec.  You can register your codec with an upper or mixed case name if you\nreally want to, but be warned that internally it is converted to lower case.\nThe outcome is that you can't register two different codecs with names that\nonly differ in case.\n\n## Author\n\nAndy Wardley https://github.com/abw","readmeFilename":"README.md"}