From e16105e3190140f955cc6c8fe3796f8cda84032c Mon Sep 17 00:00:00 2001 From: 30secondsofcode <30secondsofcode@gmail.com> Date: Sat, 6 Jan 2018 11:55:10 +0000 Subject: [PATCH] Travis build: 1059 --- README.md | 41 +++++++++++++++++++++++++++++++++++++++++ docs/index.html | 12 ++++++++++-- snippets/isLowerCase.md | 2 +- snippets/isUpperCase.md | 4 ++-- tag_database | 2 ++ 5 files changed, 56 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index 46afd17cd..abdfd39a0 100644 --- a/README.md +++ b/README.md @@ -348,6 +348,8 @@ average(1, 2, 3); View contents * [`indexOfAll`](#indexofall) +* [`isLowerCase`](#islowercase) +* [`isUpperCase`](#isuppercase) @@ -5165,6 +5167,45 @@ indexOfAll([1, 2, 3], 4); // [-1]
[⬆ back to top](#table-of-contents) +### isLowerCase + +Checks if a string is lower case. + +Convert the given string to lower case, using `String.toLowerCase()` and compare it to the original. + +```js +const isLowerCase = str => str === str.toLowerCase(); +``` + +```js +isLowerCase('abc'); // true +isLowerCase('a3@$'); // true +isLowerCase('Ab4'); // false +``` + +
[⬆ back to top](#table-of-contents) + + +### isUpperCase + +Checks if a string is upper case. + +Convert the given string to upper case, using `String.toUpperCase()` and compare it to the original. + + +```js +const isUpperCase = str => str === str.toUpperCase(); +``` + +```js +isUpperCase('ABC'); // true +isLowerCase('A3@$'); // true +isLowerCase('aB4'); // false +``` + +
[⬆ back to top](#table-of-contents) + + ## Collaborators | [](https://github.com/Chalarangelo)
[Angelos Chalaris](https://github.com/Chalarangelo) | [](https://github.com/Pl4gue)
[David Wu](https://github.com/Pl4gue) | [](https://github.com/fejes713)
[Stefan Feješ](https://github.com/fejes713) | [](https://github.com/kingdavidmartins)
[King David Martins](https://github.com/iamsoorena) | [](https://github.com/iamsoorena)
[Soorena Soleimani](https://github.com/iamsoorena) | diff --git a/docs/index.html b/docs/index.html index 9df073a6b..eb2d12c09 100644 --- a/docs/index.html +++ b/docs/index.html @@ -40,7 +40,7 @@ },1700); } }, false); - }

logo 30 seconds of code Curated collection of useful JavaScript snippets that you can understand in 30 seconds or less.

 

Adapter

call

Given a key and a set of arguments, call them when given a context. Primarily useful in composition.

Use a closure to call a stored key with stored arguments.

const call = (key, ...args) => context => context[key](...args);
+      }

logo 30 seconds of code Curated collection of useful JavaScript snippets that you can understand in 30 seconds or less.

 

Adapter

call

Given a key and a set of arguments, call them when given a context. Primarily useful in composition.

Use a closure to call a stored key with stored arguments.

const call = (key, ...args) => context => context[key](...args);
 
Promise.resolve([1, 2, 3])
   .then(call('map', x => 2 * x))
   .then(console.log); //[ 2, 4, 6 ]
@@ -1111,4 +1111,12 @@ console.log<
 };
 
indexOfAll([1, 2, 3, 1, 2, 3], 1); // [0,3]
 indexOfAll([1, 2, 3], 4); // [-1]
-
\ No newline at end of file +

isLowerCase

Checks if a string is lower case.

Convert the given string to lower case, using String.toLowerCase() and compare it to the original.

const isLowerCase = str => str === str.toLowerCase();
+
isLowerCase('abc'); // true
+isLowerCase('a3@$'); // true
+isLowerCase('Ab4'); // false
+

isUpperCase

Checks if a string is upper case.

Convert the given string to upper case, using String.toUpperCase() and compare it to the original.

const isUpperCase = str => str === str.toUpperCase();
+
isUpperCase('ABC'); // true
+isLowerCase('A3@$'); // true
+isLowerCase('aB4'); // false
+
\ No newline at end of file diff --git a/snippets/isLowerCase.md b/snippets/isLowerCase.md index 623ac2a2e..602bdc427 100644 --- a/snippets/isLowerCase.md +++ b/snippets/isLowerCase.md @@ -4,7 +4,7 @@ Checks if a string is lower case. Convert the given string to lower case, using `String.toLowerCase()` and compare it to the original. -``` js +```js const isLowerCase = str => str === str.toLowerCase(); ``` diff --git a/snippets/isUpperCase.md b/snippets/isUpperCase.md index 116241fc2..d8ee59595 100644 --- a/snippets/isUpperCase.md +++ b/snippets/isUpperCase.md @@ -5,11 +5,11 @@ Checks if a string is upper case. Convert the given string to upper case, using `String.toUpperCase()` and compare it to the original. -``` js +```js const isUpperCase = str => str === str.toUpperCase(); ``` -``` js +```js isUpperCase('ABC'); // true isLowerCase('A3@$'); // true isLowerCase('aB4'); // false diff --git a/tag_database b/tag_database index 1edc5b964..1cdfd0b52 100644 --- a/tag_database +++ b/tag_database @@ -77,6 +77,7 @@ isBoolean:type isDivisible:math isEven:math isFunction:type,function +isLowerCase:uncategorized isNull:type isNumber:type,math isPrime:math @@ -86,6 +87,7 @@ isSorted:array isString:type,string isSymbol:type isTravisCI:node +isUpperCase:uncategorized isValidJSON:type,json join:array JSONToFile:node,json