mirror of
https://github.com/idanoo/GoScrobble.git
synced 2024-11-25 09:55:15 +00:00
14 lines
507 B
JavaScript
14 lines
507 B
JavaScript
var requireObjectCoercible = require('../internals/require-object-coercible');
|
|
var toString = require('../internals/to-string');
|
|
|
|
var quot = /"/g;
|
|
|
|
// `CreateHTML` abstract operation
|
|
// https://tc39.es/ecma262/#sec-createhtml
|
|
module.exports = function (string, tag, attribute, value) {
|
|
var S = toString(requireObjectCoercible(string));
|
|
var p1 = '<' + tag;
|
|
if (attribute !== '') p1 += ' ' + attribute + '="' + toString(value).replace(quot, '"') + '"';
|
|
return p1 + '>' + S + '</' + tag + '>';
|
|
};
|