massive update, probably broken
[dotfiles/.git] / .config / coc / extensions / node_modules / coc-prettier / node_modules / core-js / internals / create-html.js
1 var uncurryThis = require('../internals/function-uncurry-this');
2 var requireObjectCoercible = require('../internals/require-object-coercible');
3 var toString = require('../internals/to-string');
4
5 var quot = /"/g;
6 var replace = uncurryThis(''.replace);
7
8 // `CreateHTML` abstract operation
9 // https://tc39.es/ecma262/#sec-createhtml
10 module.exports = function (string, tag, attribute, value) {
11   var S = toString(requireObjectCoercible(string));
12   var p1 = '<' + tag;
13   if (attribute !== '') p1 += ' ' + attribute + '="' + replace(toString(value), quot, '&quot;') + '"';
14   return p1 + '>' + S + '</' + tag + '>';
15 };