Node-Red configuration
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

create-html.js 626B

12345678910111213141516
  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. var quot = /"/g;
  6. var replace = uncurryThis(''.replace);
  7. // `CreateHTML` abstract operation
  8. // https://tc39.es/ecma262/#sec-createhtml
  9. module.exports = function (string, tag, attribute, value) {
  10. var S = toString(requireObjectCoercible(string));
  11. var p1 = '<' + tag;
  12. if (attribute !== '') p1 += ' ' + attribute + '="' + replace(toString(value), quot, '&quot;') + '"';
  13. return p1 + '>' + S + '</' + tag + '>';
  14. };