Last change
on this file since e29cc2e was 6a3a178, checked in by Ema <ema_spirova@…>, 3 years ago |
initial commit
|
-
Property mode
set to
100644
|
File size:
507 bytes
|
Line | |
---|
1 | var requireObjectCoercible = require('../internals/require-object-coercible');
|
---|
2 | var toString = require('../internals/to-string');
|
---|
3 |
|
---|
4 | var quot = /"/g;
|
---|
5 |
|
---|
6 | // `CreateHTML` abstract operation
|
---|
7 | // https://tc39.es/ecma262/#sec-createhtml
|
---|
8 | module.exports = function (string, tag, attribute, value) {
|
---|
9 | var S = toString(requireObjectCoercible(string));
|
---|
10 | var p1 = '<' + tag;
|
---|
11 | if (attribute !== '') p1 += ' ' + attribute + '="' + toString(value).replace(quot, '"') + '"';
|
---|
12 | return p1 + '>' + S + '</' + tag + '>';
|
---|
13 | };
|
---|
Note:
See
TracBrowser
for help on using the repository browser.