🚨 Active Supply Chain Attack:node-ipc Package Compromised.Learn More
Socket
Book a DemoSign in
Socket

comma-cat

Package Overview
Dependencies
Maintainers
1
Versions
8
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

comma-cat

Concatenate a sequence(array) of string values with a comma separator excluding the last value.

latest
Source
npmnpm
Version
1.0.7
Version published
Maintainers
1
Created
Source

Comma Cat NPM Package:

Concatenate(combine) a sequence(array) of string values with a comma-and-space(the delimiter) to separate each value excluding the last value, so an array like this ["1", "2", "3"] will end up looking like this 1, 2, 3.

How to require(import) this package:

const commaCat = require("comma-cat.js");

import commatCat from "comma-cat.js";

Code usage:

commaCat(["value-1", "value-2", "value-3"])

Notes about package:

  • commaCat is a function.
  • it accepts an array that must contain string values or else you will get a console error message telling you otherwise.
  • This package will not convert value to a string, so passing in 1 will not be converted to "1". This is intentional and is meant to resemble strict type checking like typescript or a strongly typed language such as JAVA or C.
TODO:
  • Add a testing framework to test code with code rather than relying purely on myself and other humans to test.

Keywords

comma separated list

FAQs

Package last updated on 31 Jul 2019

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