Need to override function writeQuery with custom function


I have a requirement to override writeQuery method in the mapd crossfilter libray.
Can you suggest a way in which I can override the writeQuery method in the crossfilter js using custom function by inheriting in new object without making changes in this mapd-crossfilter.js