Skip to main content
Module

x/scaffold/src/deps/path.ts>isJunk

scaffold your next project with style and 💗
Latest
function isJunk
import { isJunk } from "https://deno.land/x/scaffold@0.3.0/src/deps/path.ts";

Returns true if filename matches a junk file.

Examples

Example 1

import fs from 'node:fs/promises';
import {isJunk} from 'junk';

const files = await fs.readdir('some/path');

console.log(files);
//=> ['.DS_Store', 'test.jpg']

console.log(files.filter(isJunk));
//=> ['.DS_Store']

Parameters

filename: string

Returns

boolean