How to use pretty-data - 10 common examples

To help you get started, we’ve selected a few pretty-data 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 thejohnfreeman / jfdoc / lib / generate / generate.js View on Github external
= function instantiate(fileBasePath, tmplName, context)
  {
    /* TODO: Sanitize file names. */
    var filename = this.docDir + "/" + fileBasePath + ".html";
    console.log("generating " + filename);
    var template = handlebars.loadPartial(tmplName);
    var page = pretty.xml(template(context));
    fs.writeFileSync(filename, page);
  };
github hawkeye64 / onvif-nvt / lib / utils / save-xml.js View on Github external
function saveXml (service, methodName, xml) {
  if (writable) {
    const prettyXml = pd.xml(xml)
    const folderPath = path + `/${service}`
    // make sure folder exists
    if (!Fs.existsSync(folderPath)) {
      // make the folder
      Fs.mkdirSync(folderPath)
    }
    const filePath = folderPath + `/${methodName}.xml`
    Fs.writeFileSync(filePath, prettyXml)
  }
}
github thejohnfreeman / jfdoc / lib / generator / generator.js View on Github external
= function instantiate(filename, templateName, context)
  {
    console.log("documenting " + templateName + " at " + filename);
    var template = handlebars.loadPartial(templateName);
    var page = pretty.xml(template(context));
    fs.writeFileSync(filename, page);
  };
github sikuli / sieveable / lib / server / view.js View on Github external
fs.readFile(xmlPath, 'utf8', function(err, data){            
            var xml_pp = pd.xml(data)
            res.render('xml', {xml: xml_pp})    
        })    
    })
github binduwavell / generator-alfresco / generators / common / tomcat-context.js View on Github external
module.getContextString = function () {
    return pd.xml(new xmldom.XMLSerializer().serializeToString(doc));
  };
github binduwavell / generator-alfresco / generators / common / spring-context.js View on Github external
module.getContextString = function () {
    return pd.xml(new xmldom.XMLSerializer().serializeToString(doc));
  };
github binduwavell / generator-alfresco / generators / common / xml-dom-utils.js View on Github external
prettyPrint: function (doc) {
    return pd.xml(new xmldom.XMLSerializer().serializeToString(doc));
  },
github devvsda / shepherd / shepherd-web / src / Components / ClientComponent / ClientComponent.jsx View on Github external
function(ep) {
        if (ep.endpointName === endpointName) {
          this.setState({
            showData: true,
            showVisualization: false,
            currentEndpoint: ep.endpointName,
            XMLValue: pd.xml(ep.daggraph),
            JSONValue: ep.endpointDetails,
            nameValue: ep.endpointName
          });
        }
      }.bind(this)
    );
github devvsda / shepherd / shepherd-web / src / Components / ClientComponent / ClientComponent.jsx View on Github external
function(err, result) {
          if (!err) {
            this.setState({
              XMLValue: pd.xml(e.target.value)
            });
          }
        }.bind(this)
      );
github Travelport-Ukraine / uapi-json / src / Request / uapi-request.js View on Github external
.then((response) => {
          if (debugMode) {
            log('Response SOAP: ', pd.xml(response.data));
          }
          return response.data;
        })
        .catch((e) => {

pretty-data

plugin to pretty-print or minify XML, JSON, CSS and SQL files

MIT
Latest version published 13 years ago

Package Health Score

53 / 100
Full package analysis

Popular pretty-data functions

Similar packages