@compwright/is-upper-case

Fork of is-upper-case with added locale support

Usage no npm install needed!

<script type="module">
  import compwrightIsUpperCase from 'https://cdn.skypack.dev/@compwright/is-upper-case';
</script>

README

@compwright/is-upper-case

Build status Dependency Status Download Status Sponsor on GitHub

Check if a string is upper case.

Forked from blakeembrey/is-upper-case, with the following improvements:

  • Removed unnecessary dependencies
  • Added locale support

Installation

npm install @compwright/is-upper-case --save

Usage

const isUpperCase = require('@compwright/is-upper-case')

isUpperCase('STRING') // true
isUpperCase('String') // false
isUpperCase('string') // false

// Returns undefined for non-strings
isUpperCase(null) // undefined

Locale support:

isUpperCase('STRİNG', 'tr') // true

Typings

Includes a TypeScript definition.

License

MIT