Giter VIP home page Giter VIP logo

inflected's People

Contributors

dakolech avatar davidonlaptop avatar dependabot[bot] avatar jeremypearson avatar martinandert avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

inflected's Issues

Cannot read property 'underscore' of undefined

Using v2.0.1, I do this:

import {titleize} from 'inflected';
titleize('foo_bar');

And get this error.

Uncaught TypeError: Cannot read property 'underscore' of undefined
    at titleize (inflected.js:389)

Trying to get in touch regarding a security issue

Hey there!

I'd like to report a security issue but cannot find contact instructions on your repository.

If not a hassle, might you kindly add a SECURITY.md file with an email, or another contact method? GitHub recommends this best practice to ensure security issues are responsibly disclosed, and it would serve as a simple instruction for security researchers in the future.

Thank you for your consideration, and I look forward to hearing from you!

(cc @huntr-helper)

Usage of `char` as a variable name should be avoided

char is on the list of reserved words and should be avoided in general.

Specifically, I'm running into the issue as part of browserifying/webpacking a project with es3ify, which replaces dot accessed reserved words that are now part of the API with bracket references.

DEFAULT_APPROXIMATIONS[char]) is replaced as DEFAULT_APPROXIMATIONS["char"])

I think es3ify is being a little overzealous here and I'll report an issue there as well but it would be nice to just not use a "reserved" word.

parameterize default separator does not match ActiveSupport

Hey there fellow Rubyist, thanks for making this available. I noticed a difference in the way inflected handles parameterize on strings, specifically the separator.

ActiveSupport parameterize
https://api.rubyonrails.org/classes/ActiveSupport/Inflector.html#method-i-parameterize
parameterize(string, separator: "-", preserve_case: false)

inflected parameterize
parameterize(string, separator: "")

Example string is the name of a pet from World of Warcraft: Lil' Ben'fon

ActiveSupport parameterize:

"Lil' Ben'fon".parameterize
=> "lil-ben-fon"

inflected parameterize

parameterize("Lil' Ben'fon")
=> `lil-benfon`

Add Constantize Feature

Good work guys!

ActiveSupport has a constantize method that turns an input into a CONSTANT_CASE.

If you're interested in the feature, I can look if I find time to contribute it.

Spanish inflector not working

var Inflector = require('inflected');

console.log(Inflector.singularize('arroces', 'es'));
console.log(Inflector.singularize('autos', 'es'));
console.log(Inflector.singularize('veganos', 'es'));

Outputs the same input!

Singular of "delta" is not correct

Hi,

I've been using your library as a dependency of MirageJS. We had a pretty nasty bug in our models where the singularize method is returning deltum as the singular of the word delta.

You can try it with:

Inflector.singularize('delta')

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.