Security News
Weekly Downloads Now Available in npm Package Search Results
Socket's package search now displays weekly downloads for npm packages, helping developers quickly assess popularity and make more informed decisions.
@boenfu/tsmonkey
Advanced tools
npm install @boenfu/tsmonkey
import type { Eval } from '@boenfu/tsmonkey'
Eval<'4 + 8'> // 12
Eval<'2 * (4 + 8)'> // 24
Eval<'!99'> // false
Eval<'(3 + 2) * 5 == 25'> // true
Eval<'(3 > 2) != (2 > 3)'> // true
Eval<'7 && 9'> // 9
Eval<'false || 0'> // 0
variable declaration
Eval<`
let a = 2
let b = 3
let c = a * b
c * c
`> // 36
if else
Eval<`
let a = 2
let b = 3
if(a >= b) {
return "a is greater than b"
} else {
return "a is less than b"
}
`> // "a is less than b"
function
Eval<`
let a = 5
let b = 10
function foo(a, b) {
return a - b
}
foo(b, a)
`> // 5
fibonacci
Eval<`
function fibonacci(n) {
if (n < 2) { return 0 }
if (n == 2) { return 1 }
return fibonacci(n-1) + fibonacci(n - 2)
}
fibonacci(6)
`> // 5
import type { Parser } from '@boenfu/tsmonkey'
Parser<'let a = "如果你要写年"'>
// Program<[LetStatement<Identifier<"a">, StringLiteral<"如果你要写年">>]>
import type { Lexer } from '@boenfu/tsmonkey'
Lexer<'let a = "如果你要写年"'>
// [
// Token<TokenType.LET, "let">,
// Token<TokenType.IDENT, "a">,
// Token<TokenType.ASSIGN, "=">,
// Token<TokenType.STRING, "如果你要写年">,
// Token<TokenType.EOF, "">
// ]
FAQs
```bash npm install @boenfu/tsmonkey ```
The npm package @boenfu/tsmonkey receives a total of 0 weekly downloads. As such, @boenfu/tsmonkey popularity was classified as not popular.
We found that @boenfu/tsmonkey 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
Socket's package search now displays weekly downloads for npm packages, helping developers quickly assess popularity and make more informed decisions.
Security News
A Stanford study reveals 9.5% of engineers contribute almost nothing, costing tech $90B annually, with remote work fueling the rise of "ghost engineers."
Research
Security News
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.