We have created a JSON constant we are sharing with various LWC. While we can define the JSON reference as const, the properties on the object can be changed by calling code.
For example:
const constants = {
label: '30 years',
value: 30
};
While we cannot do this:
constants = 'ABC';
We can do this:
constants.label = '20 years';
Is there a way to lock down the properties of the JSON so that they cannot be changed?