1.0.5 • Published 9 years ago

trim-html-tag v1.0.5

Weekly downloads
4,130
License
MIT
Repository
github
Last release
9 years ago

trim-html-tag

NPM version Build Status Coveralls Status Dependency Status

trim html tag from input

Install

npm install --save trim-html-tag

Usage

import trimTag from 'trim-html-tag';

trimTag('<p> trimP </p>\n');    // trimP
trimTag('<h1> trimH1 </h1>\n'); // trimH1
trimTag('<h1 class="asd"> trimH1 </h1>\n'); // trimH1
trimTag('<p>stringified <em>stay here</em></h1>\n'); // stringified <em>stay here</em>

trimTag();       // undefined ¯\_(ツ)_/¯
trimTag('some'); // some

API

trimTag(input)

input

Required
Type: String

One stringified HTML node, from which you want to trim the tag (e.g. <p>inside</p> or <h1>also inside</h1>).

License

MIT © Vladimir Starkov

1.0.5

9 years ago

1.0.4

9 years ago

1.0.3

9 years ago

1.0.1

9 years ago

1.0.0

9 years ago

0.0.1

9 years ago