How to use the recast/lib/util.composeSourceMaps function in recast

To help you get started, we’ve selected a few recast examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github riot / compiler / src / utils / compose-sourcemaps.js View on Github external
export default function composeSourcemaps(formerMap, latterMap) {
  if (
    isNode() &&
    formerMap && latterMap && latterMap.mappings
  ) {
    return composeSourceMaps(asJSON(formerMap), asJSON(latterMap))
  } else if (isNode() && formerMap) {
    return asJSON(formerMap)
  }

  return {}
}