Travis build: 848 [cron]
This commit is contained in:
4
dist/_30s.es5.js
vendored
4
dist/_30s.es5.js
vendored
@ -1274,9 +1274,9 @@
|
|||||||
var isUpperCase = function isUpperCase(str) {
|
var isUpperCase = function isUpperCase(str) {
|
||||||
return str === str.toUpperCase();
|
return str === str.toUpperCase();
|
||||||
};
|
};
|
||||||
var isValidJSON = function isValidJSON(obj) {
|
var isValidJSON = function isValidJSON(str) {
|
||||||
try {
|
try {
|
||||||
JSON.parse(obj);
|
JSON.parse(str);
|
||||||
return true;
|
return true;
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
return false;
|
return false;
|
||||||
|
|||||||
4
dist/_30s.esm.js
vendored
4
dist/_30s.esm.js
vendored
@ -610,9 +610,9 @@ const isSymbol = val => typeof val === 'symbol';
|
|||||||
const isTravisCI = () => 'TRAVIS' in process.env && 'CI' in process.env;
|
const isTravisCI = () => 'TRAVIS' in process.env && 'CI' in process.env;
|
||||||
const isUndefined = val => val === undefined;
|
const isUndefined = val => val === undefined;
|
||||||
const isUpperCase = str => str === str.toUpperCase();
|
const isUpperCase = str => str === str.toUpperCase();
|
||||||
const isValidJSON = obj => {
|
const isValidJSON = str => {
|
||||||
try {
|
try {
|
||||||
JSON.parse(obj);
|
JSON.parse(str);
|
||||||
return true;
|
return true;
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
return false;
|
return false;
|
||||||
|
|||||||
4
dist/_30s.js
vendored
4
dist/_30s.js
vendored
@ -616,9 +616,9 @@
|
|||||||
const isTravisCI = () => 'TRAVIS' in process.env && 'CI' in process.env;
|
const isTravisCI = () => 'TRAVIS' in process.env && 'CI' in process.env;
|
||||||
const isUndefined = val => val === undefined;
|
const isUndefined = val => val === undefined;
|
||||||
const isUpperCase = str => str === str.toUpperCase();
|
const isUpperCase = str => str === str.toUpperCase();
|
||||||
const isValidJSON = obj => {
|
const isValidJSON = str => {
|
||||||
try {
|
try {
|
||||||
JSON.parse(obj);
|
JSON.parse(str);
|
||||||
return true;
|
return true;
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
return false;
|
return false;
|
||||||
|
|||||||
@ -2467,7 +2467,7 @@
|
|||||||
"archived": false
|
"archived": false
|
||||||
},
|
},
|
||||||
"meta": {
|
"meta": {
|
||||||
"hash": "b4417a972f391836241e88587797a8cd995f32ee71fbfcfe9e590c8fa8675558"
|
"hash": "9a304bb4dbaddc9c5e0cdc56606ee8286c891d6f82076e5742514f251b30a891"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|||||||
@ -3622,10 +3622,10 @@
|
|||||||
"type": "snippet",
|
"type": "snippet",
|
||||||
"attributes": {
|
"attributes": {
|
||||||
"fileName": "isValidJSON.md",
|
"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": {
|
"codeBlocks": {
|
||||||
"es6": "const 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(obj) {\n try {\n JSON.parse(obj);\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"
|
"example": "isValidJSON('{\"name\":\"Adam\",\"age\":20}'); // true\nisValidJSON('{\"name\":\"Adam\",age:\"20\"}'); // false\nisValidJSON(null); // true"
|
||||||
},
|
},
|
||||||
"tags": [
|
"tags": [
|
||||||
@ -3636,7 +3636,7 @@
|
|||||||
},
|
},
|
||||||
"meta": {
|
"meta": {
|
||||||
"archived": false,
|
"archived": false,
|
||||||
"hash": "b4417a972f391836241e88587797a8cd995f32ee71fbfcfe9e590c8fa8675558"
|
"hash": "9a304bb4dbaddc9c5e0cdc56606ee8286c891d6f82076e5742514f251b30a891"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|||||||
@ -1578,16 +1578,16 @@
|
|||||||
"isValidJSON": {
|
"isValidJSON": {
|
||||||
"prefix": "30s_isValidJSON",
|
"prefix": "30s_isValidJSON",
|
||||||
"body": [
|
"body": [
|
||||||
"const isValidJSON = obj => {",
|
"const isValidJSON = str => {",
|
||||||
" try {",
|
" try {",
|
||||||
" JSON.parse(obj);",
|
" JSON.parse(str);",
|
||||||
" return true;",
|
" return true;",
|
||||||
" } catch (e) {",
|
" } catch (e) {",
|
||||||
" return false;",
|
" 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": {
|
"isWritableStream": {
|
||||||
"prefix": "30s_isWritableStream",
|
"prefix": "30s_isWritableStream",
|
||||||
|
|||||||
Reference in New Issue
Block a user