🚀 Feature Proposal
const value = 'hello model.id'
# Verify the existence of at least one of the values
value.athenna.includesSome('models.id', 'models.provider') // true
String.includesSome(string, 'models.id', 'models.provider') // true
# Verify the existence of all the values
value.athenna.includesEvery(['models.id', 'models.provider']) // false
String.includesEvery(string, 'models.id', 'models.provider') // false
The implementation of both helpers could be achieved by doing the following (both helpers needs to accept an array of arguments as second parameter (...args or []), where the first one will be the actual string to validate):
const value = 'hello model.id'
['models.id', 'models.provider'].some(i => value.includes(i)) // true
['models.id', 'models.provider'].every(i => value.includes(i)) // false
Motivation
Improve String helper.
Example
No response
🚀 Feature Proposal
The implementation of both helpers could be achieved by doing the following (both helpers needs to accept an array of arguments as second parameter (
...argsor[]), where the first one will be the actual string to validate):Motivation
Improve
Stringhelper.Example
No response