# srv-util

> Utilities for server blueprint

Latest version **1.0.2** (published 2017-12-12) · MIT license · 0 weekly downloads

## Install

```sh
npm install srv-util
pnpm add srv-util
yarn add srv-util
bun add srv-util
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.2 |
| Published | 2017-12-12 |
| First published | 2017-04-29 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 2 |
| Known vulnerabilities | 0 (+1 in 1 direct dependencies) |
| Install scripts | no |
| GitHub stars | 0 |
| Author | Aleksandras Novikovas |
| Maintainers | alius |

## Links

- npm: https://www.npmjs.com/package/srv-util
- Repository: https://github.com/Aleksandras-Novikovas/srv-util
- Homepage: https://github.com/Aleksandras-Novikovas/srv-util#readme
- Issues: https://github.com/Aleksandras-Novikovas/srv-util/issues
- npm.io page: https://npm.io/package/srv-util

## Dependencies (2)

- [xml2js](https://npm.io/package/xml2js.md) ^0.4.17
- [srv-core](https://npm.io/package/srv-core.md) ^1.0.0

## Recent versions

- 1.0.2 (latest) — 2017-12-12
- 1.0.1 — 2017-12-05
- 1.0.0 — 2017-05-17
- 0.0.3 — 2017-05-11
- 0.0.2 — 2017-05-07
- 0.0.1 — 2017-04-29

## README

# srv-util
## Utilities for server blueprint

- Class `Util`
    - `concatenate()` concatenates provided parameters to string. `undefined` and `null` are converted to empty strings
    - `escapeRegExp()` escapes string for RegExp
    - `objectCopy()` makes shallow object copy. If `includeProperties` is provided then object copy will contain only properties specified in array `includeProperties`.
    - `arrayExecutor()` executes task with every parameter in `paramArray`. Tasks are executed in sequence.
    - `getPathValue()` retrieves value from provided object via specified string path.
- Class `HTMLUtil`
    - `escapeHtml()` escapes string for HTML value
    - `htmlStart` and `htmlEnd` returns simple HTML start/end string
    - `generateErrorHTMLPage()` generates HTML page for provided Error
    - `generateErrorHTMLBody()` generates HTML page body for provided Error
- Class `XMLUtil`
    - `escapeXml()`  escapes string for XML value
    - `readXMLFile()` reads and parses XML file
    - `normalizeXMLData()` normalizes parsed XML data

---
_Source: https://npm.io/package/srv-util · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
