tsmith123 / react-pluralize Goto Github PK
View Code? Open in Web Editor NEWDisplay plural or singular form of a word based on a count
License: MIT License
Display plural or singular form of a word based on a count
License: MIT License
Project is missing the webpack config in order to be able to build it.
Now I'm using this lib for my project and find issue, that after props changing component does not update state. So component should execute pluralize
function on componentWillReceiveProps hook
Hi,
is the issue from Fix error PropsTypes
is not defined caused by typo fixed in the npm version?
The bundle file still have this issue but not index.js.
Even here it's failing.
Hi,
In some cases plural is wrong.
1 berry => 2 berrys
1 search => 2 searchs
I was hopping this plugin would not break grammar and respect plural rules as defined here: https://en.oxforddictionaries.com/spelling/plurals-of-nouns
I'm even surprised that this plugin has 2k+ downloads per week in its current state.
Would be great if by default the component will not append the count to he pluralized noun. Or if we would control the append behavior with additional prop. In the current state it is impossible to use the library if you want to display the count as badge for example.
Would be great if the component was using https://www.npmjs.com/package/pluralize under the hood and make react component that wrap the lib. Are you down for that ?
I used this package and got issues for exceptional rules as follows.
(i) For 6, I am getting sixs but it should be sixes.
(ii)For 20, I am getting twentys but it should be twenties.
Use parseInt to turn a number value passed in as a string for the count prop
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.