# normalize-for-search

> Un-accents and un-umlauts characters in a string. Also preliminary converts the string to lower case. We use it for autocomplete: both for the matched strings -- on the server side, when indexing; and for the strings the user types into a text input in th

Latest version **2.1.0** (published 2019-01-17) · MIT license · 0 weekly downloads

## Install

```sh
npm install normalize-for-search
pnpm add normalize-for-search
yarn add normalize-for-search
bun add normalize-for-search
```

## Health

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

Positive: has types package; no vulnerabilities; high quality score.

Warnings: low downloads; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 2.1.0 |
| Published | 2019-01-17 |
| First published | 2013-04-26 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | separate (@types/normalize-for-search) |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 14.4 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 14 |
| Author | Ivan Krechetov |
| Maintainers | ikr |
| Keywords | normalization, autocomplete, typeahead, search, text, strings |

## Links

- npm: https://www.npmjs.com/package/normalize-for-search
- Repository: https://github.com/ikr/normalize-for-search
- Homepage: https://github.com/ikr/normalize-for-search#readme
- Issues: https://github.com/ikr/normalize-for-search/issues
- npm.io page: https://npm.io/package/normalize-for-search

## Alternatives

- [@mce/gif](https://npm.io/package/@mce/gif.md) — 2.6K weekly downloads
- [cleanse](https://npm.io/package/cleanse.md) — 173 weekly downloads
- [str](https://npm.io/package/str.md) — 127 weekly downloads
- [naming](https://npm.io/package/naming.md) — 95 weekly downloads
- [tap-telco-api](https://npm.io/package/tap-telco-api.md) — 19 weekly downloads

## Recent versions

- 2.1.0 (latest) — 2019-01-17
- 2.0.1 — 2016-06-23
- 2.0.0 — 2016-06-23
- 1.2.0 — 2014-10-24
- 1.1.0 — 2014-05-21
- 1.0.4 — 2013-06-05
- 1.0.3 — 2013-05-30
- 1.0.2 — 2013-05-15
- 1.0.1 — 2013-05-14
- 1.0.0 — 2013-05-14
- 0.1.3 — 2013-05-06
- 0.1.2 — 2013-05-05
- 0.1.1 — 2013-05-02
- 0.1.0 — 2013-04-26

## README

[![Build Status](https://travis-ci.org/ikr/normalize-for-search.svg?branch=master)](https://travis-ci.org/ikr/normalize-for-search)

# About

Un-accents and un-umlauts characters in a string. Also preliminary converts the string to lower
case. We use it for autocomplete: both for the matched strings -- on the server side, when indexing;
and for the strings the user types into a text input in the browser.

Has nothing to do with [Unicode Normalization](http://www.unicode.org/reports/tr15/), but rather
expects the passed strings being already Unicode-normalized.

# Installation

## NPM (Node.js, Browserify, Webpack)

    $ npm install --save normalize-for-search

then

    var normalizeForSearch = require('normalize-for-search');

## CouchDB

Just drop the `src/normalize.js` contents into your CouchDB design document -- for example, into
`{views: {lib: {normalize: 'JSON-ENCODED src/normalize.js CODE HERE'}}}`, and then `require` it
elsewhere:

    var normalizeForSearch = require('views/lib/normalize');

## Directly in the browser

Including `src/normalize.js` into a Web page will create a global `normalizeForSearch` function.

# API

    // String -> String

    normalizeForSearch('Dät ist naïve und ÜBERCOOL, ё-маё!');
    // 'daet ist naive und uebercool, е-мае!'

# License: MIT

Copyright (c) 2016 Ivan Krechetov

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.

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