INNER CODE UNIT · JavaScript

normalizeValue

ScanNet/ScanNet · WebUI/src/hooks/index.js:9

function normalizeValue(v) {
  if (typeof v === 'string') {
    var vl = v.toLowerCase();
    if (vl === 'true') {
      return true;
    } else if (vl === 'false') {
      return false;
    }
  }
  return v;
}

exports.rewriteQuery = function(options) {
  const rewriteQueries = data => {
    for (let k in data) {
      var value = data[k];
      if (value['$exists'] != undefined) {
        value['$exists'] = normalizeValue(value['$exists']);

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…