lib/index.js
function parsePlaceholders (source) {
  return source.match(/\([^\)]+\)/g).reduce(function (result, placeholder) {
    placeholder = placeholder.replace(/^\(([^\)]+)\)$/, '$1');
    var keyValue = placeholder.split(':');
    result[keyValue[0]] = {
      content: keyValue[1]
    };
    return result;
  }, {});
}
function parsePlaceholders (source) {
  return source.match(/\([^\)]+\)/g).reduce(function (result, placeholder) {
    placeholder = placeholder.replace(/^\(([^\)]+)\)$/, '$1');
    var keyValue = placeholder.split(':');
    result[keyValue[0]] = {
      content: keyValue[1]
    };
    return result;
  }, {});
}
function parsePlaceholders ( source ) { return source . match ( / \([^\)]+\) / g ) . reduce ( function ( result , placeholder ) { placeholder = placeholder . replace ( / ^\(([^\)]+)\)$ / , '$1' ) ; var keyValue = placeholder . split ( ':' ) ; result [ keyValue [ 0 ] ] = { content : keyValue [ 1 ] } ; return result ; } , { } ) ; }
Generates a placeholders object from a source string
@param {string} source
@returns {object}
Generates a placeholders object from a source string