Research
Security News
Quasar RAT Disguised as an npm Package for Detecting Vulnerabilities in Ethereum Smart Contracts
Socket researchers uncover a malicious npm package posing as a tool for detecting vulnerabilities in Etherium smart contracts.
import {createStore, createEvent, sample} from 'effector'
import {using, spec, h} from 'forest'
using(document.body, () => {
const {change, submit, state} = formModel()
h('section', () => {
spec({style: {width: '15em'}})
h('form', () => {
spec({
handler: {
config: {prevent: true},
on: {submit},
},
style: {
display: 'flex',
flexDirection: 'column',
},
})
h('input', {
attr: {placeholder: 'Username'},
handler: {input: change('username')},
})
h('input', {
attr: {type: 'password', placeholder: 'Password'},
handler: {input: change('password')},
})
h('button', {
text: 'Submit',
attr: {
disabled: state.map(values => !(values.username && values.password)),
},
})
})
h('section', () => {
spec({style: {marginTop: '1em'}})
h('div', {text: 'Reactive form debug:'})
h('pre', {text: state.map(stringify)})
})
})
})
function formModel() {
const state = createStore({})
const changed = createEvent()
const submit = createEvent()
state.on(changed, (data, {name, value}) => ({...data, [name]: value}))
const change = name => changed.prepend(e => ({name, value: e.target.value}))
sample({
source: state,
clock: submit,
fn: stringify,
}).watch(alert)
return {change, submit, state}
}
function stringify(values) {
return JSON.stringify(values, null, 2)
}
0.18.3-0.18.4
import {version} from 'effector'
console.log(version)
Add effect handler to domain 4c6ae8
Add Unit<T>
as common interface implemented by Event
, Effect
and Store
Add isStore
, isEvent
, isEffect
and isUnit
validators
import {createStore, createEvent, isStore, isEvent, isUnit} from 'effector'
const event = createEvent('some event')
const $store = createStore('value')
isStore($store) // => true
isEvent($store) // => false
isUnit($store) // => true
isStore(event) // => false
isEvent(event) // => true
isUnit(event) // => true
isStore(null) // => false
isEvent(null) // => false
isUnit(null) // => false
createStore
with configimport {createStore} from 'effector'
const $store = createStore('value', {
name: 'value store',
})
FAQs
UI engine for web
The npm package forest receives a total of 3,846 weekly downloads. As such, forest popularity was classified as popular.
We found that forest 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 researchers uncover a malicious npm package posing as a tool for detecting vulnerabilities in Etherium smart contracts.
Security News
Research
A supply chain attack on Rspack's npm packages injected cryptomining malware, potentially impacting thousands of developers.
Research
Security News
Socket researchers discovered a malware campaign on npm delivering the Skuld infostealer via typosquatted packages, exposing sensitive data.