# @f/loose-parse-int

> Parses a string and returns an integer if possible

Latest version **0.1.0** (published 2016-03-29) · MIT license · 0 weekly downloads

## Install

```sh
npm install @f/loose-parse-int
pnpm add @f/loose-parse-int
yarn add @f/loose-parse-int
bun add @f/loose-parse-int
```

## 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.0 |
| Published | 2016-03-29 |
| First published | 2016-03-29 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Maintainers | f |

## Links

- npm: https://www.npmjs.com/package/@f/loose-parse-int
- Repository: https://github.com/micro-js/loose-parse-int
- Homepage: https://github.com/micro-js/loose-parse-int#readme
- Issues: https://github.com/micro-js/loose-parse-int/issues
- npm.io page: https://npm.io/package/@f/loose-parse-int

## Recent versions

- 0.1.0 (latest) — 2016-03-29

## README

# loose-parse-int

[![Build status][travis-image]][travis-url]
[![Git tag][git-image]][git-url]
[![NPM version][npm-image]][npm-url]
[![Code style][standard-image]][standard-url]

Parses a string and returns an integer if possible. If it cannot be converted it'll just return the original string.

## Installation

    $ npm install @f/loose-parse-int

## Usage

```js
var looseParseInt = require('@f/loose-parse-int')

looseParseInt('1') // -> 1
looseParseInt('') // -> ''
looseParseInt('abc') // -> 'abc'
looseParseInt('123abc') // -> '123abc'
```

## API

### looseParseInt(str)

- `str` - A string to convert to an integer

**Returns:** Parsed number or if not possible, the original string

## License

MIT

[travis-image]: https://img.shields.io/travis/micro-js/loose-parse-int.svg?style=flat-square
[travis-url]: https://travis-ci.org/micro-js/loose-parse-int
[git-image]: https://img.shields.io/github/tag/micro-js/loose-parse-int.svg?style=flat-square
[git-url]: https://github.com/micro-js/loose-parse-int
[standard-image]: https://img.shields.io/badge/code%20style-standard-brightgreen.svg?style=flat-square
[standard-url]: https://github.com/feross/standard
[npm-image]: https://img.shields.io/npm/v/@f/loose-parse-int.svg?style=flat-square
[npm-url]: https://npmjs.org/package/@f/loose-parse-int

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