Security News
tea.xyz Spam Plagues npm and RubyGems Package Registries
Tea.xyz, a crypto project aimed at rewarding open source contributions, is once again facing backlash due to an influx of spam packages flooding public package registries.
duckweed
Advanced tools
Readme
Duckweed: JavaScript microframework for programming reactive interfaces using Model-Action-View architecture
Duckweed is inspired by Elm and Simon Friis Vindum's Functional Frontend Architecture. Unlike its sources of inspiration, though, Duckweed's primary goal is not to promote or enforce functional programming paradigm. It's main goal is to provide a simple API, and functions happen to be a good step in that direction.
Duckweed is written in TypeScript, and uses Snabbdom under the hood.
Although Duckweed is small (only 7KB min+gz), it includes state management, transitions, routing events, and the full power of Snabbdom.
To install Duckweed, use:
npm install duckweed
Currently, only beta releases are available.
This fiddle contains a small counter example that you can fork and play with.
A more fully featured proof-of-concept application can be found on GitHub. You can see it in action here.
Documentation can be read on GitHub. It includes a developer guide and the API reference.
Here you go:
class HelloDuckweed {
constructor(initialState = {}) {
this.state = initialState;
this.update = this.update.bind(this);
this.render = this.render.bind(this);
}
update(_, address, ...args) {
return this[address](...args);
}
updateName(e) {
this.state.name = e.target.value;
}
render({act}) {
return (
<div>
<h1>Hello {this.state.name || "World"}!</h1>
<input type="text" value={this.state.name} on-input={act("updateName")} />
</div>
);
}
};
const comp = new HelloDuckweed();
duckweed.runner(undefined, comp.update, comp.render);
No, sorry, it was just a joke. I'm pretty sure it would work, but, to be honest, I designed Duckweed specifically to avoid using this pattern.
Duckweed is a water plant with simple no-frills features, and one of the fastest growing plants on Earth. It has been argued that a single duckweed could create a mass of duckweeds the size of the Earth in a single month. It is also an invaluable water purifier, and being studied as a potential source of clean energy. What I'm trying to say is, duckweed is pretty awesome.
It's... erm... fast enough. :)
Duckweed is still in very very early stages of development. Don't expect it to be production-ready. The API may also fluctuate between versions. The level of breakage you can expect is predictable, though.
Duckweed uses semantic versioning, so no major problems should be expected until the next major version bump. Each time a major version is bumped, though, you can be certain it's backwards-incompatible with the previous versions.
Duckweed is licensed under the terms of the MIT license. See the LICENSE
file
for more information.
FAQs
JavaScript microframework for programming reactive interfaces using Model-Action-View architecture
The npm package duckweed receives a total of 14 weekly downloads. As such, duckweed popularity was classified as not popular.
We found that duckweed 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.
Security News
Tea.xyz, a crypto project aimed at rewarding open source contributions, is once again facing backlash due to an influx of spam packages flooding public package registries.
Security News
As cyber threats become more autonomous, AI-powered defenses are crucial for businesses to stay ahead of attackers who can exploit software vulnerabilities at scale.
Security News
UnitedHealth Group disclosed that the ransomware attack on Change Healthcare compromised protected health information for millions in the U.S., with estimated costs to the company expected to reach $1 billion.