Skip to content

Commit 2d55e2a

Browse files
feildmasterclaude
andcommitted
docs(api): use semver.meets in the version check example
Note that meets only exists from 0.65.0 and point older targets at isOlder. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
1 parent bb5b249 commit 2d55e2a

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

‎docs/_api/index.md‎

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,11 +14,13 @@ The [Plugin Object]({{ site.baseurl }}{% link _api/plugin/index.md %}) is where
1414
Features are added over time. To only use a feature when it exists, check the version first:
1515

1616
{% highlight javascript %}
17-
if (underscript.semver.isOlder('0.64.0')) {
18-
// Safe to use features from 0.64.0
17+
if (underscript.semver.meets('0.65.0')) {
18+
// Safe to use features from 0.65.0
1919
}
2020
{% endhighlight %}
2121

22+
`meets` was added in 0.65.0. If your plugin also runs on older versions, use `underscript.semver.isOlder('0.64.0')` for the same check.
23+
2224
See [underscript.semver]({{ site.baseurl }}{% link _api/underscript/semver.md %}).
2325

2426
## Editor support

0 commit comments

Comments
 (0)