{"_id":"planer","_rev":"10-8c7a75034951e0efb40e4d4219c9a024","name":"planer","description":"Remove reply quotations from emails","dist-tags":{"latest":"1.2.0"},"versions":{"1.0.0":{"name":"planer","version":"1.0.0","description":"Remove reply quotations from emails","main":"lib/planer.js","publishConfig":{"registry":"http://registry.npmjs.org/"},"scripts":{"test":"mocha test/","compile":"coffee -o lib -c src"},"repository":{"type":"git","url":"git+https://github.com/lever/planer.git"},"keywords":["email","quotations","reply","talon"],"author":{"name":"Leighton Wallace","url":"https://github.com/l8on"},"license":"MIT","bugs":{"url":"https://github.com/lever/planer/issues"},"homepage":"https://github.com/lever/planer#readme","devDependencies":{"chai":"^3.4.1","coffee-script":"^1.10.0","jsdom":"^3.1.2","mocha":"^2.3.4"},"gitHead":"a0406af8d5c74512f22de4d2f2aae952817ac22a","_id":"planer@1.0.0","_shasum":"fe3d26ee44b8241e89e41babdbc7bb5cd226b1d8","_from":".","_npmVersion":"2.14.13","_nodeVersion":"0.10.26","_npmUser":{"name":"l8on","email":"lwallace@gmail.com"},"dist":{"shasum":"fe3d26ee44b8241e89e41babdbc7bb5cd226b1d8","tarball":"https://registry.npmjs.org/planer/-/planer-1.0.0.tgz","integrity":"sha512-568hu5IT1b8u3Uxgwo8z1jA0CqNuXqdm95fTBr5SgwZy3d3PrWIVHQnHKnhdWAKq4q8zMzGbdpVocTpTbh/yTg==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIFGMKgWI5TwtjT/R0UmttCeRgPzQ7pH8eIY2krdGU4SIAiEAocAKL/h/k0JLto5Z6E+MvryRbHP9+HFAWruBQWNUeQQ="}]},"maintainers":[{"name":"l8on","email":"lwallace@gmail.com"}],"directories":{}},"1.0.1":{"name":"planer","version":"1.0.1","description":"Remove reply quotations from emails","main":"lib/planer.js","publishConfig":{"registry":"http://registry.npmjs.org/"},"scripts":{"test":"mocha test/","compile":"coffee -o lib -c src"},"repository":{"type":"git","url":"git+https://github.com/lever/planer.git"},"keywords":["email","quotations","reply","talon"],"author":{"name":"Leighton Wallace","url":"https://github.com/l8on"},"license":"MIT","bugs":{"url":"https://github.com/lever/planer/issues"},"homepage":"https://github.com/lever/planer#readme","devDependencies":{"chai":"^3.4.1","coffee-script":"^1.10.0","jsdom":"^3.1.2","mocha":"^2.3.4"},"gitHead":"0240526f8454669326b9348d1f5455274be400bf","_id":"planer@1.0.1","_shasum":"f42352990f90764a17527ec27b2d66c647757da2","_from":".","_npmVersion":"2.14.13","_nodeVersion":"0.10.26","_npmUser":{"name":"l8on","email":"lwallace@gmail.com"},"dist":{"shasum":"f42352990f90764a17527ec27b2d66c647757da2","tarball":"https://registry.npmjs.org/planer/-/planer-1.0.1.tgz","integrity":"sha512-MDRsWVl4vzvMEcdvhdNmv3nX5+kK2OiGHFO9GM5LhhWXprhpMC9qLxmXS9kCI+Cz2pST/TDPqtDtLSir4JuoGQ==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIATfILsHIpDvB0q2Cfpxhe1VnpoWjksyNUa49AAro8IOAiBsARGbf97EzBHLNesfK0EOK1O/fyDe2viP5vlSFN8K8w=="}]},"maintainers":[{"name":"l8on","email":"lwallace@gmail.com"}],"directories":{}},"1.0.2":{"name":"planer","version":"1.0.2","description":"Remove reply quotations from emails","main":"lib/planer.js","publishConfig":{"registry":"http://registry.npmjs.org/"},"scripts":{"test":"mocha test/","compile":"coffee -o lib -c src"},"repository":{"type":"git","url":"git+https://github.com/lever/planer.git"},"keywords":["email","quotations","reply","talon"],"author":{"name":"Leighton Wallace","url":"https://github.com/l8on"},"license":"MIT","bugs":{"url":"https://github.com/lever/planer/issues"},"homepage":"https://github.com/lever/planer#readme","devDependencies":{"chai":"^3.4.1","coffee-script":"^1.10.0","jsdom":"^3.1.2","mocha":"^2.3.4"},"gitHead":"6d42532b8ee8157899bb175b85ebbbdc4f5bc7be","_id":"planer@1.0.2","_shasum":"f4a4d858a4c697960009b5856880d00afa519c49","_from":".","_npmVersion":"2.14.13","_nodeVersion":"0.10.26","_npmUser":{"name":"l8on","email":"lwallace@gmail.com"},"dist":{"shasum":"f4a4d858a4c697960009b5856880d00afa519c49","tarball":"https://registry.npmjs.org/planer/-/planer-1.0.2.tgz","integrity":"sha512-VSZOMnfn1qOMSJLM7HP5matWPyo6WLiu91OZ63J7y+sxSj6RSQrXYQ3RJ9xWC/rAo1+uk2ocj3Uv6h/s4eg8Qg==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQD/HIp+xgLrj/53LgTsHwsa0KCI63xGybgPccQoWkSIowIhAIMatl37E7OkKtgH7ymrju4ynL4nUcvlskARwvcIKB49"}]},"maintainers":[{"name":"l8on","email":"lwallace@gmail.com"}],"directories":{}},"1.0.4":{"name":"planer","version":"1.0.4","description":"Remove reply quotations from emails","main":"lib/planer.js","publishConfig":{"registry":"http://registry.npmjs.org/"},"scripts":{"test":"mocha test/","compile":"coffee -o lib -c src"},"repository":{"type":"git","url":"git+https://github.com/lever/planer.git"},"keywords":["email","quotations","reply","talon"],"author":{"name":"Leighton Wallace","url":"https://github.com/l8on"},"license":"MIT","bugs":{"url":"https://github.com/lever/planer/issues"},"homepage":"https://github.com/lever/planer#readme","devDependencies":{"chai":"^3.4.1","coffee-script":"^1.10.0","jsdom":"^3.1.2","mocha":"^2.3.4"},"gitHead":"9cc0a1f59e79f8eb38005c7b81cfbdabd61f1e15","_id":"planer@1.0.4","_shasum":"d5473b1b845e4036e3ca9589f80eb401e9b3cf03","_from":".","_npmVersion":"2.14.13","_nodeVersion":"0.10.26","_npmUser":{"name":"l8on","email":"lwallace@gmail.com"},"dist":{"shasum":"d5473b1b845e4036e3ca9589f80eb401e9b3cf03","tarball":"https://registry.npmjs.org/planer/-/planer-1.0.4.tgz","integrity":"sha512-NwsG7sqSwMGFBpwZXAMg3jtXWx33tsZsbCpaZMTLZaJyh66tJrmNkfXLE0XLeb3AbBliJ2Erl62edmGdOVzVGg==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCDaNGVFSFx3W9cjaFji3LCIqPq4RzAy2yTIEjM/ATiHQIgMgVWamZts9r9vwp8Lg1i+evddPCypHjFlZHwCeVyOys="}]},"maintainers":[{"name":"l8on","email":"lwallace@gmail.com"}],"directories":{}},"1.1.0":{"name":"planer","version":"1.1.0","description":"Remove reply quotations from emails","main":"lib/planer.js","publishConfig":{"registry":"http://registry.npmjs.org/"},"scripts":{"test":"mocha test/","compile":"coffee -o lib -c src"},"repository":{"type":"git","url":"git+https://github.com/lever/planer.git"},"keywords":["email","quotations","reply","talon"],"author":{"name":"Leighton Wallace","url":"https://github.com/l8on"},"license":"MIT","bugs":{"url":"https://github.com/lever/planer/issues"},"homepage":"https://github.com/lever/planer#readme","devDependencies":{"chai":"^3.4.1","coffee-script":"^1.10.0","jsdom":"^8.1.0","mocha":"^2.3.4"},"gitHead":"1da361614dd5467dbc7d268005aa815b28f21f44","_id":"planer@1.1.0","_shasum":"70de5b22c9c2f36db892b5987a6de26aa61e30ec","_from":".","_npmVersion":"2.15.11","_nodeVersion":"4.8.5","_npmUser":{"name":"l8on","email":"lwallace@gmail.com"},"dist":{"shasum":"70de5b22c9c2f36db892b5987a6de26aa61e30ec","tarball":"https://registry.npmjs.org/planer/-/planer-1.1.0.tgz","integrity":"sha512-vER4WdOxqGkiBXs6AkQykOpi+RkUKYMW0jUG+n8pO1rrgHb7tVGZ7Q9/DZJJYTLFC3Cz0XuqZa26zRlSUkux6g==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQD28pTFeCkoQl0rOdYuMwCY2t0KEuQPHkJduXqi6nmQywIgdZ2YIWz+bMawNKKRyUhG/5Aph6d7+SjO0EmxchpeXfw="}]},"maintainers":[{"name":"l8on","email":"lwallace@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/planer-1.1.0.tgz_1511390449727_0.1091468099039048"},"directories":{}},"1.1.1":{"name":"planer","version":"1.1.1","description":"Remove reply quotations from emails","main":"lib/planer.js","publishConfig":{"registry":"http://registry.npmjs.org/"},"scripts":{"test":"mocha test/","compile":"coffee -o lib -c src"},"repository":{"type":"git","url":"git+https://github.com/lever/planer.git"},"keywords":["email","quotations","reply","talon"],"author":{"name":"Leighton Wallace","url":"https://github.com/l8on"},"license":"MIT","bugs":{"url":"https://github.com/lever/planer/issues"},"homepage":"https://github.com/lever/planer#readme","devDependencies":{"chai":"^3.4.1","coffee-script":"^1.10.0","jsdom":"^11.6.0","mocha":"^2.3.4"},"gitHead":"1f47e26e29cc09411dff5c523d6698ffcb240f25","_id":"planer@1.1.1","_shasum":"8b0e935cd11b0ff10aaec8d91f0825e2d52c07f2","_from":".","_npmVersion":"2.15.11","_nodeVersion":"4.8.5","_npmUser":{"name":"l8on","email":"lwallace@gmail.com"},"dist":{"shasum":"8b0e935cd11b0ff10aaec8d91f0825e2d52c07f2","tarball":"https://registry.npmjs.org/planer/-/planer-1.1.1.tgz","integrity":"sha512-I/Ju7YNzBDdPY7H7nEcKuk0JBUpJxZr9RJa6/vD9h4VO2qjIx1v7MIYppD+ATIdMqG2g8NP7PqVUoNupyHkCwQ==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCDtKbwzdmqWVA4oQnfvKRkgLe80qTntV/hGolj7Z/zDgIgYDM2BVISFRvXmXa9f2Jwh4fBScNtQe4tI4MZ+9crbuA="}]},"maintainers":[{"name":"l8on","email":"lwallace@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/planer-1.1.1.tgz_1517865969869_0.40126018808223307"},"directories":{}},"1.2.0":{"name":"planer","version":"1.2.0","description":"Remove reply quotations from emails","main":"lib/planer.js","publishConfig":{"registry":"https://registry.npmjs.org/"},"scripts":{"test":"mocha test/","compile":"coffee -o lib -c src"},"repository":{"type":"git","url":"git+https://github.com/lever/planer.git"},"keywords":["email","quotations","reply","talon"],"author":{"name":"Leighton Wallace","url":"https://github.com/l8on"},"license":"MIT","bugs":{"url":"https://github.com/lever/planer/issues"},"homepage":"https://github.com/lever/planer#readme","devDependencies":{"chai":"^3.4.1","coffee-script":"^1.10.0","jsdom":"^11.6.0","mocha":"^2.3.4"},"gitHead":"1876a462bb82f3b774321c72d67414e265842f61","_id":"planer@1.2.0","_nodeVersion":"18.18.1","_npmVersion":"6.14.16","dist":{"integrity":"sha512-XhP/YeTk2eSfo7SvLstlKXQaxoDVc/Z46cIhl015rPcByZm0Uj2pk6GYUclETiB2oZGK1Ke+XdsjRTuMwjkcxA==","shasum":"f11cd8f1a43829a39b5840ab60b6ff157b70302e","tarball":"https://registry.npmjs.org/planer/-/planer-1.2.0.tgz","fileCount":17,"unpackedSize":104641,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIEbz9Nhv4hZ3ShGhUZd6AnGSiMm/IxaN0JCzXUMaxvMmAiBL/hy+85yeA7QEVUTsR4+vyhLUjsjT45XA1Wim+jyELA=="}]},"_npmUser":{"name":"distracteddev","email":"lalkaka.zeus@gmail.com"},"directories":{},"maintainers":[{"name":"distracteddev","email":"lalkaka.zeus@gmail.com"},{"name":"l8on","email":"lwallace@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/planer_1.2.0_1702923686234_0.610252482362104"},"_hasShrinkwrap":false}},"readme":"# planer\nRemove reply quotations from emails.\n\nAt [lever](https://github.com/lever) we are into simple machines. \nA planer removes some material to flatten out a rough surface, which seemed appropriate for a module that smooths out an email to extract the actual message.\n\nThis is essentially a javascript port of Mailgun's awesome [`talon`](https://github.com/mailgun/talon) python library.\nPlaner does not do signatures, though there is a [node port](https://github.com/lmtm/node-talon) of that part of talon.\n\n# Installation\nUse npm to install planer (add `-g` if you would like it to be global):\n\n`npm install planer`\n\n# Usage\n\n_Important_: planer accepts an injected [Document](https://developer.mozilla.org/en-US/docs/Web/API/Document) object to perform html parsing.\nYou can use `window.document` in a browser, or something akin to `jsdom` on the server. \nWe use `jsdom` in our test suite.\n\nTo extract the message from a plain text email:\n```\nplaner = require('planer');\n\nmsgBody = \"Reply!\\n\\nOn 15-Dec-2011, at 6:54 PM, Sean Carter <s.carter@example.com> wrote:\\n> It's the ROC!\\n>-Sean\";\nactualMessage = planer.extractFrom(msgBody, 'text/plain');\nconsole.log(actualMessage); # \"Reply!\"\n```\n\nTo extract the message from an html email:\n```\nplaner = require('planer');\n\nmsgBody = 'Reply!\\n<div>\\nOn 11-Apr-2011, at 6:54 PM, Bob &lt;bob@example.com&gt; wrote:\\n</div>\\n<blockquote>\\n<div>\\nTest\\n</div>\\n</blockquote>';\nactualMessage = planer.extractFrom(msgBody, 'text/html', window.document);\nconsole.log(actualMessage) # \"<html><body>Reply!\\n</body></html>\";\n```\n\n# Contributing\n\nContributions are of course encouraged.\nKeep in mind that the source is the `coffee` files; the `js` files in `/lib` are kept around for convenience.\n\nWrite tests for any new functionality.\nRun `npm run compile` to compile the source into javascript files before submitting a pull request.\n\n\n# MIT Licence\n\nCopyright (c) 2015 Leighton Wallace\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n","maintainers":[{"name":"distracteddev","email":"lalkaka.zeus@gmail.com"},{"name":"l8on","email":"lwallace@gmail.com"}],"time":{"modified":"2023-12-18T18:21:26.605Z","created":"2015-12-16T00:41:01.993Z","1.0.0":"2015-12-16T00:41:01.993Z","1.0.1":"2016-01-15T03:11:04.122Z","1.0.2":"2016-01-15T03:12:55.477Z","1.0.4":"2016-01-19T09:31:40.966Z","1.1.0":"2017-11-22T22:40:49.836Z","1.1.1":"2018-02-05T21:26:10.186Z","1.2.0":"2023-12-18T18:21:26.402Z"},"homepage":"https://github.com/lever/planer#readme","keywords":["email","quotations","reply","talon"],"repository":{"type":"git","url":"git+https://github.com/lever/planer.git"},"author":{"name":"Leighton Wallace","url":"https://github.com/l8on"},"bugs":{"url":"https://github.com/lever/planer/issues"},"license":"MIT","readmeFilename":"README.md"}