Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
* `articleId` -> `articleRowId`
* `user_row_id` -> `user_row_id` (will stay the same if `id` is prefixed with `row_`)
* `userRowId` -> `userRowId` (will stay the same if `Id` is prefixed with `Row`)
*/
const { makeAddInflectorsPlugin } = require('graphile-utils');
function replaceIdWithRowId(str) {
return str
.replace(/(?
public static createAddInflectorsPlugin(
inflectorName: string,
method: (...args: any[]) => any,
overwriteExisting?: boolean,
) {
return makeAddInflectorsPlugin(
{ [inflectorName]: method },
overwriteExisting,
);
}
}