2.1.6 • Published 3 years ago

html-encode v2.1.6

Weekly downloads
385
License
MIT
Repository
github
Last release
3 years ago

html-encode

Last version Build Status Coverage Status NPM Status

A Node.js library for converting HTML documents of arbitrary encoding into a target encoding (utf8, utf16, etc).

Install

$ npm install html-encode

Usage

'use strict'

const got = require('got')
const toUTF8 = require('html-encode')('utf-8')
const url = process.argv[2]

;(async () => {
  const { body: buffer, headers } = await got(url, { encoding: null })
  const str = toUTF8(buffer, headers['content-type'])
  console.log(str)
})()

See more at examples.

License

The code is available under MIT license.

2.1.6

3 years ago

2.1.5

3 years ago

2.1.4

4 years ago

2.1.3

4 years ago

2.1.1

5 years ago

2.1.0

5 years ago

2.0.1

6 years ago

2.0.0

6 years ago

1.1.1

9 years ago

1.1.0

9 years ago

1.0.0

9 years ago