Research
Security News
Malicious npm Packages Inject SSH Backdoors via Typosquatted Libraries
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
@most/core
Advanced tools
________________________________
___ |/ /_ __ \_ ___/__ __/
__ /|_/ /_ / / /____ \__ /
_ / / / / /_/ /____/ /_ /
/_/ /_/ \____/______/ /_/
The high-performance reactive event stream core that powers Most.
Specifically, @most/core
features Most's battle-tested, high-performance architecture with a lean, functions-only, curried API in a tree-shakeable package.
npm install --save @most/core
Here's a simple program that displays the result of adding two inputs. The result is reactive and updates whenever either input changes.
First, the HTML fragment for the inputs and a place to display the live result:
<form>
<input class="x"> + <input class="y"> = <span class="result"></span>
</form>
Using @most/core
to make it reactive:
import { combine, runEffects, createDefaultScheduler } from '@most/core'
import { input } from '@most/dom-event'
const xInput = document.querySelector('input.x')
const yInput = document.querySelector('input.y')
const resultNode = document.querySelector('.result')
const add = (x, y) => x + y
const toNumber = e => Number(e.target.value)
const renderResult = result => {
resultNode.textContent = result
}
// x represents the current value of xInput,
// updated on 'input' events
const x = map(toNumber), input(xInput))
// y represents the current value of yInput,
// updated on 'input' events
const y = map(toNumber), input(yInput))
// result is the live current value of adding x and y
// also updated on 'input' events from either
// xInput or yInput
const result = combine(add, x, y)
// Side effect to update the DOM
const update = tap(renderResult, result)
// Observe the result, causing the DOM to be updated
runEffects(update, createDefaultScheduler())
FAQs
Reactive programming with lean, functions-only, curried, tree-shakeable API
The npm package @most/core receives a total of 30,646 weekly downloads. As such, @most/core popularity was classified as popular.
We found that @most/core demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 5 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.
Research
Security News
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
Security News
MITRE's 2024 CWE Top 25 highlights critical software vulnerabilities like XSS, SQL Injection, and CSRF, reflecting shifts due to a refined ranking methodology.
Security News
In this segment of the Risky Business podcast, Feross Aboukhadijeh and Patrick Gray discuss the challenges of tracking malware discovered in open source softare.