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.9
Version published
Weekly downloads
1.2K
-22.81%
Maintainers
1
Weekly downloads
 
Created
Source

html-encode

Last version 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, { responseType: 'buffer' })
  const str = toUTF8(buffer, headers['content-type']?.split(';')[0].toLowerCase())
  console.log(str)
})()

See more at examples.

License

html-encode © Kiko Beats, released under the MIT License.
Authored and maintained by Kiko Beats with help from contributors.

kikobeats.com · GitHub Kiko Beats · X @Kikobeats

Keywords

arbitrary

FAQs

Package last updated on 12 Aug 2025

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