'use strict'; function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); } module.exports = function toJson() { if (_typeof(this.items) === 'object' && !Array.isArray(this.items)) { return JSON.stringify(this.all()); } return JSON.stringify(this.toArray()); };