isReadonly

Indicates whether the value is readonly

isReadonly(key)

Parameters

key
{string} name of the key you want to check

Return

This method return a boolean

Exemples

// No readonly

OhMyCache.Local.set('key', 'value')
OhMyCache.Local.isReadonly('key') // false


// is readonly

OhMyCache.Local.set('key', 'value', {readonly: true})
OhMyCache.Local.isReadonly('key') // true