Skip to content

Commit

Permalink
Merge pull request #21 from Callidon/fix_saveasjson
Browse files Browse the repository at this point in the history
Add saveAsJSON and fromJSON in base-filter
  • Loading branch information
Callidon authored Mar 10, 2021
2 parents d50fa99 + 387b6c7 commit 4a38a28
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions src/base-filter.ts
Original file line number Diff line number Diff line change
Expand Up @@ -64,4 +64,20 @@ export default abstract class BaseFilter {
get random (): () => number {
return this._rng
}

/**
* Save the current structure as a JSON object
*/
saveAsJSON() {
throw new Error('Not Implemented')
}

/**
* Load an Object from a provided JSON object
* @param json the JSON object to load
* @return Return the Object loaded from the provided JSON object
*/
static fromJSON(json: any) {
throw new Error('Not Implemented')
}
}

0 comments on commit 4a38a28

Please sign in to comment.