Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/dustinspecker/conjunction
Combine a list of strings with a conjunction
https://github.com/dustinspecker/conjunction
Last synced: 2 days ago
JSON representation
Combine a list of strings with a conjunction
- Host: GitHub
- URL: https://github.com/dustinspecker/conjunction
- Owner: dustinspecker
- License: mit
- Created: 2016-12-25T01:52:33.000Z (almost 8 years ago)
- Default Branch: master
- Last Pushed: 2016-12-27T21:04:30.000Z (almost 8 years ago)
- Last Synced: 2024-10-13T06:29:50.149Z (26 days ago)
- Language: Elixir
- Homepage:
- Size: 6.84 KB
- Stars: 3
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: readme.md
- License: license.md
Awesome Lists containing this project
README
# Conjunction
> Combine a list of strings with a conjunction
[![Build Status](https://travis-ci.org/dustinspecker/conjunction.svg?branch=master)](https://travis-ci.org/dustinspecker/conjunction)
## Install
In `mix.exs`:
```elixir
def deps do
[{:conjunction, "~> 1.0.2"}]
end
```Then run `mix deps.get`.
## Usage
```elixir
Conjunction.join(["red", "blue"])
# => "red and blue"Conjunction.join(["red", "blue"], "or")
# => "red or blue"Conjunction.join(["red", "blue", "white"])
# => "red, blue, and white"Conjunction.join(["red", "blue", "white"], "or")
# => "red, blue, or white"
```## License
MIT © [Dustin Specker](http://dustinspecker.com)