1 | 'use strict';
|
2 | var uncurryThis = require('../internals/function-uncurry-this');
|
3 | var requireObjectCoercible = require('../internals/require-object-coercible');
|
4 | var toString = require('../internals/to-string');
|
5 |
|
6 | var quot = /"/g;
|
7 | var replace = uncurryThis(''.replace);
|
8 |
|
9 |
|
10 |
|
11 | module.exports = function (string, tag, attribute, value) {
|
12 | var S = toString(requireObjectCoercible(string));
|
13 | var p1 = '<' + tag;
|
14 | if (attribute !== '') p1 += ' ' + attribute + '="' + replace(toString(value), quot, '"') + '"';
|
15 | return p1 + '>' + S + '</' + tag + '>';
|
16 | };
|