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.
mutable
Advanced tools
Readme
Mutable state containers in javascript with dirty checking and more (WIP)
Mutable is a mobx-compatible class system library. Mutable offers a unique runtime schema engine that enforces unidirectional data flow, and formalizes the structure of props and state. Mutable also supports data defaults, and non-nullable types.
Add Mutable to your project by installing it with npm:
npm install mutable --save
Simple code example:
import * as mutable from 'mutable';
import * as mobx from 'mutable';
// define a mutable class by providing a name and a spec (class schema)
const Dude = mutable.define('Dude', {
spec: ()=>({
name: Mutable.String.withDefault('Leon'),
age: Mutable.Number.withDefault(110),
address: Mutable.String.withDefault('no address')
})
});
// Mutable types accept custom data according to their spec as the first argument of their constructor
const dude = new Dude({name:'Ido'});
mobx.autorun(function () {
console.log(dude.name + ' ' + dude.age);
});
// prints: Leon 110
dude.name = 'Mike';
// prints: Mike 110
Integrating mutable into React components is up to the user.
Clone this project locally. Then, at the root folder of the project, run:
npm install
npm test
At the root folder of the project, run:
npm start
Then, open your browser at http://localhost:8080/webtest.bundle and see any changes you make in tests or code reflected in the browser
Currently Mutable is in alpha mode. As such, it does not respect semver.
We use a custom license, see LICENSE.md
These are examples of the kinds of libraries we would like to model ourselves after.
FAQs
Mutable state containers with dirty checking and more
The npm package mutable receives a total of 59 weekly downloads. As such, mutable popularity was classified as not popular.
We found that mutable demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 3 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
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.