xml-but-prettier

WebJar for xml-but-prettier

Лицензия

Лицензия

MIT
Группа

Группа

org.webjars.npm
Идентификатор

Идентификатор

xml-but-prettier
Последняя версия

Последняя версия

1.0.1
Дата

Дата

Тип

Тип

jar
Описание

Описание

xml-but-prettier
WebJar for xml-but-prettier
Ссылка на сайт

Ссылка на сайт

http://webjars.org
Система контроля версий

Система контроля версий

https://github.com/shockey/xml-but-prettier

Скачать xml-but-prettier

Как подключить последнюю версию

<!-- https://jarcasting.com/artifacts/org.webjars.npm/xml-but-prettier/ -->
<dependency>
    <groupId>org.webjars.npm</groupId>
    <artifactId>xml-but-prettier</artifactId>
    <version>1.0.1</version>
</dependency>
// https://jarcasting.com/artifacts/org.webjars.npm/xml-but-prettier/
implementation 'org.webjars.npm:xml-but-prettier:1.0.1'
// https://jarcasting.com/artifacts/org.webjars.npm/xml-but-prettier/
implementation ("org.webjars.npm:xml-but-prettier:1.0.1")
'org.webjars.npm:xml-but-prettier:jar:1.0.1'
<dependency org="org.webjars.npm" name="xml-but-prettier" rev="1.0.1">
  <artifact name="xml-but-prettier" type="jar" />
</dependency>
@Grapes(
@Grab(group='org.webjars.npm', module='xml-but-prettier', version='1.0.1')
)
libraryDependencies += "org.webjars.npm" % "xml-but-prettier" % "1.0.1"
[org.webjars.npm/xml-but-prettier "1.0.1"]

Зависимости

compile (1)

Идентификатор библиотеки Тип Версия
org.webjars.npm : repeat-string jar [1.5.2,2)

Модули Проекта

Данный проект не имеет модулей.

XML, But Prettier

Build Status NPM version

This module is a fork of jonathanp/xml-beautifier.

This module beautifies XML documents by putting each tag and text node on their own line and correctly indenting everything.

Can be used e.g. if you're using React as a static page generator and (for some reason) need the generated HTML to be more human-readable.

Install

$ npm install --save xml-but-prettier

Usage

The module's function signature is xmlButPrettier(xml:String, options:Object).

import xmlButPrettier from 'xml-but-prettier';

const xml = xmlButPrettier('<div><span>foo</span></div>');
console.log(xml); // => will output correctly indented elements

Options

  • indentor: a custom string to use for indenting things
  • textNodesOnSameLine: compresses text nodes onto the same line as their containing tags

License

MIT.

Версии библиотеки

Версия
1.0.1