src/api/v4/layer/metadata/parser.js
function getMetadataFromRules (rulesData) {
  var metadata = [];

  rulesData.forEach(function (ruleData) {
    var rule = new Rule(ruleData);

    if (_isBucketsMetadata(rule)) {
      metadata.push(new BucketsMetadata(rule));
    } else if (_isCategoriesMetadata(rule)) {
      metadata.push(new CategoriesMetadata(rule));
    }
  });

  return metadata;
}
function getMetadataFromRules (rulesData) {
  var metadata = [];

  rulesData.forEach(function (ruleData) {
    var rule = new Rule(ruleData);

    if (_isBucketsMetadata(rule)) {
      metadata.push(new BucketsMetadata(rule));
    } else if (_isCategoriesMetadata(rule)) {
      metadata.push(new CategoriesMetadata(rule));
    }
  });

  return metadata;
}
function getMetadataFromRules ( rulesData ) { var metadata = [ ] ; rulesData . forEach ( function ( ruleData ) { var rule = new Rule ( ruleData ) ; if ( _isBucketsMetadata ( rule ) ) { metadata . push ( new BucketsMetadata ( rule ) ) ; } else if ( _isCategoriesMetadata ( rule ) ) { metadata . push ( new CategoriesMetadata ( rule ) ) ; } } ) ; return metadata ; }
Generates a list of Metadata objects from the original cartocss_meta rules

@param  {Rules} rulesData
@return {metadata.Base[]}
Generates a list of Metadata objects from the original cartocss_meta rules