generated from AthennaIO/Template
-
-
Notifications
You must be signed in to change notification settings - Fork 1
Open
Labels
featureNew feature or requestNew feature or requestgood first issueGood for newcomersGood for newcomers
Description
🚀 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
Metadata
Metadata
Assignees
Labels
featureNew feature or requestNew feature or requestgood first issueGood for newcomersGood for newcomers
Type
Projects
Status
In Progress