@apistudio/apim-cli
Version:
CLI for API Management Products
18 lines (14 loc) • 373 B
text/typescript
/**
* Copyright Super iPaaS Integration LLC, an IBM Company 2024
*/
import {isNullOrUndefined} from './data-helper.js';
const cropPrefix = (input: string, prefix: string) => {
if (isNullOrUndefined(input) || isNullOrUndefined(prefix)) {
return input;
}
if (input.startsWith(prefix)) {
return input.slice(prefix.length);
}
return input;
};
export {cropPrefix};