NPM Dependencies UPDATE
This commit is contained in:
1 parent
20c29bb4d6
commit
a9bfe7a413
599 files changed
+12369
-51423
No files matched your search
+25
@@ -0,0 +1,25 @@
|
||||
'use strict';
|
||||
|
||||
Object.defineProperty(exports, "__esModule", {
|
||||
value: true
|
||||
});
|
||||
|
||||
var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; };
|
||||
|
||||
exports.default = isJSON;
|
||||
|
||||
var _assertString = require('./util/assertString');
|
||||
|
||||
var _assertString2 = _interopRequireDefault(_assertString);
|
||||
|
||||
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
||||
|
||||
function isJSON(str) {
|
||||
(0, _assertString2.default)(str);
|
||||
try {
|
||||
var obj = JSON.parse(str);
|
||||
return !!obj && (typeof obj === 'undefined' ? 'undefined' : _typeof(obj)) === 'object';
|
||||
} catch (e) {/* ignore */}
|
||||
return false;
|
||||
}
|
||||
module.exports = exports['default'];
|
||||
Reference in new issue
Block a user