Skip to content

Change the letters in the supplied array to the specified case ( Lower or Upper )

License

Notifications You must be signed in to change notification settings

linuxchip/changeArrayCase

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ea1fe8a · Jul 24, 2017

History

2 Commits
Jul 24, 2017
Jul 24, 2017

Repository files navigation

changeArrayCase

Description

Change the letters in the supplied array to the specified case ( Lower or Upper )

Parameters to this function are :

Array which has to be modified

Case ( Accepted values are "tolower" / "toupper" )

Return value will be modified array based on the supplied case parameter

Install

npm install changeArrayCase

Usage

const stringToModify = require('changeArrayCase');

var upperStringArray = ["APPLE", "ORANGE", "LEMON"];

var lowerStringArray = ["apple", "orange", "lemon"];

stringToModify(upperStringArray, "tolower");

// ["apple", "orange", "lemon"]

stringToModify(lowerStringArray, "toupper");

// ["APPLE", "ORANGE", "LEMON"];

API

changeArrayCase(inputStringArray, value)

inputStringArray

Type: string Array

String array to modify the letters in the array

value

Type: string

Allowed values are tolower / toupper

Tests

'npm test'

LICENSE

MIT

About

Change the letters in the supplied array to the specified case ( Lower or Upper )

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published