src | 6 years ago |
test | 6 years ago |
.gitignore | 6 years ago |
Readme.md | 6 years ago |
package-lock.json | 6 years ago |
package.json | 6 years ago |
Convert a DOM DocumentType (usually obtained via document.doctype
) into a string, e.g.:
<!DOCTYPE html>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
npm install doctype-to-string
import doctypeToString from 'doctype-to-string'
const string = doctypeToString(document.doctype)
CC0; do whatever you want with this code.