Travis build: 848 [cron]

This commit is contained in:
30secondsofcode
2018-12-04 14:27:55 +00:00
parent 96b8fc7ef0
commit 6cb74a6c8e
6 changed files with 14 additions and 14 deletions

4
dist/_30s.es5.js vendored
View File

@ -1274,9 +1274,9 @@
var isUpperCase = function isUpperCase(str) {
return str === str.toUpperCase();
};
var isValidJSON = function isValidJSON(obj) {
var isValidJSON = function isValidJSON(str) {
try {
JSON.parse(obj);
JSON.parse(str);
return true;
} catch (e) {
return false;

4
dist/_30s.esm.js vendored
View File

@ -610,9 +610,9 @@ const isSymbol = val => typeof val === 'symbol';
const isTravisCI = () => 'TRAVIS' in process.env && 'CI' in process.env;
const isUndefined = val => val === undefined;
const isUpperCase = str => str === str.toUpperCase();
const isValidJSON = obj => {
const isValidJSON = str => {
try {
JSON.parse(obj);
JSON.parse(str);
return true;
} catch (e) {
return false;

4
dist/_30s.js vendored
View File

@ -616,9 +616,9 @@
const isTravisCI = () => 'TRAVIS' in process.env && 'CI' in process.env;
const isUndefined = val => val === undefined;
const isUpperCase = str => str === str.toUpperCase();
const isValidJSON = obj => {
const isValidJSON = str => {
try {
JSON.parse(obj);
JSON.parse(str);
return true;
} catch (e) {
return false;

View File

@ -2467,7 +2467,7 @@
"archived": false
},
"meta": {
"hash": "b4417a972f391836241e88587797a8cd995f32ee71fbfcfe9e590c8fa8675558"
"hash": "9a304bb4dbaddc9c5e0cdc56606ee8286c891d6f82076e5742514f251b30a891"
}
},
{

View File

@ -3622,10 +3622,10 @@
"type": "snippet",
"attributes": {
"fileName": "isValidJSON.md",
"text": "Checks if the provided argument is a valid JSON.\n\nUse `JSON.parse()` and a `try... catch` block to check if the provided argument is a valid JSON.",
"text": "Checks if the provided string is a valid JSON.\n\nUse `JSON.parse()` and a `try... catch` block to check if the provided string is a valid JSON.",
"codeBlocks": {
"es6": "const isValidJSON = obj => {\n try {\n JSON.parse(obj);\n return true;\n } catch (e) {\n return false;\n }\n};",
"es5": "var isValidJSON = function isValidJSON(obj) {\n try {\n JSON.parse(obj);\n return true;\n } catch (e) {\n return false;\n }\n};",
"es6": "const isValidJSON = str => {\n try {\n JSON.parse(str);\n return true;\n } catch (e) {\n return false;\n }\n};",
"es5": "var isValidJSON = function isValidJSON(str) {\n try {\n JSON.parse(str);\n return true;\n } catch (e) {\n return false;\n }\n};",
"example": "isValidJSON('{\"name\":\"Adam\",\"age\":20}'); // true\nisValidJSON('{\"name\":\"Adam\",age:\"20\"}'); // false\nisValidJSON(null); // true"
},
"tags": [
@ -3636,7 +3636,7 @@
},
"meta": {
"archived": false,
"hash": "b4417a972f391836241e88587797a8cd995f32ee71fbfcfe9e590c8fa8675558"
"hash": "9a304bb4dbaddc9c5e0cdc56606ee8286c891d6f82076e5742514f251b30a891"
}
},
{

View File

@ -1578,16 +1578,16 @@
"isValidJSON": {
"prefix": "30s_isValidJSON",
"body": [
"const isValidJSON = obj => {",
"const isValidJSON = str => {",
" try {",
" JSON.parse(obj);",
" JSON.parse(str);",
" return true;",
" } catch (e) {",
" return false;",
" }",
"};"
],
"description": "Checks if the provided argument is a valid JSON.\n\nUse `JSON.parse()` and a `try... catch` block to check if the provided argument is a valid JSON"
"description": "Checks if the provided string is a valid JSON.\n\nUse `JSON.parse()` and a `try... catch` block to check if the provided string is a valid JSON"
},
"isWritableStream": {
"prefix": "30s_isWritableStream",