3 ms·
This is actually a pretty decent use case for something like this. You could technically convert a user provided filter function to a string to serialize it, th
by throwitaway1123 2y ago
This is actually a pretty decent use case for something like this. You could technically convert a user provided filter function to a string to serialize it, then recreate it using the Function() constructor, but that requires adding 'unsafe-eval' to your content security policy [1][2].
[1] https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Function/toString https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe...
[2] https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Function/Function https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe...
- allannienhuis 2y agoand it requires users to define filter functions, which isn't happening with any users I deal with :)