
Security News
Deno 2.2 Improves Dependency Management and Expands Node.js Compatibility
Deno 2.2 enhances Node.js compatibility, improves dependency management, adds OpenTelemetry support, and expands linting and task automation for developers.
npm install fus-ext
Copy node_modules/fus-ext/examples/manifest.fus
file to your code's directory.
You code can be like this:
fus 0.1.0
import "./manifest" all
repeat[10, i ->
console.log "This is \(i) time"
]
Here we used the "batch import" feature. Note that the export of manifest.fus
should match the import of yours. If you want to use node
instead of es
, then you'll need to make corresponding changes in the version line of the two files.
If the iterator returns break
then it means to jump out of the loop, similar to JS's break
, but different in essence. Here break
is an expression, and only capable of cancelling the remaining cycles, not capable of cancelling the remaining part of the function. If break
then the repeat
function returns break
。This example is a loop, from 0 to 9, but it will jump out on 5:
repeat[10, i ->
if i < 5
console.log "This is \(i) time"
else
break
]
If no count is set, it means forever, equivalent to JS's while (true)
:
repeat --
if abc()
break
else
doSomething()
This corresponds to JS's for
loop, from 1 to 10:
repeat{from: 1, to: 10, for: i ->
console.log i
}
This corresponds to JS's for
loop, from 10 to 1:
repeat{from: 10, to: 1, by: -1, for: i ->
console.log i
}
FAQs
FutureScript Extension
The npm package fus-ext receives a total of 38 weekly downloads. As such, fus-ext popularity was classified as not popular.
We found that fus-ext demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 2 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
Deno 2.2 enhances Node.js compatibility, improves dependency management, adds OpenTelemetry support, and expands linting and task automation for developers.
Security News
React's CRA deprecation announcement sparked community criticism over framework recommendations, leading to quick updates acknowledging build tools like Vite as valid alternatives.
Security News
Ransomware payment rates hit an all-time low in 2024 as law enforcement crackdowns, stronger defenses, and shifting policies make attacks riskier and less profitable.