Prism · Predicates

$startsWith

True when a string begins with prefix.

The source
{ url: 'https://nisc.dev' }
The config
{
  $startsWith: {
    value: { $ref: '$.url' },
    prefix: { $const: 'https://' },
  },
}
What comes out
true
Output matches the expected value

Runs in this page on the installed package. The input and the expected output are defined by the example.