src/app/lib/utilities/imageSrcHelpers/locator.js

Summary

Maintainability
A
0 mins
Test Coverage
A
100%
const getLocator = path => {
  if (!path || path.indexOf('/') === -1) {
    return null;
  }

  const items = path.slice(1).split('/');
  const locator = items.slice(1).join('/');
  return locator;
};

export default getLocator;