Research
Security News
Quasar RAT Disguised as an npm Package for Detecting Vulnerabilities in Ethereum Smart Contracts
Socket researchers uncover a malicious npm package posing as a tool for detecting vulnerabilities in Etherium smart contracts.
@webarkit/oneeurofilter-ts
Advanced tools
This code is a translation to Typescript of the original code from Jaan Tollander. It's not well tested yet, so I can not assure of the correctness of the code.
Install with npm:
npm install @webarkit/oneeurofilter-ts
Install with yarn:
yarn add @webarkit/oneeurofilter-ts
In a typescript file:
// import the OneEuroFilter class into your project
import { OneEuroFilter } from "@webarkit/oneeurofilter-ts";
let filterMinCF: number = 0.0001;
let filterBeta: number = 0.01;
const filter = new OneEuroFilter(filterMinCF, filterBeta);
/* yourData is the data you want to filter, createData() is a dummy function here,
use it you method or data instead...
*/
let yourData = createData();
// filter the data (yourData) with the filter method
filter.filter(Date.now(), yourData);
// then use yourData...
In a javascript file:
// import the OneEuroFilter class into your project
import { OneEuroFilter } from "@webarkit/oneeurofilter-ts";
let filterMinCF = 0.0001;
let filterBeta = 0.01;
const filter = new OneEuroFilter(filterMinCF, filterBeta);
/* yourData is the data you want to filter, createData() is a dummy function here,
use it you method or data instead...
*/
let yourData = createData();
// filter the data (yourData) with the filter method
filter.filter(Date.now(), yourData);
// then use yourData...
in a html script tag with module support:
<script type="importmap">
{
"imports": {
"oef": "https://raw.github.com/webarkit/oneeurofilter-ts/main/dist/OneEuroFilter.mjs",
}
}
</script>
// import the OneEuroFilter class into your project
<script type="module">
import { OneEuroFilter } from "oef";
let filterMinCF = 0.0001;
let filterBeta = 0.01;
const filter = new OneEuroFilter(filterMinCF, filterBeta);
/* yourData is the data you want to filter, createData() is a dummy function here,
use it you method or data instead...
*/
let yourData = createData();
// filter the data (yourData) with the filter method
filter.filter(Date.now(), yourData);
// then use yourData...
</script>
FAQs
One euro filter algorithm with typescript support
The npm package @webarkit/oneeurofilter-ts receives a total of 11 weekly downloads. As such, @webarkit/oneeurofilter-ts popularity was classified as not popular.
We found that @webarkit/oneeurofilter-ts demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 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.
Research
Security News
Socket researchers uncover a malicious npm package posing as a tool for detecting vulnerabilities in Etherium smart contracts.
Security News
Research
A supply chain attack on Rspack's npm packages injected cryptomining malware, potentially impacting thousands of developers.
Research
Security News
Socket researchers discovered a malware campaign on npm delivering the Skuld infostealer via typosquatted packages, exposing sensitive data.