Truncation utility which preserves HTML content and can truncate by lines.
Truncation utility which preserves HTML tags and content.
This library was created to solve truncating HTML at line breaks rather than at a character index or word. Line breaks are preferred due to the inconsistency of font sizes between browsers.
Install the module with:
npm install trunkata
var trunkata = require'trunkata';trunkataawesome; // "awesome"
listen-spawn -- npm run pretest, and
serve. Then, navigate to http://localhost:3000/test/trunkata_test.html
In lieu of a formal styleguide, take care to maintain the existing coding style. Add unit tests for any new or changed functionality. Lint via grunt and test via
Copyright (c) 2013 Todd Wolfson
Licensed under the MIT license.