{"name":"libqp","version":"2.1.1","description":"Encode and decode quoted-printable strings according to rfc2045","main":"lib/libqp.js","scripts":{"test":"node --test","update":"rm -rf node_modules package-lock.json && ncu -u && npm install"},"repository":{"type":"git","url":"git://github.com/nodemailer/libqp.git"},"keywords":["quoted-printable","mime"],"author":{"name":"Andris Reinman"},"license":"MIT","bugs":{"url":"https://github.com/nodemailer/libqp/issues"},"homepage":"https://github.com/nodemailer/libqp","devDependencies":{"eslint-config-nodemailer":"1.2.0","eslint-config-prettier":"9.1.0"},"_id":"libqp@2.1.1","gitHead":"5babf64f46280dd91d8410d950baf2cfcaecdc7c","_nodeVersion":"20.18.1","_npmVersion":"10.8.2","dist":{"integrity":"sha512-0Wd+GPz1O134cP62YU2GTOPNA7Qgl09XwCqM5zpBv87ERCXdfDtyKXvV7c9U22yWJh44QZqBocFnXN11K96qow==","shasum":"f1be767a58f966f500597997cab72cfc1e17abfa","tarball":"http://registry-npm.ywwl.com/libqp/download/libqp-2.1.1.tgz","fileCount":11,"unpackedSize":22312,"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/libqp@2.1.1","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIHJh+Lcf5NSq1Lud9gkly3FxQusfIb8MaKaCf/YgPnlSAiByMoe8Ia+l0HeVn+A16aJ/mQ0IF2ZK3J+MJT4pOyE6FA=="}],"size":6401,"noattachment":false,"key":"/libqp/-/libqp-2.1.1.tgz"},"_npmUser":{"name":"andris","email":"andris@kreata.ee"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/libqp_2.1.1_1732871564596_0.7160694967275929"},"_hasShrinkwrap":false,"readme":"# libqp\n\nEncode and decode quoted-printable strings according to [RFC2045](http://tools.ietf.org/html/rfc2045#section-6.7).\n\n## Usage\n\nInstall with npm\n\n```\nnpm install libqp\n```\n\nRequire in your script\n\n```javascript\nconst libqp = require('libqp');\n```\n\n### Encode values\n\nEncode Buffer objects or unicode strings with\n\n```\nlibqp.encode(val) → String\n```\n\nWhere\n\n-   **val** is a Buffer or an unicode string\n\n**Example**\n\n```javascript\nlibqp.encode('jõgeva');\n// j=C3=B5geva\n```\n\n### Wrap encoded values\n\nQuoted-Printable encoded lines are limited to 76 characters but `encode` method might return lines longer than the limit.\n\nTo enforce soft line breaks on lines longer than 76 (or any other length) characters, use `wrap`\n\n```\nlibqp.wrap(str[, lineLength]) → String\n```\n\nWhere\n\n-   **str** is a Quoted-Printable encoded string\n-   **lineLength** (defaults to 76) is the maximum allowed line length. Any longer line will be soft wrapped\n\n**Example**\n\n```javascript\nlibqp.wrap('abc j=C3=B5geva', 10);\n// abc j=\\r\\n\n// =C3=B5geva\n```\n\n### Transform Streams\n\n`libqp` makes it possible to encode and decode streams with `libqp.Encoder` and `libqp.Decoder` constructors.\n\n### Encoder Stream\n\nCreate new Encoder Stream with\n\n```\nconst encoder = new libqp.Encoder([options])\n```\n\nWhere\n\n-   **options** is the optional stream options object with an additional option `lineLength` if you want to use any other line length than the default 76 characters (or set to `false` to turn the soft wrapping off completely)\n\n**Example**\n\nThe following example script reads in a file, encodes it to Quoted-Printable and saves the output to a file.\n\n```javascript\nvar libqp = require('libqp');\nvar fs = require('fs');\nvar source = fs.createReadStream('source.txt');\nvar encoded = fs.createReadStream('encoded.txt');\nvar encoder = new libqp.Encoder();\n\nsource.pipe(encoder).pipe(encoded);\n```\n\n### Decoder Stream\n\nCreate new Decoder Stream with\n\n```\nconst decoder = new libqp.Decoder([options])\n```\n\nWhere\n\n-   **options** is the optional stream options object\n\n**Example**\n\nThe following example script reads in a file in Quoted-Printable encoding, decodes it and saves the output to a file.\n\n```javascript\nconst libqp = require('libqp');\nconst fs = require('fs');\nlet encoded = fs.createReadStream('encoded.txt');\nlet dest = fs.createReadStream('dest.txt');\nlet decoder = new libqp.Decoder();\n\nencoded.pipe(decoder).pipe(dest);\n```\n\n## License\n\n**MIT**\n","publish_time":1732871564776,"maintainers":[{"name":"andris","email":"andris@kreata.ee"}],"_cnpm_publish_time":1732871564776,"dist-tags":{"latest":"3.0.2"}}