# jq-trim

> A trim method that behaves like jquery.trim

Latest version **0.1.2** (published 2015-08-25) · MIT license · 0 weekly downloads

## Install

```sh
npm install jq-trim
pnpm add jq-trim
yarn add jq-trim
bun add jq-trim
```

## Health

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

Positive: no vulnerabilities.

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

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.1.2 |
| Published | 2015-08-25 |
| First published | 2015-07-25 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | Roy Riojas |
| Maintainers | royriojas |
| Keywords | trim, jquery-trim, string trim |

## Links

- npm: https://www.npmjs.com/package/jq-trim
- Repository: https://github.com/royriojas/jq-trim
- Homepage: https://github.com/royriojas/jq-trim#readme
- Issues: https://github.com/royriojas/jq-trim/issues
- npm.io page: https://npm.io/package/jq-trim

## Alternatives

- [gamedig](https://npm.io/package/gamedig.md) — 29.3K weekly downloads
- [join-monster](https://npm.io/package/join-monster.md) — 12.8K weekly downloads
- [masked](https://npm.io/package/masked.md) — 5.5K weekly downloads
- [@comunica/actor-query-process-explain-logical](https://npm.io/package/@comunica/actor-query-process-explain-logical.md) — 4.7K weekly downloads
- [@veracity/vui](https://npm.io/package/@veracity/vui.md) — 4.6K weekly downloads

## Recent versions

- 0.1.2 (latest) — 2015-08-25
- 0.1.1 — 2015-07-30
- 0.1.0 — 2015-07-25

## README

[![NPM Version](http://img.shields.io/npm/v/jq-trim.svg?style=flat)](https://npmjs.org/package/jq-trim)
[![Build Status](http://img.shields.io/travis/royriojas/jq-trim.svg?style=flat)](https://travis-ci.org/royriojas/jq-trim)

# jq-trim
> A trim method that behaves like jquery.trim

## Install

```bash
npm i --save jq-trim
```

## Usage

```javascript
var trim = require('jq-trim');

describe( 'jq-trim', function () {
  it( 'should trim a string', function () {
    var trim = require( '../' );
    var val = trim( ' a simple string    ' );
    expect( val ).to.equal( 'a simple string' );
  } );
  it( 'should return an empty string if null is passed', function () {
    var trim = require( '../' );
    var val = trim( null );
    expect( val ).to.equal( '' );
  } );
  it( 'should return an empty string if undefined is passed', function () {
    var trim = require( '../' );
    var val = trim( undefined );
    expect( val ).to.equal( '' );
  } );
  it( 'should return the toString() of the passed object if non a string', function () {
    var trim = require( '../' );
    var val = trim( { } );
    expect( val ).to.equal( '[object Object]' );
  } );
} );
```

## License

[MIT](./LICENSE)

## Changelog

[Changelog](./changelog.md)

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