How to use the dom-converter.objectToDom function in dom-converter

To help you get started, we’ve selected a few dom-converter examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github fossasia / susper.com / node_modules / renderkid / lib / tools.js View on Github external
// Generated by CoffeeScript 1.9.3
var htmlparser, object, objectToDom, self;

htmlparser = require('htmlparser2');

object = require('utila').object;

objectToDom = require('dom-converter').objectToDom;

module.exports = self = {
  repeatString: function(str, times) {
    var i, j, output, ref;
    output = '';
    for (i = j = 0, ref = times; 0 <= ref ? j < ref : j > ref; i = 0 <= ref ? ++j : --j) {
      output += str;
    }
    return output;
  },
  toDom: function(subject) {
    if (typeof subject === 'string') {
      return self.stringToDom(subject);
    } else if (object.isBareObject(subject)) {
      return self._objectToDom(subject);
    } else {

dom-converter

converts bare objects to DOM objects or xml representations

MIT
Latest version published 6 years ago

Package Health Score

65 / 100
Full package analysis

Popular dom-converter functions

Similar packages