-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: Luke Steensen <luke.steensen@gmail.com>
- Loading branch information
1 parent
60b02e9
commit cec3b00
Showing
5 changed files
with
52 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
package metadata | ||
|
||
remap: functions: match_any: { | ||
category: "String" | ||
description: """ | ||
Determines whether the `value` matches any the given `patterns`. | ||
""" | ||
|
||
arguments: [ | ||
{ | ||
name: "value" | ||
description: "The value to match." | ||
required: true | ||
type: ["string"] | ||
}, | ||
{ | ||
name: "patterns" | ||
description: "The array of regular expression patterns to match against." | ||
required: true | ||
type: ["array"] | ||
}, | ||
] | ||
internal_failure_reasons: [] | ||
return: types: ["boolean"] | ||
|
||
examples: [ | ||
{ | ||
title: "Regex match on a string" | ||
source: """ | ||
match_any("I'm a little teapot", [r'frying pan', r'teapot']) | ||
""" | ||
return: true | ||
}, | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters