Repository: plexis-js/plexis
Pull request #22 (2019-10-20 18:07:33)

isUpperCase package
#11 

vorillaz: @humanolaranja Thanks for your contribution. 

You should also upgrade the `package/plexis/package.json` 
Take a look at this PR for reference #18 .
Also, you should run `yarn test -u` in order to update the Jest snapshots.
humanolaranja: > @humanolaranja Thanks for your contribution.
> 
> You should also upgrade the `package/plexis/package.json`
> Take a look at this PR for reference #18 .
> Also, you should run `yarn test -u` in order to update the Jest snapshots.

Thanks, now everything is ok =D

Patch:
diff --git a/docs/pages/api.md b/docs/pages/api.md
index 65673dd..4ececb0 100644
--- a/docs/pages/api.md
+++ b/docs/pages/api.md
@@ -2,6 +2,7 @@
 
 - [compose](/packages/compose)
 - [isLowerCase](/packages/isLowerCase)
+- [isUpperCase](/packages/isUpperCase)
 - [toLower](/packages/toLower)
 - [toPred](/packages/toPred)
 - [toSucc](/packages/toSucc)
diff --git a/package.json b/package.json
index 0148546..bee4cfc 100644
--- a/package.json
+++ b/package.json
@@ -57,4 +57,4 @@
       "git add"
     ]
   }
-}
+}
\ No newline at end of file
diff --git "a/packages/isUpperCase\357\270\217/.npmignore" "b/packages/isUpperCase\357\270\217/.npmignore"
new file mode 100644
index 0000000..552cf85
--- /dev/null
+++ "b/packages/isUpperCase\357\270\217/.npmignore"
@@ -0,0 +1,17 @@
+.DS_Store
+*.test.js
+.prettierrc
+.github
+.template
+.package-template
+.nyc_output
+.circleci
+.commitlintrc.js
+coverage
+coverage.lcov
+docs
+babel.config.js
+test
+CONTRIBUTING.md
+CODE_OF_CONDUCT.md
+LICENCE
\ No newline at end of file
diff --git "a/packages/isUpperCase\357\270\217/README.md" "b/packages/isUpperCase\357\270\217/README.md"
new file mode 100644
index 0000000..abe5c52
--- /dev/null
+++ "b/packages/isUpperCase\357\270\217/README.md"
@@ -0,0 +1,22 @@
+## `isUpperCase`
+
+Checks whether the input is a string containing only uppercase characters
+
+`npm i @plexis/is-uppercase`
+
+**Usage**
+
+```javascript
+import isUpperCase from '@plexis/is-uppercase';
+
+isUpperCase️('b') // returns false
+isUpperCase️('B') // returns true
+isUpperCase️('BCD') // returns true
+```
+
+**Aliases**
+
+```javascript
+import {isUpperCase} from 'plexis';
+import {isUpper} from 'plexis';
+```
diff --git "a/packages/isUpperCase\357\270\217/package.json" "b/packages/isUpperCase\357\270\217/package.json"
new file mode 100644
index 0000000..36e70bf
--- /dev/null
+++ "b/packages/isUpperCase\357\270\217/package.json"
@@ -0,0 +1,22 @@
+{
+  "name": "@plexis/is-uppercase",
+  "version": "0.0.12",
+  "main": "dist/index.js",
+  "module": "dist/index.esm.js",
+  "jsnext:main": "./src/index.js",
+  "license": "MIT",
+  "keywords": [
+    "utility",
+    "string",
+    "parse",
+    "format",
+    "validate"
+  ],
+  "repository": {
+    "type": "git",
+    "url": "git+https://github.com/plexis-js/plexis.git"
+  },
+  "publishConfig": {
+    "access": "public"
+  }
+}
\ No newline at end of file
diff --git "a/packages/isUpperCase\357\270\217/src/index.js" "b/packages/isUpperCase\357\270\217/src/index.js"
new file mode 100644
index 0000000..298634e
--- /dev/null
+++ "b/packages/isUpperCase\357\270\217/src/index.js"
@@ -0,0 +1,11 @@
+/**
+ * @description Checks whether the input is a string containing only uppercase characters
+ * @param {String} text
+ * @example
+ * isUpperCase️('b') // returns false
+ * isUpperCase️('B') // returns true
+ * isUpperCase️('BCD') // returns true
+ */
+const isUpperCase️ = text => text === text.toUpperCase();
+
+export default isUpperCase️;
diff --git "a/packages/isUpperCase\357\270\217/test/index.js" "b/packages/isUpperCase\357\270\217/test/index.js"
new file mode 100644
index 0000000..294048c
--- /dev/null
+++ "b/packages/isUpperCase\357\270\217/test/index.js"
@@ -0,0 +1,17 @@
+import isUpperCase from '../src';
+
+it('check a uppercase string', () => {
+  expect(isUpperCase('HELLO')).toBe(true);
+});
+
+it('check a uppercase with spaces string', () => {
+  expect(isUpperCase('HELLO FOO BAR')).toBe(true);
+});
+
+it('check a lowercase string', () => {
+  expect(isUpperCase('hello')).toBe(false);
+});
+
+it('check a uppercase string with an lowercase char in the middle', () => {
+  expect(isUpperCase('HELLO FOo BAR')).toBe(false);
+});
diff --git a/packages/plexis/package.json b/packages/plexis/package.json
index d6d4193..d44077e 100644
--- a/packages/plexis/package.json
+++ b/packages/plexis/package.json
@@ -15,7 +15,8 @@
     "@plexis/to-succ": "^0.0.12",
     "@plexis/to-title": "^0.0.12",
     "@plexis/without-diacritics": "^0.0.12",
-    "@plexis/is-lowercase": "^0.0.12"
+    "@plexis/is-lowercase": "^0.0.12",
+    "@plexis/is-uppercase": "^0.0.12"
   },
   "keywords": [
     "utility",
diff --git a/packages/plexis/src/index.js b/packages/plexis/src/index.js
index 1ce1879..e195599 100644
--- a/packages/plexis/src/index.js
+++ b/packages/plexis/src/index.js
@@ -12,4 +12,5 @@ export {
   default as removeDiacritics
 } from '@plexis/without-diacritics';
 export {default as isLowerCase, default as isLower} from '@plexis/is-lowercase';
-export {default as compose, default as _do} from '@plexis/compose';
+export {default as isUpperCase, default as isUpper} from '@plexis/is-uppercase';
+export {default as compose, default as _do} from '@plexis/compose';
\ No newline at end of file


Test patch:
diff --git a/packages/plexis/test/__snapshots__/index.js.snap b/packages/plexis/test/__snapshots__/index.js.snap
index fb10412..0dd186c 100644
--- a/packages/plexis/test/__snapshots__/index.js.snap
+++ b/packages/plexis/test/__snapshots__/index.js.snap
@@ -17,6 +17,8 @@ Array [
   "removeDiacritics",
   "isLowerCase",
   "isLower",
+  "isUpperCase",
+  "isUpper",
   "compose",
   "_do",
 ]