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.
backlash
Advanced tools
Readme
The idea behind Backlash is to bring reactive literals into your web apps. Imagine strings, numbers, and such literals being able to cascade-update their values everywhere across the app.
It works in Node.js and in the browser.
The idea behind this simple module is to have literals / variables that update themselves where they are being used.
npm install backlash
var Backlash = require('backlash')();
var B = Backlash.creator;
/**
* Initialze the variables
*/
var firstName = B("firstName"),
lastName = B("lastName"),
fullName = B("fullName"),
age = B("age"),
description = B("description");
/**
* Set values
*/
firstName("John");
lastName("Doe");
age(27);
/**
* Below code works as normal because
* concatenation will automatically
* call firstName.toString()
*/
console.log('Hello, I am ' + firstName);
/**
* Create dependent values
*/
var fullName = B("fullName", "{{firstName}} {{lastName}}");
console.log(fullName()); //John Doe
/**
* Delete variables to free the memory, otherwise backlash holds them forever
*/
firstName.trash();
/**
* Using the variable again should throw an error, we will catch it
*/
try {
firstName('Janis');
} catch(e) {
console.log(e); //[Error: ERROR 101: variable used after being trashed]
}
/**
* Let's check if a variable is trashed already
*/
if (!firstName.trashed()) {
firstName('Janis');
console.log('Modified firstName');
} else {
console.log('Cannot use firstName anymore');
}
This is a very basic implementation. Other features to do when I have some free time:
Backlash is created by @ritenv. Contributions are open and welcome. For any issues, please raise it in the issues section and feel free to send pull requests to fix them.
FAQs
Backlash is a simple utility suite that brings reactive literals into your web apps.
The npm package backlash receives a total of 2 weekly downloads. As such, backlash popularity was classified as not popular.
We found that backlash 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.