# ndx-utils

> Utility functions for a lightweight full-text searching and indexing library ndx.

Latest version **1.0.0-beta.0** (published 2019-01-10) · MIT license · 0 weekly downloads

## Install

```sh
npm install ndx-utils
pnpm add ndx-utils
yarn add ndx-utils
bun add ndx-utils
```

## 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.0-beta.0 |
| Published | 2019-01-10 |
| First published | 2019-01-10 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Dependencies | 0 |
| Unpacked size | 10.7 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | Boris Kaul |
| Maintainers | localvoid |
| Keywords | ndx |

## Links

- npm: https://www.npmjs.com/package/ndx-utils
- Repository: https://github.com/ndx-search/ndx-utils
- Issues: https://github.com/localvoid/ndx-search/ndx-utils/issues
- npm.io page: https://npm.io/package/ndx-utils

## Recent versions

- 1.0.0-beta.0 (latest) — 2019-01-10

## README

# [ndx](https://github.com/ndx-search/ndx-utils) &middot; [![GitHub license](https://img.shields.io/badge/license-MIT-blue.svg)](https://github.com/ndx-search/ndx-utils/blob/master/LICENSE) [![npm version](https://img.shields.io/npm/v/ndx-utils.svg)](https://www.npmjs.com/package/ndx-utils) [![codecov](https://codecov.io/gh/ndx-search/ndx-utils/branch/master/graph/badge.svg)](https://codecov.io/gh/ndx-search/ndx-utils) [![CircleCI Status](https://circleci.com/gh/ndx-search/ndx-utils.svg?style=shield&circle-token=:circle-token)](https://circleci.com/gh/ndx-search/ndx-utils) [![PRs Welcome](https://img.shields.io/badge/PRs-welcome-brightgreen.svg)](https://github.com/ndx-search/ndx-utils)

Utility functions for a lightweight javascript (TypeScript) full-text indexing and searching library
[ndx](https://github.com/ndx-search/ndx-utils).

## API

### Tokenizers

#### Whitspace Tokenizer

The whitespace tokenizer breaks on whitespace - spaces, tabs, line feeds and assumes that contiguous nonwhitespace
characters form a single token.

```ts
function whitespaceTokenizer(s: string): string[];
```

### Filters

#### LowerCase Filter

Converts term to lower case.

```ts
function lowerCaseFilter(term: string): string;
```

#### Trim Non-Word Characters Filter

Removes all non-word characters at the start and at the end of the term.

```ts
function trimNonWordCharactersFilter(term: string): string;
```

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