I have the following code:
let value = $(this).data('value');
value = System.decrypt(value, key);
$(this).data('value', value);
I’d like it to support chaining:
$(this)
.data('value', (value) => System.decrypt(value, key))
.css(…)
.prop(…);
But as far as I see, jQuery doesn’t have a lambda version of .data()
. Is there a simple way to achieve this, or I should write a plugin?