jupyter-ijavascript-utils 1.21.0 → 1.21.1

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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "jupyter-ijavascript-utils",
3
- "version": "1.21.0",
3
+ "version": "1.21.1",
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/describe.js CHANGED
@@ -167,7 +167,7 @@ class BooleanDescription extends SeriesDescription {
167
167
  * @returns {Boolean} - true if the value matches
168
168
  */
169
169
  static matchesType(value) {
170
- return FormatUtils.parseBoolean(value);
170
+ return FormatUtils.isBoolean(value);
171
171
  }
172
172
 
173
173
  check(value) {
package/src/format.js CHANGED
@@ -869,6 +869,14 @@ module.exports.parseBoolean = function parseBoolean(val) {
869
869
  || val === 'true';
870
870
  };
871
871
 
872
+ module.exports.isBoolean = function isBoolean(val) {
873
+ return val === true || val === false
874
+ || val === 1 || val === 0
875
+ || val === 'TRUE' || val === 'FALSE'
876
+ || val === 'True' || val === 'False'
877
+ || val === 'true' || val === 'false';
878
+ };
879
+
872
880
  /**
873
881
  * Narrows to only fromLine - toLine (inclusive) within a string.
874
882
  *