import { pluckDeep as pluckDeep$1 } from './pluck-deep.js';

function getWidth(value = {}, defaultWidth = 0, key = 'width') {
  const width = typeof value === 'number' ? value : pluckDeep$1(value, key);
  return width ? `${width}px` : `${defaultWidth}px`;
}

export { getWidth };
