
Research
Malicious npm Packages Impersonate Flashbots SDKs, Targeting Ethereum Wallet Credentials
Four npm packages disguised as cryptographic tools steal developer credentials and send them to attacker-controlled Telegram infrastructure.
tcomb-form-plus
Advanced tools
React.js powered UI library for developing forms writing less code
"Simplicity is the ultimate sophistication" (Leonardo da Vinci)
The tcomb library provides a concise but expressive way to define domain models in JavaScript.
The tcomb-validation library builds on tcomb, providing validation functions for tcomb domain models.
This library builds on those two and realizes an old dream of mine.
This playground, while a bit outdated, gives you the general idea.
With tcomb-form you simply call <Form type={Model} />
to generate a form based on that domain model. What does this get you?
import t from 'tcomb-form'
const FormSchema = t.struct({
name: t.String, // a required string
age: t.maybe(t.Number), // an optional number
rememberMe: t.Boolean // a boolean
})
const App = React.createClass({
onSubmit(evt) {
evt.preventDefault()
const value = this.refs.form.getValue()
if (value) {
console.log(value)
}
},
render() {
return (
<form onSubmit={this.onSubmit}>
<t.form.Form ref="form" type={FormSchema} />
<div className="form-group">
<button type="submit" className="btn btn-primary">Save</button>
</div>
</form>
)
}
})
Output. Labels are automatically generated.
Browser compatibility: same as React >=0.13.0
Thanks so much to Chris Pearce for pointing me in the right direction and for supporting me in the v0.4 rewrite.
Special thanks to William Lubelski (@uiwill), without him this library would be less magic.
Thanks to Esa-Matti Suuronen for the excellent humanize()
function.
Thanks to Andrey Popp for writing react-forms, great inspiration for list management.
FAQs
React.js powered UI library for developing forms writing less code
The npm package tcomb-form-plus receives a total of 0 weekly downloads. As such, tcomb-form-plus popularity was classified as not popular.
We found that tcomb-form-plus demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer 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
Four npm packages disguised as cryptographic tools steal developer credentials and send them to attacker-controlled Telegram infrastructure.
Security News
Ruby maintainers from Bundler and rbenv teams are building rv to bring Python uv's speed and unified tooling approach to Ruby development.
Security News
Following last week’s supply chain attack, Nx published findings on the GitHub Actions exploit and moved npm publishing to Trusted Publishers.