Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/dustinspecker/list-join-conjunction

Join a List with a conjunction
https://github.com/dustinspecker/list-join-conjunction

Last synced: 2 days ago
JSON representation

Join a List with a conjunction

Awesome Lists containing this project

README

        

# ListJoinConjunction [![Build Status](https://travis-ci.org/dustinspecker/list-join-conjunction.svg?branch=master)](https://travis-ci.org/dustinspecker/list-join-conjunction) [![Elm Docs](https://img.shields.io/badge/elm-docs-brightgreen.svg)](http://package.elm-lang.org/packages/dustinspecker/list-join-conjunction/latest)
> Join a List with a conjunction

## Install

```bash
elm-package install dustinspecker/list-join-conjunction
```

## Usage

```elm
module AwesomeModule where

import ListJoinConjunction

formattedString : List String -> String
formattedString conjunction list =
ListJoinConjunction.make "and" list

formattedString "and" [ "red", "blue" ] -- "red and blue"
formattedString "or" [ "red", "blue", "white" ] -- "red, blue, or white"
```

## License
MIT © [Dustin Specker](https://github.com/dustinspecker)