Gathering detailed insights and metrics for ember-inflector
Gathering detailed insights and metrics for ember-inflector
Gathering detailed insights and metrics for ember-inflector
Gathering detailed insights and metrics for ember-inflector
npm install ember-inflector
v5.0.2-ember-inflector
Published on 24 Oct 2024
v5.0.1-ember-inflector
Published on 05 Aug 2024
v5.0.0-ember-inflector
Published on 24 Jul 2024
v4.0.3-ember-inflector
Published on 12 Jul 2024
Release 4.0.2
Published on 11 Jun 2021
v1.9.5
Published on 19 Jul 2016
Module System
Min. Node Version
Typescript Support
Node Version
NPM Version
107 Stars
392 Commits
80 Forks
17 Watching
22 Branches
55 Contributors
Updated on 31 Oct 2024
JavaScript (96.82%)
HTML (3.06%)
Handlebars (0.12%)
Cumulative downloads
Total Downloads
Last day
-33.9%
12,242
Compared to previous day
Last week
-18.7%
82,308
Compared to previous week
Last month
-1.8%
412,265
Compared to previous month
Last year
-3.1%
6,087,277
Compared to previous year
2
20
Ember Inflector is a library for inflecting words between plural and singular forms. Ember Inflector aims to be compatible with ActiveSupport::Inflector from Ruby on Rails, including the ability to add your own inflections in your app.
ember install ember-inflector
All methods are always available from the ember-inflector
module:
1import Inflector from 'ember-inflector'; 2import { singularize, pluralize } from 'ember-inflector'; 3 4Inflector.inflector.singularize("tacos"); // taco 5Inflector.inflector.pluralize("taco"); // tacos 6 7singularize("tacos"); // taco 8pluralize("taco"); // tacos 9 10pluralize(2, "taco"); // 2 tacos 11pluralize(2, "tacos", { withoutCount: true }); // tacos
If necessary you can setup special inflection rules for your application:
1import Inflector from 'ember-inflector'; 2 3Inflector.inflector.irregular('person', 'people'); 4Inflector.inflector.uncountable('sheep'); 5
Pluralize a word
1{{pluralize "taco"}} -> tacos
Specify a count with the word, with the pluralization being based on the number of items.
1{{pluralize 1 "taco"}} -> 1 taco 2{{pluralize 2 "taco"}} -> 2 tacos
Specify a count with the word, with the pluralization being based on the number of items. Specify without-count=true
to return on the word without the number.
1{{pluralize 1 "taco" without-count=true}} -> taco 2{{pluralize 2 "taco" without-count=true}} -> tacos
1{{singularize 'octopi'}} -> octopus
See the Contributing guide for details.
This project is licensed under the MIT License.
No vulnerabilities found.
Reason
no dangerous workflow patterns detected
Reason
no binaries found in the repo
Reason
license file detected
Details
Reason
packaging workflow detected
Details
Reason
Found 5/7 approved changesets -- score normalized to 7
Reason
4 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 3
Reason
dependency not pinned by hash detected -- score normalized to 0
Details
Reason
detected GitHub workflow tokens with excessive permissions
Details
Reason
no effort to earn an OpenSSF best practices badge detected
Reason
project is not fuzzed
Details
Reason
security policy file not detected
Details
Reason
branch protection not enabled on development/release branches
Details
Reason
SAST tool is not run on all commits -- score normalized to 0
Details
Reason
14 existing vulnerabilities detected
Details
Score
Last Scanned on 2024-11-25
The Open Source Security Foundation is a cross-industry collaboration to improve the security of open source software (OSS). The Scorecard provides security health metrics for open source projects.
Learn More