Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

array-join-conjunction

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

array-join-conjunction

Join an array with a conjunction

  • 1.0.0
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
46
increased by48.39%
Maintainers
1
Weekly downloads
 
Created
Source

array-join-conjunction

NPM version Build Status Coverage Status

Code Climate Dependencies DevDependencies

Join an array with a conjunction

Install

npm install --save array-join-conjunction

Usage

import arrayJoinConjuction from 'array-join-conjunction'

arrayJoinConjuction([])
// => ''

arrayJoinConjuction([1, 2])
// => '1 and 2'

arrayJoinConjuction(['blue', 'red', 'green'])
// => 'blue, red, and green'

arrayJoinConjuction(['blue', 'red', 'green'], 'or')
// => 'blue, red, or green'

API

arrayJoinConjuction(array, [conjunction])

Returns a string joined from array using an optional conjunction.

array

type: array

The array to join into a string. An empty array returns an empty string.

conjunction

type: string

default: 'and'

A conjunction to join two or more words with. The default is to use 'and'.

License

MIT © Dustin Specker

Keywords

FAQs

Package last updated on 31 Jan 2016

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc