jupyter-ijavascript-utils 1.16.2 → 1.16.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/src/format.js +3 -0
package/package.json
CHANGED
package/src/format.js
CHANGED
|
@@ -170,6 +170,9 @@ module.exports.printValue = function printValue(value, options) {
|
|
|
170
170
|
return `[Map length=${value.size} ]`;
|
|
171
171
|
}
|
|
172
172
|
return JSON.stringify(value, FormatUtils.mapReplacer);
|
|
173
|
+
} else if (typeof value[Symbol.iterator] === 'function') {
|
|
174
|
+
//-- iterator
|
|
175
|
+
return JSON.stringify(Array.from(value));
|
|
173
176
|
} else if (valType === 'object' && (collapseObjects || collapse)) {
|
|
174
177
|
return String(value);
|
|
175
178
|
}
|