{"id":13509344,"url":"https://github.com/nurugger07/inflex","last_synced_at":"2025-05-15T04:04:20.232Z","repository":{"id":12402045,"uuid":"15055271","full_name":"nurugger07/inflex","owner":"nurugger07","description":"An Inflector library for Elixir","archived":false,"fork":false,"pushed_at":"2024-04-12T20:25:20.000Z","size":114,"stargazers_count":378,"open_issues_count":7,"forks_count":58,"subscribers_count":5,"default_branch":"master","last_synced_at":"2025-05-03T01:48:15.476Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Elixir","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/nurugger07.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2013-12-09T18:22:04.000Z","updated_at":"2024-12-11T22:05:24.000Z","dependencies_parsed_at":"2022-09-21T08:40:27.359Z","dependency_job_id":"3ddeca4c-4876-4928-b274-05a6968f48d2","html_url":"https://github.com/nurugger07/inflex","commit_stats":{"total_commits":125,"total_committers":49,"mean_commits":"2.5510204081632653","dds":0.848,"last_synced_commit":"924ccb75a306d56044bcbb89d3e5ecb7825ab153"},"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nurugger07%2Finflex","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nurugger07%2Finflex/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nurugger07%2Finflex/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nurugger07%2Finflex/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/nurugger07","download_url":"https://codeload.github.com/nurugger07/inflex/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254043215,"owners_count":22004911,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-08-01T02:01:06.427Z","updated_at":"2025-05-15T04:04:20.091Z","avatar_url":"https://github.com/nurugger07.png","language":"Elixir","funding_links":[],"categories":["Text and Numbers"],"sub_categories":[],"readme":"# Inflex\n\n\u003c!-- MDOC !--\u003e\n\n[![Build Status](https://travis-ci.org/nurugger07/inflex.svg?branch=master)](https://travis-ci.org/nurugger07/inflex)\n[![Module Version](https://img.shields.io/hexpm/v/inflex.svg)](https://hex.pm/packages/inflex)\n[![Hex Docs](https://img.shields.io/badge/hex-docs-lightgreen.svg)](https://hexdocs.pm/inflex/)\n[![Total Download](https://img.shields.io/hexpm/dt/inflex.svg)](https://hex.pm/packages/inflex)\n[![License](https://img.shields.io/hexpm/l/inflex.svg)](https://github.com/nurugger07/inflex/blob/master/LICENSE)\n[![Last Updated](https://img.shields.io/github/last-commit/nurugger07/inflex.svg)](https://github.com/nurugger07/inflex/commits/master)\n\n\nAn Elixir library for handling word inflections.\n\n## Getting Started\n\nYou can add Inflex as a dependency in your `mix.exs` file. Since it only requires Elixir and Erlang there are no other dependencies.\n\n```elixir\ndef deps do\n  [\n    {:inflex, \"~\u003e 2.0.0\"}\n  ]\nend\n```\n\nIf you are not using [hex](http://hex.pm) you can add the dependency using the GitHub repository.\n\n```elixir\ndef deps do\n  [\n    {:inflex, github: \"nurugger07/inflex\"}\n  ]\nend\n```\n\nThen run `mix deps.get` in the shell to fetch and compile the dependencies.\n\n### Requirements\n\nAlthough Inflex supports Elixir 1.6, which is [compatible](https://hexdocs.pm/elixir/compatibility-and-deprecations.html#compatibility-between-elixir-and-erlang-otp) with Erlang/OTP 19–20, [Inflex requires Erlang/OTP 20+](https://github.com/nurugger07/inflex/blob/master/lib/inflex/parameterize.ex#L21).\n\n\nTo incorporate Inflex in your modules, use `import`.\n\n```elixir\ndefmodule Blog do\n  import Inflex\n\n  def greeting(count), do: \"You are the #{ordinalize(count)} visitor!\"\n\nend\n```\n\n## Examples\n\n### Singularize \u0026 Pluralize\n\nHere are some basic examples from `iex`:\n\n```elixir\n\niex(1)\u003e Inflex.singularize(\"dogs\")\n\"dog\"\n\niex(2)\u003e Inflex.pluralize(\"dog\")\n\"dogs\"\n\niex(3)\u003e Inflex.singularize(\"people\")\n\"person\"\n\niex(4)\u003e Inflex.pluralize(\"person\")\n\"people\"\n```\n\nSome other special cases are handled for nouns ending in -o and  -y\n\n```elixir\niex(1)\u003e Inflex.pluralize(\"piano\")\n\"pianos\"\n\niex(2)\u003e Inflex.pluralize(\"hero\")\n\"heroes\"\n\niex(3)\u003e Inflex.pluralize(\"butterfly\")\n\"butterflies\"\n\niex(4)\u003e Inflex.pluralize(\"monkey\")\n\"monkeys\"\n```\n\n### Inflect\n\n```elixir\niex(1)\u003e Inflex.inflect(\"child\", 1)\n\"child\"\n\niex(2)\u003e Inflex.inflect(\"child\", 2)\n\"children\"\n```\n\n### Camelize \u0026 Pascalize\n\nInflex also camelizes or pascalizes strings and atoms.\n\n```elixir\niex(1)\u003e Inflex.camelize(:upper_camel_case)\n\"UpperCamelCase\"\n\niex(2)\u003e Inflex.camelize(\"pascal-case\", :lower)\n\"pascalCase\"\n```\n\n### Parameterize\n\nStrings can be parameterized easily.\n\n```elixir\niex(1)\u003e Inflex.parameterize(\"String for parameter\")\n\"string-for-parameter\"\n\niex(2)\u003e Inflex.parameterize(\"String with underscore\", \"_\")\n\"string_with_underscore\"\n```\n\n### Underscore\n\nMakes an underscored, lowercase form from a string or atom.\n\n```elixir\niex(1)\u003e Inflex.underscore(\"UpperCamelCase\")\n\"upper_camel_case\"\n\niex(2)\u003e Inflex.underscore(\"pascalCase\")\n\"pascal_case\"\n\niex(3)\u003e Inflex.underscore(UpperCamelCase)\n\"upper_camel_case\"\n\niex(4)\u003e Inflex.underscore(:pascalCase)\n\"pascal_case\"\n```\n\n## Contributing\n\nAll pull requests will be reviewed for inclusion but must include tests.\n\n## License\n\nCopyright (c) 2013 Johnny Winn\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at [http://www.apache.org/licenses/LICENSE-2.0](http://www.apache.org/licenses/LICENSE-2.0)\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnurugger07%2Finflex","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnurugger07%2Finflex","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnurugger07%2Finflex/lists"}