kab/kab/static/js/monaco-yaml/yamlWorker.js
/** Determines the type of a scalar according to
   * the YAML 1.2 Core Schema (http://www.yaml.org/spec/1.2/spec.html#id2804923)
   */
Determines the type of a scalar according to
the YAML 1.2 Core Schema
Determines the type of a scalar according to the YAML 1 . 2 Core Schema
function determineScalarType(node) {
    if (node === undefined) {
      return ScalarType.null;
    }
    if (node.doubleQuoted || !node.plainScalar || node['singleQuoted']) {
      return ScalarType.string;
    }
    var value = node.value;
    if (['null', 'Null', 'NULL', '~', ''].indexOf(value) >= 0) {
      return ScalarType.null;
    }
    if (value === null || value === undefined) {
      return ScalarType.null;
    }
    if (['true', 'True', 'TRUE', 'false', 'False', 'FALSE'].indexOf(value) >= 0) {
      return ScalarType.bool;
    }
    var base10 = /^[-+]?[0-9]+$/;
    var base8 = /^0o[0-7]+$/;
    var base16 = /^0x[0-9a-fA-F]+$/;
    if (base10.test(value) || base8.test(value) || base16.test(value)) {
      return ScalarType.int;
    }
    var float = /^[-+]?(\.[0-9]+|[0-9]+(\.[0-9]*)?)([eE][-+]?[0-9]+)?$/;
    var infinity = /^[-+]?(\.inf|\.Inf|\.INF)$/;
    if (float.test(value) || infinity.test(value) || ['.nan', '.NaN', '.NAN'].indexOf(value) >= 0) {
      return ScalarType.float;
    }
    return ScalarType.string;
  }
function determineScalarType ( node ) { if ( node === undefined ) { return ScalarType . null ; } if ( node . doubleQuoted || ! node . plainScalar || node [ 'singleQuoted' ] ) { return ScalarType . string ; } var value = node . value ; if ( [ 'null' , 'Null' , 'NULL' , '~' , '' ] . indexOf ( value ) >= 0 ) { return ScalarType . null ; } if ( value === null || value === undefined ) { return ScalarType . null ; } if ( [ 'true' , 'True' , 'TRUE' , 'false' , 'False' , 'FALSE' ] . indexOf ( value ) >= 0 ) { return ScalarType . bool ; } var base10 = / ^[-+]?[0-9]+$ / ; var base8 = / ^0o[0-7]+$ / ; var base16 = / ^0x[0-9a-fA-F]+$ / ; if ( base10 . test ( value ) || base8 . test ( value ) || base16 . test ( value ) ) { return ScalarType . int ; } var float = / ^[-+]?(\.[0-9]+|[0-9]+(\.[0-9]*)?)([eE][-+]?[0-9]+)?$ / ; var infinity = / ^[-+]?(\.inf|\.Inf|\.INF)$ / ; if ( float . test ( value ) || infinity . test ( value ) || [ '.nan' , '.NaN' , '.NAN' ] . indexOf ( value ) >= 0 ) { return ScalarType . float ; } return ScalarType . string ; }
Determines the type of a scalar according to
 the YAML 1.2 Core Schema (http://www.yaml.org/spec/1.2/spec.html#id2804923)
Determines the type of a scalar according to the YAML 1 . 2 Core Schema ( http : // www . yaml . org / spec / 1 . 2 / spec . html#id2804923 )