trunkata
v0.2.1
Published
Truncation utility which preserves HTML content and can truncate by lines.
Downloads
16
Readme
trunkata
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.
Getting Started
Install the module with: npm install trunkata
var trunkata = require('trunkata');
trunkata.awesome(); // "awesome"
Documentation
(Coming soon)
Examples
(Coming soon)
Development
Use livereload
, listen-spawn -- npm run pretest
, and serve
. Then, navigate to http://localhost:3000/test/trunkata_test.html
Contributing
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 npm test
.
License
Copyright (c) 2013 Todd Wolfson
Licensed under the MIT license.