jsonapi-serializer icon indicating copy to clipboard operation
jsonapi-serializer copied to clipboard

continuing to clean up dependencies, inflected

Open hartzis opened this issue 9 years ago • 2 comments

Thoughts on continuing to clean up dependencies to reduce bundle size and requirements?

  • remove inflected dependency for keyForAttribute and instead default to (k) => k ?
  • remove inflected dependency for pluralizeType and instead default to (k) => k + 's'?
    • Users could require inflected themselves and put Inflector.dasherize for keyForAttribute and Inflector.pluralize for pluralizeType

Continued discussion from #123

hartzis avatar Mar 31 '17 21:03 hartzis

Hey @hartzis I think it's a good idea to reduce the bundle size and dependencies. If you have some time, it would be awesome to have a PR. Not sure to have in mind how to implement the "Users could require inflected themselves" :)

SeyZ avatar Mar 31 '17 21:03 SeyZ

@SeyZ since you've already setup config options for keyForAttribute and pluralizeType we could let users just pass Inflector methods to those config options for those, essentially.

I can work on a PR for sure, most of the work would be probably updating tests :)

hartzis avatar Mar 31 '17 22:03 hartzis