# inflect

> A port of the Rails / ActiveSupport inflector to JavaScript.

Latest version **0.5.0** (published 2020-07-29) · MIT license · 0 weekly downloads

## Install

```sh
npm install inflect
pnpm add inflect
yarn add inflect
bun add inflect
```

## 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.5.0 |
| Published | 2020-07-29 |
| First published | 2011-04-24 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Node | >=10.19.0 |
| Dependencies | 0 |
| Unpacked size | 335.6 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 44 |
| Author | Stefan Stüben |
| Maintainers | msnexploder |
| Keywords | inflect, activerecord, rails, activesupport, string |

## Links

- npm: https://www.npmjs.com/package/inflect
- Repository: https://github.com/MSNexploder/inflect
- Homepage: http://msnexploder.github.com/inflect/
- Issues: https://github.com/MSNexploder/inflect/issues
- npm.io page: https://npm.io/package/inflect

## 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

- 0.5.0 (latest) — 2020-07-29
- 0.4.1 — 2020-04-07
- 0.4.0 — 2017-04-18
- 0.3.0 — 2012-09-20
- 0.2.2 — 2012-03-19
- 0.2.1 — 2012-03-19
- 0.2.0 — 2011-12-04
- 0.1.5 — 2011-11-20
- 0.1.4 — 2011-11-10
- 0.1.3 — 2011-08-11
- 0.1.2 — 2011-08-07
- 0.1.1 — 2011-07-31
- 0.1.0 — 2011-04-24

## README

# Inflect [![Build Status](https://secure.travis-ci.org/MSNexploder/inflect.png)](http://travis-ci.org/MSNexploder/inflect)

A port of the Rails / ActiveSupport inflector to JavaScript (node.js and browser compatible).

## Install

    npm install inflect

[Client version](https://raw.github.com/MSNexploder/inflect/master/client/inflect.js)

[Client version (minified)](https://raw.github.com/MSNexploder/inflect/master/client/inflect.min.js)

## Documentation

[Documentation](http://msnexploder.github.com/inflect)

## Usage

    inflect.pluralize('user'); // users

    inflect.singularize('users'); // user

    inflect.camelize('users_controller'); // UsersController

    inflect.capitalize('user'); // User

    inflect.decapitalize('User'); // user

    inflect.titleize('man from the boondocks'); // Man From The Boondocks

    inflect.underscore('UsersController'); // users_controller

    inflect.dasherize('puni_puni'); // puni-puni

    inflect.parameterize('Donald E. Knuth'); // donald-e-knuth

    inflect.humanize('employee_salary'); // Employee salary

## Note on Patches/Pull Requests

* Fork the project.
* Make your feature addition or bug fix.
* Commit, do not mess with cakefile, package.json, version, or history. (if you want to have your own version, that is fine but bump version in a commit by itself I can ignore when I pull)
* Send me a pull request. Bonus points for topic branches.

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