1.0.4 • Published 8 months ago
es-string-html-methods v1.0.4
es-string-html-methods 
An ES-spec-compliant shim/polyfill/replacement for the Annex B String.prototype HTML methods that works as far down as ES3
This package implements the es-shim API “multi” interface. It works in an ES3-supported environment and complies with the spec.
Because the String.prototype HTML methods depend on a receiver (the this value), the main export in each subdirectory takes the string to operate on as the first argument.
The main export of the package itself is simply an array of the available directory names. It’s sole intended use is for build tooling and testing.
Supported methods
String.prototype.anchorString.prototype.bigString.prototype.blinkString.prototype.boldString.prototype.fixedString.prototype.fontcolorString.prototype.fontsizeString.prototype.italicsString.prototype.linkString.prototype.smallString.prototype.strikeString.prototype.subString.prototype.sup
Getting started
npm install --save es-string-html-methodsUsage/Examples
var blink = require('es-string-html-methods/blink');
var link = require('es-string-html-methods/link');
var assert = require('assert');
assert.equal(
blink('a'),
'<blink>a</blink>'
);
assert.equal(
link('a', 'b'),
'<a href="b">a</a>'
);require('./auto'); // shim all of the methods
require('./anchor/auto'); // shim the “anchor” methodTests
Simply clone the repo, npm install, and run npm test
