orionsoft-react-scripts
Version:
Orionsoft Configuration and scripts for Create React App.
47 lines (32 loc) • 1.44 kB
Markdown
case of a string.
Supports Unicode (non-ASCII characters) and non-string entities, such as objects with a `toString` property, numbers and booleans. Empty values (`null` and `undefined`) will result in an empty string.
## Installation
```
npm install swap-case --save
```
## Usage
```javascript
var swapCase = require('swap-case')
swapCase(null) //=> ""
swapCase('string') //=> "STRING"
swapCase('PascalCase') //=> "pASCALcASE"
swapCase('Iñtërnâtiônàlizætiøn') //=> "iÑTËRNÂTIÔNÀLIZÆTIØN"
swapCase('My String', 'tr') //=> "mY sTRİNG"
```
Includes a [TypeScript definition](swap-case.d.ts).
MIT
[ ]: https://img.shields.io/npm/v/swap-case.svg?style=flat
[ ]: https://npmjs.org/package/swap-case
[ ]: https://img.shields.io/npm/dm/swap-case.svg?style=flat
[ ]: https://npmjs.org/package/swap-case
[ ]: https://img.shields.io/travis/blakeembrey/swap-case.svg?style=flat
[ ]: https://travis-ci.org/blakeembrey/swap-case
[ ]: https://img.shields.io/coveralls/blakeembrey/swap-case.svg?style=flat
[ ]: https://coveralls.io/r/blakeembrey/swap-case?branch=master
[![NPM version][npm-image]][npm-url]
[![NPM downloads][downloads-image]][downloads-url]
[![Build status][travis-image]][travis-url]
[![Test coverage][coveralls-image]][coveralls-url]
Swap the