Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
.map( ( cardinalDirection ) => {
const count = listingCounts.location.cardinalDirection[cardinalDirection];
return (
{ `${capitalCase( cardinalDirection )} of Boston (${count || '0'})` }
);
} )
}
.map((serviceId) => {
const name = capitalCase(serviceId)
const slug = getServiceSlug(serviceId)
const operations = operationObjects.filter(
(o) => getServiceId(o.operationId) === serviceId
)
return { name, slug, operations }
})[0]
const getNextStepName = () => {
const nextStep = ( step + 1 );
const stepDefinition = props.steps[nextStep - 1];
if ( stepDefinition ) {
return capitalCase( stepDefinition.component.displayName );
}
return null;
};
function getServiceSlug(serviceId) {
return slugify(capitalCase(serviceId))
}
const order = serviceIds.map((serviceId) => {
return {
title: capitalCase(serviceId),
indexData: true,
path: getServiceSlug(serviceId),
}
})
return order
switch ( type ) {
case 'apt':
return 'Apartment';
case 'sro':
return 'Single Room Occupancy';
case 'condo':
return 'Condominium';
case 'multi-family':
return 'Multi-family';
default:
return capitalCase( type );
}
}
.map( ( neighborhood ) => {
const count = listingCounts.location.neighborhood[neighborhood];
return (
{ `${capitalCase( neighborhood )} (${count || '0'})` }
);
} )
}