# angular-inflector

> Angular inflection library

Latest version **0.2.3** (published 2015-11-03) · MIT license · 0 weekly downloads

## Install

```sh
npm install angular-inflector
pnpm add angular-inflector
yarn add angular-inflector
bun add angular-inflector
```

## 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.2.3 |
| Published | 2015-11-03 |
| First published | 2015-02-18 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Node | >= 0.9 |
| Dependencies | 0 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | Ignacio Baixas |
| Maintainers | iobaixas |

## Links

- npm: https://www.npmjs.com/package/angular-inflector
- Repository: https://github.com/platanus/angular-inflector
- Issues: https://github.com/platanus/angular-inflector/issues
- npm.io page: https://npm.io/package/angular-inflector

## Recent versions

- 0.2.3 (latest) — 2015-11-03
- 0.2.0 — 2015-02-18

## README

Platanus Angular Inflector Utilities [![Build Status](https://travis-ci.org/iobaixas/angular-inflector.svg)](https://travis-ci.org/iobaixas/angular-inflector)
===============

Small suite of inflector functions, hopefully this lib will no longer be needed when angular makes the inflector functions they use part of the public api.

## Installation:

**Optional** Use bower to retrieve package

```
bower install angular-inflector --save
```

Include angular module

```javascript
angular.module('platanus.inflector')
```

## Usage

This library registers the `inflector` service, the following methods are provided by the service.

```html
inflector.camelize('the-snake'); // should output theSnake
inflector.camelize('the-snake', true); // should output TheSnake
inflector.parameterize('TheCamel'); // should output the-camel
inflector.parameterize('TheCamel', '_'); // should output the_camel
inflector.dasherize('the_snake'); // should output the-snake
inflector.dasherize('the_snake', '&'); // should output the&snake
inflector.pluralize('index'); // should output indexes
inflector.singularize('mice'); // should output mouse
```

Credit for the general singularize and pluralize implementation and the english locale rules goes to Ryan Schuft
with his [ActiveSupport's Inflector port](https://code.google.com/p/inflection-js/source/browse/trunk/inflection.js).

For now only the english transformation rules are included for the `singularize` and `pluralize` functions.

#### Contributed locales:

We thank the following developers for contributing with new locales rulesets:

* pt-BR: Daniel Fernando Lourusso

**Contributions for new locale rules are very welcomed!**

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