ran npm run tdd & generated TDD
This commit is contained in:
8
test/isValidJSON/isValidJSON.js
Normal file
8
test/isValidJSON/isValidJSON.js
Normal file
@ -0,0 +1,8 @@
|
||||
module.exports = obj => {
|
||||
try {
|
||||
JSON.parse(obj);
|
||||
return true;
|
||||
} catch (e) {
|
||||
return false;
|
||||
}
|
||||
};
|
||||
Reference in New Issue
Block a user