How to use the @mapbox/mapbox-gl-style-spec.diff function in @mapbox/mapbox-gl-style-spec

To help you get started, we’ve selected a few @mapbox/mapbox-gl-style-spec 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 maputnik / editor / src / libs / diffmessage.js View on Github external
export function diffMessages(beforeStyle, afterStyle) {
  const changes = diff(beforeStyle, afterStyle)
  return changes.map(cmd => cmd.command + ' ' + cmd.args.join(' '))
}