
Security News
vlt Launches "reproduce": A New Tool Challenging the Limits of Package Provenance
vlt's new "reproduce" tool verifies npm packages against their source code, outperforming traditional provenance adoption in the JavaScript ecosystem.
@moonbit/markdown-linter
Advanced tools
This is a Markdown linter for MoonBit. It gathers all MoonBit codes in Markdown, checks them using MoonBit's compiler, and reports any diagnostics.
To use the MoonBit Markdown Linter, you need to install the MoonBit compiler.
npm install -g @moonbit/markdown-linter
Create a markdown file fib.md
, write some MoonBit code in code block:
# Fibonacci
Calculate the nth Fibonacci number using recursion and pattern matching.
```mbt
fn fib(n : Int) -> Int {
match n {
0 => 0
1 => true // type error here
_ => fib(n - 1) + fib(n - 2)
}
}
```
Check it by MoonBit markdown linter.
$ mdlint fib.md
fib.md:6:4-6:7 Warning 001: Unused function 'fib'
fib.md:9:14-9:18 Expr Type Mismatch
has type : Bool
wanted : Int
In file identity.md:
# Identity
```mbt
fn id[T : Eq](x : T) -> T {
x
}
```
Print `id(5)` in `init` function.
```mbt, init
debug(id(5))
```
You can also write expression directly.
```mbt, expr
id(5)
```
Test function `id`.
```mbt
test "id" {
if id(5) != 5 { return Result::Err("test failed") }
}
```
Run test and evaluate the expression by mdlint
:
$ mdlint identity.md
5
5
running 1 tests in package identity
test identity::id ... ok
test result: 1 passed; 0 failed
FAQs
markdown linter for MoonBit
The npm package @moonbit/markdown-linter receives a total of 2 weekly downloads. As such, @moonbit/markdown-linter popularity was classified as not popular.
We found that @moonbit/markdown-linter demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
vlt's new "reproduce" tool verifies npm packages against their source code, outperforming traditional provenance adoption in the JavaScript ecosystem.
Research
Security News
Socket researchers uncovered a malicious PyPI package exploiting Deezer’s API to enable coordinated music piracy through API abuse and C2 server control.
Research
The Socket Research Team discovered a malicious npm package, '@ton-wallet/create', stealing cryptocurrency wallet keys from developers and users in the TON ecosystem.