diff --git a/README.md b/README.md index 2f98025..b0d5bd6 100644 --- a/README.md +++ b/README.md @@ -19,7 +19,7 @@ npm install json-schema-patch ### import the `JSONSchemaPatch` class ```js -import JSONSchemaPatch from 'path-to-json-schema-patch'; +import { JSONSchemaPatch } from 'path-to-json-schema-patch'; ``` ### Create an instance diff --git a/package.json b/package.json index 1fbb430..d651d61 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "json-schema-patch", - "version": "0.1.0", + "version": "0.2.0", "description": "json-schema-patch", "author": "Dan Lynch ", "homepage": "https://github.com/cosmology-tech/json-schema-patch#readme", diff --git a/src/index.ts b/src/index.ts index 0014f48..4dab848 100644 --- a/src/index.ts +++ b/src/index.ts @@ -17,7 +17,7 @@ function getValueAtPath(obj, path) { } -class JSONSchemaPatch { +export class JSONSchemaPatch { private ops: JSONSchemaPatchOperation[] = []; constructor(public schema: any) { } diff --git a/types/index.d.ts b/types/index.d.ts index 8256cf2..b438a71 100644 --- a/types/index.d.ts +++ b/types/index.d.ts @@ -3,7 +3,7 @@ interface JSONSchemaPatchOperation { path: string; value?: any; } -declare class JSONSchemaPatch { +export declare class JSONSchemaPatch { schema: any; private ops; constructor(schema: any);