New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

html-encode

Package Overview
Dependencies
Maintainers
1
Versions
16
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

html-encode

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

Source
npmnpm
Version
2.1.6
Version published
Weekly downloads
1.2K
-22.81%
Maintainers
1
Weekly downloads
 
Created
Source

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.

Keywords

arbitrary

FAQs

Package last updated on 16 Apr 2021

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts