Sitelet https://github.com/plexis-js/plexis/tree/master/packages/withoutHTML
Skip to content

Latest commit

 

History

History

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 

@plexis/withoutHTML

Removes HTML tags from the input text.

Installation npm i @plexis/without-html

Usage

import withoutHTML from '@plexis/without-html';

withoutHTML('Hello world'); // => 'Hello world'
withoutHTML('<p>Hello</p> world'); // => ' world'
withoutHTML('<p Hello world'); // => '<p Hello world'
withoutHTML('<p id="">Hello world</p>'); // => ''
withoutHTML('<p id="" Hello world</p> <b></b> from the underground'); // => ' from the underground'

Aliases

import withoutHTML from '@plexis/without-html';
import {withoutHTML, removeHTML} from 'plexis';