Files
.idea
node_modules
.bin
@babel
accepts
acorn
any-promise
arpping
array-flatten
asap
assert-never
babel-walk
body-parser
bytes
call-bind
character-parser
child_process
cidr-regex
constantinople
content-disposition
content-type
cookie
cookie-signature
debug
depd
destroy
doctypes
ee-first
encodeurl
escape-html
LICENSE
Readme.md
index.js
package.json
etag
express
finalhandler
forwarded
fresh
function-bind
get-intrinsic
get-ip-range
has
has-symbols
has-tostringtag
http-errors
iconv-lite
inherits
ip
ip-address
ipaddr.js
is-core-module
is-expression
is-promise
is-regex
js-stringify
jsbn
jstransformer
local-devices
lodash.find
lodash.max
lodash.merge
lodash.padstart
lodash.repeat
media-typer
merge-descriptors
methods
mime
mime-db
mime-types
ms
mz
negotiator
object-assign
on-finished
os
parseurl
path-parse
path-to-regexp
ping
promise
proxy-addr
pug
pug-attrs
pug-code-gen
pug-error
pug-filters
pug-lexer
pug-linker
pug-load
pug-parser
pug-runtime
pug-strip-comments
pug-walk
q
qs
range-parser
raw-body
resolve
safe-buffer
safer-buffer
send
serve-static
setprototypeof
sprintf-js
statuses
thenify
thenify-all
to-fast-properties
toidentifier
token-stream
type-is
underscore
unpipe
utils-merge
vary
void-elements
with
.package-lock.json
views
dnsmasq.leases
index.js
package-lock.json
package.json
test.http
test.txt
network-devices/node_modules/escape-html/Readme.md
2021-08-26 21:47:42 +02:00

707 B

escape-html

Escape string for use in HTML

Example

var escape = require('escape-html');
var html = escape('foo & bar');
// -> foo & bar

Benchmark

$ npm run-script bench

> escape-html@1.0.3 bench nodejs-escape-html
> node benchmark/index.js


  http_parser@1.0
  node@0.10.33
  v8@3.14.5.9
  ares@1.9.0-DEV
  uv@0.10.29
  zlib@1.2.3
  modules@11
  openssl@1.0.1j

  1 test completed.
  2 tests completed.
  3 tests completed.

  no special characters    x 19,435,271 ops/sec ±0.85% (187 runs sampled)
  single special character x  6,132,421 ops/sec ±0.67% (194 runs sampled)
  many special characters  x  3,175,826 ops/sec ±0.65% (193 runs sampled)

License

MIT