# @bugbearr/escapejsstring

> Escape JavaScript string

Latest version **1.0.5** (published 2020-09-16) · CC0-1.0 license · 0 weekly downloads

## Install

```sh
npm install @bugbearr/escapejsstring
pnpm add @bugbearr/escapejsstring
yarn add @bugbearr/escapejsstring
bun add @bugbearr/escapejsstring
```

## Health

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

Positive: has types; esm support; no vulnerabilities; high quality score.

Warnings: low downloads.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.5 |
| Published | 2020-09-16 |
| First published | 2020-09-08 |
| Weekly downloads | 0 |
| License | CC0-1.0 |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Dependencies | 0 |
| Unpacked size | 15.3 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Maintainers | bugbearr |

## Links

- npm: https://www.npmjs.com/package/@bugbearr/escapejsstring
- Repository: https://github.com/bugbearr/escapeJsString-js
- npm.io page: https://npm.io/package/@bugbearr/escapejsstring

## Recent versions

- 1.0.5 (latest) — 2020-09-16
- 1.0.4 — 2020-09-15
- 1.0.3 — 2020-09-08
- 1.0.2 — 2020-09-08
- 1.0.1 — 2020-09-08
- 1.0.0 — 2020-09-08

## README

# escapeJsString
[![CI](https://github.com/BugbearR/escapeJsString-js/workflows/CI/badge.svg)](https://github.com/BugbearR/escapeJsString-js/actions?query=workflow%3ACI) [![Gitpod Ready-to-Code](https://img.shields.io/badge/Gitpod-ready--to--code-blue?logo=gitpod)](https://gitpod.io/#https://github.com/BugbearR/escapeJsString-js)

```js
import escapeJsString from "@bugbearr/escapejsstring";
// var escapeJsString = require("@bugbearr/escapejsstring").default;

// Escape C0 chars and HTML, XML, JavaScript special chars for JavaScript string.
console.log(escapeJsString("\"<Hello,\r\n world!>\"\r\n"));
// Console.out
// \u0022\u003cHello,\r\n world!\u003e\u0022\r\n
```

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