Generates a diff between two browserify-json-bundles. This is part of the browserify-diff toolchain.
Example
From:
To:
Resulting diff:
Methods
var diff = require('browserify-json-bundle-diff');
create(from, to)
Generates a diff between two browserify-json-bundles. It will:
- Put the version of
from
as the value for thefrom
key in the diff - Put the version of
to
as the value for theto
key in the diff - Add any module in
to
that is not present infrom
to themodules
hash - Add any module in
to
that is not equal to the same module infrom
to themodules
hash - Add any module that is present in
from
but not into
to themodules
hash with a value ofnull
- Adds the
entry
fromto
if it is not equal to theentry
fromfrom
.
merge(first, second)
Merges two diffs together. It is required that the second diff is a direct successor of the first diff, that is first.to === second.from
.