code: function convertPrefix(str) {
      var res = new Array(str.length);
      for (var i = 0; i < str.length; ++i)
          res[i] = str[i] === '1';
      return res;
  }
docs: Create an Array prefix from a String composed of 1s and 0s. Eg. '101' gives [true, false, true].