Security News
CISA Brings KEV Data to GitHub
CISA's KEV data is now on GitHub, offering easier access, API integration, commit history tracking, and automated updates for security teams and researchers.
Seamlessly use [Web Workers](https://developer.mozilla.org/en-US/docs/Web/API/Web_Workers_API/Using_web_workers) to offload work that could block user interaction and page rendering.
Seamlessly use Web Workers to offload work that could block user interaction and page rendering.
With Fibrelite you can turn any async function into a Web Worker. Fibrelite has three core strategies to executing work:
Check out Fibrelite in action here. This is a hosted version of the index.html
and example.js
inside this repository.
For npm:
npm install fibrelite
Or for yarn:
yarn add fibrelite
Alternatively you can use the unpkg CDN like so:
<script src="https://unpkg.com/fibrelite@2.0.0/dist/fibrelite.js"></script>
Fibrelite takes three arguments, the second two are optional:
const worker = new fibrelite(asyncHello, numberOfWorkersInPool, debounceInMilliseconds);
Changing numberOfWorkersInPool will make use of a pool of workers in for running you async function (defaults to 1). If you want to change the debounce period for worker.debounce
you can set debounceInMilliseconds
(defaults to 333 milliseconds).
You can use Fibrelite like this:
(async() => {
const asyncHello = async (input) => {
return "Hello " + input;
};
const worker = new fibrelite(asyncHello);
const response = await worker.execute("World!");
// const response = await worker.debounce("World!");
// const response = await worker.prioritise("World!");
console.log(response); // logs 'Hello World!'
})(); // await calls must be wrapped in an async function
To build Fibrelite you can run:
npm run build
To watch for file changes and build:
npm run watch
To run tests you can do:
npm run test
For convenience you can run the example using live-server using:
npm run serve
A massive thanks to Jason Miller for the Greenlet library on which this is heavily based and inspired.
MIT
FAQs
Seamlessly use [Web Workers](https://developer.mozilla.org/en-US/docs/Web/API/Web_Workers_API/Using_web_workers) to offload work that could block user interaction and page rendering.
The npm package fibrelite receives a total of 6 weekly downloads. As such, fibrelite popularity was classified as not popular.
We found that fibrelite 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
CISA's KEV data is now on GitHub, offering easier access, API integration, commit history tracking, and automated updates for security teams and researchers.
Security News
Opengrep forks Semgrep to preserve open source SAST in response to controversial licensing changes.
Security News
Critics call the Node.js EOL CVE a misuse of the system, sparking debate over CVE standards and the growing noise in vulnerability databases.