Security News
Combatting Alert Fatigue by Prioritizing Malicious Intent
In 2023, data breaches surged 78% from zero-day and supply chain attacks, but developers are still buried under alerts that are unable to prevent these threats.
Fairmont is a family of JavaScript libraries for functional reactive programming. Fairmont takes full advantage of ES6+ features like iterators (including async iterators), generators, and promises. Inspired by libraries like Underscore and many others, Fairmont features include:
Here's a simple reactive Web app implementing a counter using Fairmont's Reactive programming functions.
In JavaScript:
var $ = require("jquery"),
F = require("fairmont");
$(function() {
var data = { counter: 0 };
F.go([
F.events("click", $("a[href='#increment']")),
F.map(function() { data.counter++; })
]);
F.go([
F.events("change", F.observe(data)),
F.map(function() {
$("p.counter")
.html(data.counter);
})
]);
});
In CoffeeScript:
{start, flow, events, map, observe} = require "fairmont-reactive"
$ = require "jquery"
$ ->
data = counter: 0
go [
events "click", $("a[href='#increment']")
map -> data.counter++
]
go [
events "change", observe data
map ->
$("p.counter")
.html data.counter
]
You can run this example or look at our other reactive examples:
You can simply install Fairmont as a whole:
npm install fairmont
Or you can simply install the components you need.
Example:
npm install fairmont-core
Learn more about the individual Fairmont components by clicking on the links below:
The API Reference provides documentation on each component and its corresponding functions.
Fairmont is available for production use. We use Fairmont is wide-variety of development projects. We welcome contributors!
You can get an idea of what we're planning by looking at the tickets. If you want something that isn't there, and you think it would be a good addition, please open a ticket.
FAQs
Functional reactive programming for JavaScript and CoffeeScript.
The npm package fairmont receives a total of 9,292 weekly downloads. As such, fairmont popularity was classified as popular.
We found that fairmont demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 8 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
In 2023, data breaches surged 78% from zero-day and supply chain attacks, but developers are still buried under alerts that are unable to prevent these threats.
Security News
Solo open source maintainers face burnout and security challenges, with 60% unpaid and 60% considering quitting.
Security News
License exceptions modify the terms of open source licenses, impacting how software can be used, modified, and distributed. Developers should be aware of the legal implications of these exceptions.