0.2.1 • Published 11 years ago

trunkata v0.2.1

Weekly downloads
45
License
-
Repository
github
Last release
11 years ago

trunkata Donate on Gittip

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.