open-vault/ui/app/utils/trim-right.js
Matthew Irish 4d29d70b98
UI - upgrading generic secret engines to v2 format (#4750)
* remove dev-leased-kv flag, handle non-secret responses in the console

* skip lease tests for now

* use the newer collection api for ember-page-object

* include generic in types that can have a v2

* add tests for generic v2

* isolate kv v2 logic in the secret-engine model and add unit tests
2018-06-13 23:06:19 -05:00

5 lines
154 B
JavaScript

export default function(fileName, toTrimArray = []) {
const extension = new RegExp(toTrimArray.join('$|'));
return fileName.replace(extension, '');
}