
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.
forgetsy-js
Advanced tools
Forgetsy.js is a scalable trending library designed to track temporal trends in non-stationary categorical distributions. NodeJS fork of https://github.com/cavvia/forgetsy.
Table of Contents generated with DocToc
NodeJS Trending library
This library was converted to use Promise/A+. Please see usage instructions below.
Node.JS fork Forgetsy, a trending library designed to track temporal trends in non-stationary categorical distributions. Please fork or file an bug if you discover an issue. The project use Redis as the backend.
Please fork and make it better.
npm install forgetsy-js
// setup redis
var redis = require('redis');
var client = redis.createClient();
// setup forgetsy-js & pass redis client
var delta = require('forgetsy-js');
delta.setRedisClient(client);
// name of distribution
var name = 'facebook-shares';
// name of bin
var bin = 'my-content-id';
var promise = delta.create({
name: name
, time: time
});
promise.then(function(dist) {
// the distribution was create..
});
promise.catch(function(e) {
// there was an error creating distribution
});
var promise = delta.get(name);
promise.then(function(dist) {
var promise = dist.incr({
bin: bin
,by: 1
});
promise.then(function() {
// bin was incremented
});
promise.catch(function(e) {
// bin was not incremented
})
});
var promise = delta.get(name);
promise.then(function(dist) {
var promise = dist.fetch();
promise.then(function(trends) {
console.log(trends);
})
promise.catch(function(e) {
// error fetching distribution
})
})
var promise = delta.get(name);
promise.then(function(dist) {
// specify the bin to fetch
var promise = dist.fetch({bin: bin});
promise.then(function(trends) {
console.log(trends);
})
promise.catch(function(e) {
// error fetching distribution
})
})
var promise = delta.get(name);
promise.then(function(dist) {
// specify the bin to fetch
var promise = dist.fetch({limit: 10});
promise.then(function(trends) {
console.log(trends);
})
promise.catch(function(e) {
// error fetching distribution
})
})
[
{'item': 'one': 'score': 0.999999999997154}
,{'item': 'two': 'score': 0.9999999999939523}
]
var name = 'facebook-shares';
var bin = 'my-content-id2';
// create distribution
delta.create({
name: name,
time: getDays(14)
})
.then(function(dist) {
// increment a bin
dist.incr({
bin: bin,
by: 1
})
.then(function() {
// fetch trends
dist.fetch()
.then(function(trends) {
console.log(trends);
})
.catch(function(e) {
// error fetching trends
});
})
.catch(function(e) {
// bin was not incremented
});
})
.catch(function(e) {
// there was an error creating distribution
});
This is a very basic working API demo.
Categories are the distributions to create
Type is the type of distributions we're creating. In this case, the categories are related to "art." You can classify the distributions as you see fit. For example, "type" could easily refer to "music." (Probably sans "street" [:-])
http://104.131.230.35/create?categories=classical,modern,street&type=art
Here we will trend a bin, "banksy & Barbara Kruger" the famous street artist.
http://104.131.230.35/incr?categories=street&type=art&bin=banksy
http://104.131.230.35/incr?categories=street&type=art&bin=Barbara Kruger
Here we will fetch what's trending in category "street" of type "art"
http://104.131.230.35/fetch?categories=street&type=art&filters=geoip
Here we will fetch what's trending in all of the categories of type "art"
http://104.131.230.35/fetch?categories=classical,modern,street&type=art&filters=geoip
Here we will fetch what's trending in all of the categories of type "art" and geo-location trends. Behind the scenes, the API is detecting your location and trending based on geo-location as well (assuming your location was detected!)
http://104.131.230.35/fetch?categories=classical,modern,street&type=art
npm test
FAQs
Forgetsy.js is a scalable trending library designed to track temporal trends in non-stationary categorical distributions. NodeJS fork of https://github.com/cavvia/forgetsy.
The npm package forgetsy-js receives a total of 2 weekly downloads. As such, forgetsy-js popularity was classified as not popular.
We found that forgetsy-js 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.