{"_id":"excerpt-html","_rev":"287476","name":"excerpt-html","description":"Get the Excerpt from a markdown file (like in jekyll or *smith)","dist-tags":{"latest":"1.2.2"},"maintainers":[{"name":"leichtgewicht","email":"martin.heidegger@gmail.com"}],"time":{"modified":"2021-06-03T18:40:35.000Z","created":"2015-05-12T09:21:23.365Z","1.2.2":"2021-04-16T14:09:46.155Z","1.2.1":"2019-01-12T06:38:57.335Z","1.2.0":"2016-09-24T10:09:38.616Z","1.1.1":"2016-08-03T08:26:15.813Z","1.1.0":"2016-07-19T17:03:50.574Z","1.0.1":"2015-06-18T03:10:18.972Z","1.0.0":"2015-05-12T09:21:23.365Z"},"users":{"jhanstra":true},"author":{"name":"Martin Heidegger","email":"martin.heidegger@gmail.com"},"repository":{"type":"git","url":"git+https://github.com/martinheidegger/excerpt-html.git"},"versions":{"1.2.2":{"name":"excerpt-html","version":"1.2.2","description":"Get the Excerpt from a markdown file (like in jekyll or *smith)","main":"index.js","scripts":{"test":"npm run lint && tap test/**","ci":"npm run test -- --cov --coverage-report=lcov","quick":"tap test/**","coverage":"tap --coverage --coverage-report=html test/**","lint":"standard"},"keywords":["markdown","blog","excerpt","text-processing"],"author":{"name":"Martin Heidegger","email":"martin.heidegger@gmail.com"},"contributors":[{"name":"Tim Carry"}],"license":"MIT","dependencies":{"cheerio":"^0.22.0","he":"^1.1.0","lodash.truncate":"^4.4.2","striptags":"^3.1.1"},"devDependencies":{"standard":"^16.0.3","tap":"^15.0.2"},"repository":{"type":"git","url":"git+https://github.com/martinheidegger/excerpt-html.git"},"bugs":{"url":"https://github.com/martinheidegger/excerpt-html/issues"},"homepage":"https://github.com/martinheidegger/excerpt-html","gitHead":"074836ee9825342d04d7e36eb39af6c0adada15a","_id":"excerpt-html@1.2.2","_nodeVersion":"15.8.0","_npmVersion":"7.5.4","dist":{"shasum":"3a9531e386ae5e7dbeb69d58cbbc1790e7d0cc9d","size":4277,"noattachment":false,"key":"/excerpt-html/-/excerpt-html-1.2.2.tgz","tarball":"http://registry.cnpm.dingdandao.com/excerpt-html/download/excerpt-html-1.2.2.tgz"},"_npmUser":{"name":"leichtgewicht","email":"martin.heidegger@gmail.com"},"directories":{},"maintainers":[{"name":"leichtgewicht","email":"martin.heidegger@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/excerpt-html_1.2.2_1618582186005_0.3081300558769904"},"_hasShrinkwrap":false,"publish_time":1618582186155,"_cnpm_publish_time":1618582186155},"1.2.1":{"name":"excerpt-html","version":"1.2.1","description":"Get the Excerpt from a markdown file (like in jekyll or *smith)","main":"index.js","scripts":{"test":"npm run lint && tap test/**","ci":"npm run test -- --cov --coverage-report=lcov","quick":"tap test/**","coverage":"tap --coverage --coverage-report=html test/**","lint":"standard"},"keywords":["markdown","excerpt","text-prrocessing"],"author":{"name":"Martin Heidegger","email":"martin.heidegger@gmail.com"},"license":"ISC","dependencies":{"acorn":"^6.0.5","cheerio":"^0.22.0","he":"^1.1.0","lodash.truncate":"^4.3.0","striptags":"^2.2.1"},"devDependencies":{"standard":"^12.0.1","tap":"^12.1.1"},"repository":{"type":"git","url":"git+https://github.com/martinheidegger/excerpt-html.git"},"bugs":{"url":"https://github.com/martinheidegger/excerpt-html/issues"},"homepage":"https://github.com/martinheidegger/excerpt-html","gitHead":"b66d879adf14aeb3c245eae91bddcf239378f12b","_id":"excerpt-html@1.2.1","_npmVersion":"6.5.0","_nodeVersion":"10.3.0","_npmUser":{"name":"leichtgewicht","email":"martin.heidegger@gmail.com"},"dist":{"shasum":"76f42906020b6e4e1ec3f66ebc71f7f86bc614d5","size":4030,"noattachment":false,"key":"/excerpt-html/-/excerpt-html-1.2.1.tgz","tarball":"http://registry.cnpm.dingdandao.com/excerpt-html/download/excerpt-html-1.2.1.tgz"},"maintainers":[{"name":"leichtgewicht","email":"martin.heidegger@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/excerpt-html_1.2.1_1547275137230_0.09288490862622156"},"_hasShrinkwrap":false,"publish_time":1547275137335,"_cnpm_publish_time":1547275137335},"1.2.0":{"name":"excerpt-html","version":"1.2.0","description":"Get the Excerpt from a markdown file (like in jekyll or *smith)","main":"index.js","scripts":{"test":"npm run lint && tap --coverage test/**","quick":"tap test/**","coverage":"tap --coverage --coverage-report=html test/**","lint":"standard"},"keywords":["markdown","excerpt","text-prrocessing"],"author":{"name":"Martin Heidegger","email":"martin.heidegger@gmail.com"},"license":"ISC","dependencies":{"cheerio":"^0.20.0","he":"^1.1.0","lodash.truncate":"^4.3.0","striptags":"^2.1.1"},"devDependencies":{"standard":"^7.1.2","tap":"^6.2.0"},"repository":{"type":"git","url":"git+https://github.com/martinheidegger/excerpt-html.git"},"bugs":{"url":"https://github.com/martinheidegger/excerpt-html/issues"},"homepage":"https://github.com/martinheidegger/excerpt-html","gitHead":"1bcaceeacdfb347afa092a1f5ce3f09dab5a6a16","_id":"excerpt-html@1.2.0","_shasum":"bf8b1ada5473eb859916410f06ce12d0ef9c8fd8","_from":".","_npmVersion":"3.10.3","_nodeVersion":"6.5.0","_npmUser":{"name":"leichtgewicht","email":"martin.heidegger@gmail.com"},"dist":{"shasum":"bf8b1ada5473eb859916410f06ce12d0ef9c8fd8","size":2746,"noattachment":false,"key":"/excerpt-html/-/excerpt-html-1.2.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/excerpt-html/download/excerpt-html-1.2.0.tgz"},"maintainers":[{"name":"leichtgewicht","email":"martin.heidegger@gmail.com"}],"_npmOperationalInternal":{"host":"packages-12-west.internal.npmjs.com","tmp":"tmp/excerpt-html-1.2.0.tgz_1474711778389_0.2979634527582675"},"directories":{},"publish_time":1474711778616,"_cnpm_publish_time":1474711778616,"_hasShrinkwrap":false},"1.1.1":{"name":"excerpt-html","version":"1.1.1","description":"Get the Excerpt from a markdown file (like in jekyll or *smith)","main":"index.js","scripts":{"test":"npm run lint && tap --coverage test/**","quick":"tap test/**","coverage":"tap --coverage --coverage-report=html test/**","lint":"standard"},"keywords":["markdown","excerpt","text-prrocessing"],"author":{"name":"Martin Heidegger","email":"martin.heidegger@gmail.com"},"license":"ISC","dependencies":{"cheerio":"^0.20.0","he":"^1.1.0","lodash.truncate":"^4.3.0","striptags":"^2.1.1"},"devDependencies":{"standard":"^7.1.2","tap":"^6.2.0"},"repository":{"type":"git","url":"git+https://github.com/martinheidegger/excerpt-html.git"},"bugs":{"url":"https://github.com/martinheidegger/excerpt-html/issues"},"homepage":"https://github.com/martinheidegger/excerpt-html","gitHead":"48b567b2939af6789759bf98524cf2e9c59e13d4","_id":"excerpt-html@1.1.1","_shasum":"c96a80c49f9a0699840cc995184a57ccde589f59","_from":".","_npmVersion":"3.10.5","_nodeVersion":"5.11.1","_npmUser":{"name":"leichtgewicht","email":"martin.heidegger@gmail.com"},"dist":{"shasum":"c96a80c49f9a0699840cc995184a57ccde589f59","size":2666,"noattachment":false,"key":"/excerpt-html/-/excerpt-html-1.1.1.tgz","tarball":"http://registry.cnpm.dingdandao.com/excerpt-html/download/excerpt-html-1.1.1.tgz"},"maintainers":[{"name":"leichtgewicht","email":"martin.heidegger@gmail.com"}],"_npmOperationalInternal":{"host":"packages-12-west.internal.npmjs.com","tmp":"tmp/excerpt-html-1.1.1.tgz_1470212773933_0.4733371459878981"},"directories":{},"publish_time":1470212775813,"_cnpm_publish_time":1470212775813,"_hasShrinkwrap":false},"1.1.0":{"name":"excerpt-html","version":"1.1.0","description":"Get the Excerpt from a markdown file (like in jekyll or *smith)","main":"index.js","scripts":{"test":"npm run lint && tap --coverage test/**","quick":"tap test/**","coverage":"tap --coverage --coverage-report=html test/**","lint":"standard"},"keywords":["markdown","excerpt","text-prrocessing"],"author":{"name":"Martin Heidegger","email":"martin.heidegger@gmail.com"},"license":"ISC","dependencies":{"cheerio":"^0.20.0","lodash.truncate":"^4.3.0","lodash.unescape":"^4.0.0","striptags":"^2.1.1"},"devDependencies":{"standard":"^7.1.2","tap":"^6.2.0"},"repository":{"type":"git","url":"git+https://github.com/martinheidegger/excerpt-html.git"},"bugs":{"url":"https://github.com/martinheidegger/excerpt-html/issues"},"homepage":"https://github.com/martinheidegger/excerpt-html","gitHead":"20fed861573424a66097585f46cdf7f5d7eda80a","_id":"excerpt-html@1.1.0","_shasum":"eb1e5b2dec9e46452272a6244d3faebb9fd2924b","_from":".","_npmVersion":"3.9.6","_nodeVersion":"5.11.1","_npmUser":{"name":"leichtgewicht","email":"martin.heidegger@gmail.com"},"dist":{"shasum":"eb1e5b2dec9e46452272a6244d3faebb9fd2924b","size":2594,"noattachment":false,"key":"/excerpt-html/-/excerpt-html-1.1.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/excerpt-html/download/excerpt-html-1.1.0.tgz"},"maintainers":[{"name":"leichtgewicht","email":"martin.heidegger@gmail.com"}],"_npmOperationalInternal":{"host":"packages-16-east.internal.npmjs.com","tmp":"tmp/excerpt-html-1.1.0.tgz_1468947828173_0.993234705645591"},"directories":{},"publish_time":1468947830574,"_cnpm_publish_time":1468947830574,"_hasShrinkwrap":false},"1.0.1":{"name":"excerpt-html","version":"1.0.1","description":"Get the Excerpt from a markdown file (like in jekyll or *smith)","main":"index.js","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"keywords":["markdown","excerpt","text-prrocessing"],"author":{"name":"Martin Heidegger","email":"martin.heidegger@gmail.com"},"license":"ISC","dependencies":{"cheerio":"^0.19.0","underscore.string":"^3.0.3"},"devDependencies":{},"repository":{"type":"git","url":"git+https://github.com/martinheidegger/excerpt-html.git"},"bugs":{"url":"https://github.com/martinheidegger/excerpt-html/issues"},"homepage":"https://github.com/martinheidegger/excerpt-html","gitHead":"0264891d17129a5e55c2f141618a309b3f98b8de","_id":"excerpt-html@1.0.1","_shasum":"600dc92fddae9c565d07ab901c2294fc3f2077e8","_from":".","_npmVersion":"2.11.0","_nodeVersion":"2.2.1","_npmUser":{"name":"leichtgewicht","email":"mh@leichtgewicht.at"},"maintainers":[{"name":"leichtgewicht","email":"martin.heidegger@gmail.com"}],"dist":{"shasum":"600dc92fddae9c565d07ab901c2294fc3f2077e8","size":1740,"noattachment":false,"key":"/excerpt-html/-/excerpt-html-1.0.1.tgz","tarball":"http://registry.cnpm.dingdandao.com/excerpt-html/download/excerpt-html-1.0.1.tgz"},"directories":{},"publish_time":1434597018972,"_cnpm_publish_time":1434597018972,"_hasShrinkwrap":false},"1.0.0":{"name":"excerpt-html","version":"1.0.0","description":"Get the Excerpt from a markdown file (like in jekyll or *smith)","main":"index.js","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"keywords":["markdown","excerpt","text-prrocessing"],"author":{"name":"Martin Heidegger","email":"martin.heidegger@gmail.com"},"license":"ISC","dependencies":{"cheerio":"^0.19.0","underscore.string":"^3.0.3"},"devDependencies":{},"repository":{"type":"git","url":"https://github.com/martinheidegger/excerpt-html.git"},"bugs":{"url":"https://github.com/martinheidegger/excerpt-html/issues"},"homepage":"https://github.com/martinheidegger/excerpt-html","gitHead":"293bd39c332a371f0d17976fc06a1e607a99e080","_id":"excerpt-html@1.0.0","_shasum":"7ac2919ff610ad1310b2b013f0efaf92584b86b4","_from":".","_npmVersion":"2.7.4","_nodeVersion":"0.12.2","_npmUser":{"name":"leichtgewicht","email":"mh@leichtgewicht.at"},"maintainers":[{"name":"leichtgewicht","email":"martin.heidegger@gmail.com"}],"dist":{"shasum":"7ac2919ff610ad1310b2b013f0efaf92584b86b4","size":1836,"noattachment":false,"key":"/excerpt-html/-/excerpt-html-1.0.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/excerpt-html/download/excerpt-html-1.0.0.tgz"},"directories":{},"publish_time":1431422483365,"_cnpm_publish_time":1431422483365,"_hasShrinkwrap":false}},"readme":"[![Build Status](https://travis-ci.org/martinheidegger/excerpt-html.svg?branch=master)](https://travis-ci.org/martinheidegger/excerpt-html)\n[![js-standard-style](https://img.shields.io/badge/code%20style-standard-brightgreen.svg)](http://standardjs.com/)\n[![Maintainability](https://api.codeclimate.com/v1/badges/d1b611efce3f2c6eeb98/maintainability)](https://codeclimate.com/github/martinheidegger/excerpt-html/maintainability)\n[![Test Coverage](https://api.codeclimate.com/v1/badges/d1b611efce3f2c6eeb98/test_coverage)](https://codeclimate.com/github/martinheidegger/excerpt-html/test_coverage)\n\n# excerpt-html\n\nparses a given html text for a good excerpt.\n\n# Install\n\n```\n$ npm i excerpt-html --save\n```\n\n# API usage\n\n```JavaScript\nvar htmlCode = '<p>Hello world</p>';\nvar excerptHtml = require('excerpt-html');\nvar excerpt = excerptHtml(htmlCode);\n```\n\nIt will either use the first found paragraph or everything up to a \n\n`<!-- more -->`\n\n# Options\n\nYou can specify a few options that modify the way the excerpt is parsed:\n\n``` JavaScript\nexcerptHtml(htmlCode, {\n    moreRegExp:  /\\s*<!--\\s*more\\s*-->/i,  // Search for the slug\n    stripTags:   true, // Set to false to get html code\n    pruneLength: 140, // Amount of characters that the excerpt should contain\n    pruneString: '…', // Character that will be added to the pruned string\n    pruneSeparator: ' ', // Separator to be used to separate words\n})\n```\n\nNote: `pruneLength` and `prunestring` only work when `stripTags` is set to `true` (default).\n\n# History\n\nTo make this project we detached the code of [metalsmith-better-excerpts](https://github.com/simbo/metalsmith-better-excerpts) from `metalsmith`.\n\n\n\n","_attachments":{},"homepage":"https://github.com/martinheidegger/excerpt-html","bugs":{"url":"https://github.com/martinheidegger/excerpt-html/issues"},"license":"MIT"}