npm.io
2.0.0 • Published 8 years ago

parse-html-df

Licence
MIT
Version
2.0.0
Deps
0
Size
3 kB
Vulns
0
Weekly
0

parse-html-df

なにこれ

HTML string -> documentFragment

使い方

$ npm i parse-html-df
import parseHTML from 'parse-html-df';

// or dynamic-import, CDN
const {default: parseHTML} = await import('https://cdn.rawgit.com/honeo/parse-html-df/master/index.mjs');


const df = parseHTML('hoge<div class="fuga"><span class="piyo">foobar</span></div>');
document.body.append(df);
<body>
	...
	"hoge"
	<div class="fuga">
		<span class="piyo">foobar</span>
	</div>
<body>

Keywords