delivery-methods/index.js
const DELIVERY = "Delivery"
const CARRIER = "Carrier"
const COLLATION = "Collation"
const CASH_AND_CARRY = "Cash and carry"
export default {
DELIVERY: DELIVERY,
CARRIER: CARRIER,
COLLATION: COLLATION,
CASH_AND_CARRY: CASH_AND_CARRY
}
Usage
import DeliveryMethods from './path/to/delivery-methods'
console.log(DeliveryMethods.CARRIER)
Or:
config.js
export default Object.freeze({
DELIVERY: "Delivery",
CARRIER: "Carrier",
COLLATION: "Collation",
CASH_AND_CARRY: "Cash and carry"
})
Usage:
import DeliveryMethods from './path/to/delivery-methods'
console.log(DeliveryMethods.CARRIER)