{"_id":"encoding@0.1.14","bugs":{"url":"https://github.com/andris9/encoding/issues"},"dist":{"shasum":"47d9de5315bdfd36258c9bde2146592acf061328","tarball":"http://registry-npm.ywwl.com/encoding/download/encoding-0.1.14.tgz","fileCount":4,"integrity":"sha512-pqH+jIxIhwX5U4w+Tnu3jjowTo5QTACbqef2C5Cw2RhApr7COQqgnai53u8VbtqjWRcSoAcTf7uZ62dO5kC8Iw==","signatures":[{"sig":"MEUCIQCoSXTm0K7h2/JTdh3+MBIDMd7W2ecZOIpKxJ/0/dFMZgIgBWkHOloDg5a3eaSNf7haxmoi33IF/HM1hhimIEGPuVo=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"},{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEQCIDhdtLzP2zUFnDtC7Km3x8xtnEokk1OtMuwexkjFWItRAiB4gopqbo/T5mlV7hHnsSaLA2GaCng++OHnbvVuwi7Ghw=="}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/encoding@0.1.14","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":5510,"size":2455,"noattachment":false,"key":"/encoding/-/encoding-0.1.14.tgz"},"main":"lib/encoding.js","name":"encoding","author":{"name":"Andris Reinman"},"engines":{"node":">=20.0.0"},"gitHead":"194a75ed78b679968d75694f2b056808dac870af","license":"MIT","scripts":{"lint":"eslint .","test":"node --test test/test.js","format":"prettier --write .","update":"rm -rf node_modules package-lock.json && ncu -u && npm install","lint:fix":"eslint . --fix","test:cjs":"NODE_OPTIONS=--no-experimental-require-module npm test","format:check":"prettier --check .","test:coverage":"c8 npm test"},"version":"0.1.14","_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"a7a14c79-f3d7-4cf2-ab99-dab664b68d2b"}},"homepage":"https://github.com/andris9/encoding#readme","repository":{"url":"git+https://github.com/andris9/encoding.git","type":"git"},"_npmVersion":"11.19.0","description":"Convert encodings, uses iconv-lite","directories":{},"maintainers":[{"name":"andris","email":"andris@kreata.ee"}],"_nodeVersion":"24.21.0","dependencies":{"iconv-lite":"0.7.3"},"_hasShrinkwrap":false,"devDependencies":{"c8":"12.0.0","eslint":"10.13.0","globals":"17.13.0","prettier":"3.9.10","@eslint/js":"10.0.1","eslint-config-prettier":"10.1.8"},"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/encoding_0.1.14_1792667926673_0.9168002814294973"},"readme":"# Encoding\n\n**encoding** is a simple wrapper around [iconv-lite](https://github.com/ashtuchkin/iconv-lite/) to convert strings from one encoding to another.\n\n[![Run tests](https://github.com/andris9/encoding/actions/workflows/test.yml/badge.svg)](https://github.com/andris9/encoding/actions/workflows/test.yml)\n[![npm version](https://badge.fury.io/js/encoding.svg)](http://badge.fury.io/js/encoding)\n\nInitially _encoding_ was a wrapper around _node-iconv_ (main) and _iconv-lite_ (fallback) and was used as the encoding layer for Nodemailer/mailparser. Somehow it also ended up as a dependency for a bunch of other project, none of these actually using _node-iconv_. The loading mechanics caused issues for front-end projects and Nodemailer/malparser had moved on, so _node-iconv_ was removed.\n\n## Install\n\nInstall through npm\n\n    npm install encoding\n\n## Usage\n\nRequire the module\n\n    var encoding = require(\"encoding\");\n\nConvert with encoding.convert()\n\n    var resultBuffer = encoding.convert(text, toCharset, fromCharset);\n\nWhere\n\n- **text** is either a Buffer or a String to be converted\n- **toCharset** is the characterset to convert the string\n- **fromCharset** (_optional_, defaults to UTF-8) is the source charset\n\nOutput of the conversion is always a Buffer object.\n\nExample\n\n    var result = encoding.convert(\"ÕÄÖÜ\", \"Latin_1\");\n    console.log(result); //<Buffer d5 c4 d6 dc>\n\n## License\n\n**MIT**\n","publish_time":1792667926752,"_cnpm_publish_time":1792667926752,"dist-tags":{"latest":"0.1.14"}}