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.
Files changed (2) hide show
  1. package/package.json +1 -1
  2. package/src/format.js +3 -0
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "jupyter-ijavascript-utils",
3
- "version": "1.16.2",
3
+ "version": "1.16.3",
4
4
  "description": "Utilities for working with iJavaScript - a Jupyter Kernel",
5
5
  "homepage": "https://jupyter-ijavascript-utils.onrender.com/",
6
6
  "license": "MIT",
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
  }