View on GitHub

lots-of-sample-files

Prepare lots of sample files for your experiments

lots-of-sample-files

NPM Version

Note: THIS project is still under development. Please do not use it in production.

What is it for?

With lots-of-sample-files, You can get lots of sample files for experiments and testing in Node.js or Deno (should works).

We've provided a simple API for you. You can obtain lots-of-sample-files from NPM. Please see the section "How to Obtain".

How to Obtain

lots-of-sample-files provides an NPM package. You can install it with your favorite package managers, and then import it into your tests.

Package Manager Command Shorthand
bun bun install lots-of-sample-files bun i lots-of-sample-files
npm npm install lots-of-sample-files npm i lots-of-sample-files
pnpm pnpm install lots-of-sample-files pnpm i lots-of-sample-files
yarn yarn add lots-of-sample-files yarn add lots-of-sample-files

Let's Learn How to Use It

import { Sample } from 'lots-of-sample-files';

const paths = [...Sample.paths()];
const files = [...Sample.files()];

for (const { path, type } of Sample.paths()) {
  if (path.endsWith('.zip') || type === 'application/zip') {
    console.log(path);
  }
}

for (const file of Sample.files((type) => type.startsWith('image/'))) {
  console.log(file.name, file.type);
}

Let's Setup the Project

Note: THIS section is for contributors and developers only

See What Dependencies We Are Using

See What Commands We Are Using

Package Manager Command Script Description
bun / npm / pnpm install Install dependencies
bun / npm / pnpm run build Build the library for production
bun / npm / pnpm run check Check the codes with TypeScript
bun / npm / pnpm run dev-build Build the library for development
bun / npm / pnpm run format Format codes using Prettier
bun / npm / pnpm run test Run integration tests (after build)

Be Aware of These Details

You may encounter some problems during development and deployment. Please read the following notes carefully.

  1. There is no support for Node.js below version 18. Please issue us if you need it.