Giter VIP home page Giter VIP logo

inflection-js's People

Contributors

rschuft avatar

Watchers

 avatar

inflection-js's Issues

Curves

What steps will reproduce the problem?
1. Passing curves to singularize gets you curf.



Original issue reported on code.google.com by [email protected] on 17 Apr 2008 at 5:05

for(var x=0;!matched&&x<=this._singular_rules.length;x++) should be <, not <=

What steps will reproduce the problem?
1. trying to singularize a word that doesn't match any singularizing rules.

What is the expected output? What do you see instead?
Javascript error: this._singular_rules[x] doesn't have any properties: in
other words, we accessed a _singular_rules item past the end of the array.

What version of the product are you using? On what operating system?
-doesn't matter-

Please provide any additional information below.
-none-

Original issue reported on code.google.com by [email protected] on 26 Sep 2007 at 4:34

the string 'address' is singularized as 'addres'

What steps will reproduce the problem?
1. 'address'.singularize()

What is the expected output? What do you see instead?
'address' is expected
'addres' is returned

What version of the product are you using? On what operating system?
the most recent

Please provide any additional information below.

I added the following line into the singular rules to solve the issue:

        [new RegExp('(address)$', 'gi'),                                                   '$1'],


Original issue reported on code.google.com by [email protected] on 30 Apr 2013 at 6:39

string.singularize() on a singular word returns a String object

1. Run .singularize() on a singular word (e.g. "word".singularize()) 

I expected to get "word" but instead inflection-js returns an object and not a 
string.

What version of the product are you using? On what operating system?
I am using the latest version (r38) on Mac OSX with Google Chrome and Firefox.

In Firefox in returns "String { 0="w", 1="o", more...}"  which is peculiar

Original issue reported on code.google.com by [email protected] on 26 Jan 2011 at 2:15

Ordinalize doesn't work

What steps will reproduce the problem?
1. call "22".ordinalize()
2. see that it has not ordinalized the numbers in the string
3. frown.

What is the expected output? What do you see instead?
expected: "22nd"
got: "22"

What version of the product are you using? On what operating system?
latest download




Original issue reported on code.google.com by [email protected] on 6 Sep 2011 at 11:29

The word Leaf is pluralized incorrectly

What steps will reproduce the problem?
1. pluralize the word Leaf
2.
3.

What is the expected output? What do you see instead?
Expected: Leaves   Actual: Leafs

What version of the product are you using? On what operating system?
r38 on W7

Please provide any additional information below.


Original issue reported on code.google.com by [email protected] on 19 Jun 2014 at 8:44

Fix for issue #4

String.pluralize() and String.singularize() return objects rather than strings 
as "this" always points to an object, adding the toString() means we return a 
String as expected.

Original issue reported on code.google.com by [email protected] on 28 Oct 2011 at 3:21

Attachments:

incorrect pluralizations of "octopus" and "virus"

The correct English plurals of "octopus" and "virus" are "octopuses" and 
"viruses".

"Octopi" comes from a mistaken belief that "octopus" is a Latin word; it is 
not, it's Greek.  The Greek plural would be "octopedes", but the common plural 
in English by biologists is "octopuses".

"Virus" is Latin, but is a mass noun in Classical Latin, and thus would never 
be pluralized by a native speaker.  It's also a neuter noun of the second 
declension, and nouns in that class are so rare that there are no known 
instances of one being pluralized in Classical Latin -- thus, no one knows what 
the correct plural would have been even if "virus" could have been pluralized 
in Latin.

In Neo-Latin, "virus" has three different plural forms, depending on what case 
it's used in.  These are "vira", "virorum", and "viris".

It should be noted that biologists continue to use "virus" as a mass noun in 
English -- thus, "viruses" is only used when multiple strains are being spoken 
of.  ("We discovered several new viruses", but "That vial is full of virus".)

Original issue reported on code.google.com by [email protected] on 23 Jan 2012 at 7:08

String.humanize(), pull request, sorta

Looking at String.humanize() I think it could be (marginally) faster and 
(arguably) prettier like so:

if(!String.prototype.humanize)
  String.prototype.humanize=function(lowFirstLetter)
  {
    var str = this
                .toLowerCase()
                .replace(/_id|_ids/g, '')
                .replace(/_/g, ' ');
    if(!lowFirstLetter)str=str.capitalize();
    return str;
  };

Would you consider this change? If so, what is the proper channels to submit a 
pull request?

Thanks!

David

Original issue reported on code.google.com by [email protected] on 30 Nov 2010 at 2:49

'miss', 'pass' singularize problems

What steps will reproduce the problem?
1.'miss'.singularize();
2.'pass'.singularize();

What is the expected output? What do you see instead?
Expected outputs are 'miss' and 'pass' respectively but instead, 'mis' and 
'pas' are being returned.

What version of the product are you using? On what operating system?
r38 on Windows Vista

Original issue reported on code.google.com by [email protected] on 11 Mar 2012 at 1:53

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.