common.js 273 Bytes RawBlameHistoryPermalink 1 2 3 4 5 6 7 8 9 10 11 export let getApiName = str => { return str.substr(str.lastIndexOf('/') + 1, str.length) } export let createApiObj = ((apiPathArr, PROJECT_ROOT = '') => { let obj = {}; apiPathArr.forEach(item => { obj[getApiName(item)] = PROJECT_ROOT + item }) return obj })