New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

angular-inflector

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

angular-inflector

Angular inflection library

latest
Source
npmnpm
Version
0.2.3
Version published
Maintainers
1
Created
Source

Platanus Angular Inflector Utilities Build Status

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

angular.module('platanus.inflector')

Usage

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

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.

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!

FAQs

Package last updated on 03 Nov 2015

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts