doctype-to-string
TypeScript icon, indicating that this package has built-in type declarations

0.1.4 • Public • Published

doctype-to-string

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">

Install

npm install "git+https://code.treora.com/gerben/doctype-to-string#latest"

..or

npm install doctype-to-string@latest

..or equivalent

Usage

import doctypeToString from 'doctype-to-string'

const string = doctypeToString(document.doctype)

Licence

CC0; do whatever you want with this code.

/doctype-to-string/

    Package Sidebar

    Install

    npm i doctype-to-string

    Weekly Downloads

    7

    Version

    0.1.4

    License

    CC0-1.0

    Unpacked Size

    3.64 kB

    Total Files

    5

    Last publish

    Collaborators

    • treora