Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/Grazen0/thanos.js
Blazing-fast, light, and flexible random file deletion.
https://github.com/Grazen0/thanos.js
npm-package thanos typescript
Last synced: 12 days ago
JSON representation
Blazing-fast, light, and flexible random file deletion.
- Host: GitHub
- URL: https://github.com/Grazen0/thanos.js
- Owner: Grazen0
- Created: 2021-01-31T04:35:12.000Z (almost 4 years ago)
- Default Branch: main
- Last Pushed: 2021-01-31T23:01:28.000Z (almost 4 years ago)
- Last Synced: 2024-09-03T18:05:01.052Z (2 months ago)
- Topics: npm-package, thanos, typescript
- Language: TypeScript
- Homepage:
- Size: 33.2 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
- awesome-blazingly-fast - thanos.js - Blazing-fast, light, and flexible random file deletion. (TypeScript)
README
# Thanos.js · ![Build][build]
Reduce the file size of your project down to 50%, by randomly deleting half of the files.
A project inspired by [https://thanosjs.org/](https://thanosjs.org/)
## Example usage
```js
const Thanos = require('@thanos.js/core').default; // CommonJS
import Thanos from '@thanos.js/core'; // ES Moduleconst Gauntlet = require('@thanos.js/gauntlet').default;
const RealityGem = require('@infinitygems/reality').default;
const SoulGem = require('@infinitygems/soul').default;
const MindGem = require('@infinitygems/mind').default;
const TimeGem = require('@infinitygems/time').default;
const SpaceGem = require('@infinitygems/space').default;const thanos = new Thanos();
const gauntlet = new Gauntlet();thanos.equipGauntlet(gauntlet);
(async () => {
console.log('Equiping reality gem...');
await gauntlet.insertGem(new RealityGem());console.log('Equiping soul gem...');
await gauntlet.insertGem(new SoulGem());console.log('Equiping mind gem...');
await gauntlet.insertGem(new MindGem());console.log('Equiping time gem...');
await gauntlet.insertGem(new TimeGem());console.log('Equiping space gem...');
await gauntlet.insertGem(new SpaceGem());const deleted = await thanos.snapFingers();
console.log(['Deleted fles:', ...deleted].join('\n'));
})();
```[build]: https://github.com/ElCholoGamer/thanos.js/workflows/Build/badge.svg