code: function parse(raw, opts) {
    opts = opts || {}
  
    var preserveNumbers = opts.preserveNumbers;
    var trim = function (s) { return s.trim(); };
    var obj = {};
  
    getKeyValueChunks(raw)
      .map(trim)
      .filter(Boolean)
      .forEach(function (item) {
        // split with `.indexOf` rather than `.split` because the value may also contain colons.
        var pos = item.indexOf(':');
        var key = item.substr(0, pos).trim();
        var val = item.substr(pos + 1).trim();
        if (preserveNumbers && isNumeric(val)) {
          val = Number(val);
        }
  
        obj[key] = val;
      });
  
    return obj;
  }
docs: /*
  
  style-attr
  ====
  
  Very simple parsing and stringifying of style attributes.
  
  `parse`
  ----
  
  Convert a style attribute string to an object.
  
   /*:: declare function parse (raw: string, opts: ?Opts): Attr