root 7621d6d22a 221005-1449-Kim | 2 tahun lalu | |
---|---|---|
.. | ||
LICENSE | 2 tahun lalu | |
Readme.md | 2 tahun lalu | |
index.js | 2 tahun lalu | |
package.json | 2 tahun lalu |
Escape string for use in HTML
var escape = require('escape-html');
var html = escape('foo & bar');
// -> foo & bar
$ 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)
MIT