Compare ontologies in order to migrate between them.
Install the @lifeomic/termdiff
package.
npm install @lifeomic/termdiff
or
yarn add @lifeomic/termdiff
Import the diff
function:
import { diff } from 'termdiff';
Apply it to create a changeset:
const changeset = diff([{ 'foo': 'bar'}], [{'qux': 'baz'}])
changeset
will contain be an array of operations:
console.log(JSON.stringify(changeset, null, 2));
[
{
"op": "add",
"value": {
"qux": "baz"
}
},
{
"op": "remove",
"value": {
"foo": "bar"
}
}
]
These instructions will get you a copy of the project up and running on your local machine for development and testing purposes. See deployment for notes on how to release the project.
What things you need to install the software and how to install them
Install all dependencies using yarn
:
yarn install
We use jest
for testing and enforce 100% code coverage:
yarn test
Coding style is enforced through eslint
:
yarn lint
You can invoke the following to style your code:
yarn lint --fix
Deployments are automated using GitHub Actions. Update the version in package.json
to release a new version
See the section on versioning to learn more.
- Node.js - A JavaScript runtime
Please read CONTRIBUTING.md for details on our code of conduct, and the process for submitting pull requests to us.
We use SemVer for versioning. For the versions available, see the tags on this repository.
- Taylor Steinberg - Initial work - tdstein
See also the list of contributors who participated in this project.
This project is licensed under the MIT License - see the LICENSE file for details
- The output format was inspired by the JSON Patch proposal