Welcome to mirror list, hosted at ThFree Co, Russian Federation.

diff_worker.js « diff « lib « ide « javascripts « assets « app - gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 77416a8de9d69a6c6cd5d3a299a37de5b31ab4bc (plain)
1
2
3
4
5
6
7
8
9
10
11
12
import { computeDiff } from './diff';

// eslint-disable-next-line no-restricted-globals
self.addEventListener('message', e => {
  const { data } = e;

  // eslint-disable-next-line no-restricted-globals
  self.postMessage({
    path: data.path,
    changes: computeDiff(data.originalContent, data.newContent),
  });
});