Skip to main content
Using Deno in production at your company? Earn free Deno merch.
Give us feedback
Module

x/actionify/src/deps/globber.ts>isNotJunk

Create and manage your GitHub workflows with TypeScript and Deno.
Latest
function isNotJunk
import { isNotJunk } from "https://deno.land/x/actionify@0.3.0/src/deps/globber.ts";

Returns true if filename does not match a junk file.

Taken from https://github.com/sindresorhus/junk

Examples

This be used to find all junk files in a directory.

import { isNotJunk } from 'https://deno.land/x/globber/mod.ts';

const files: string[] = []
const notJunk: string[] = [];

for await (const file of Deno.readDir('some/path')) {
  files.push(file.name);

  if (isNotJunk(file.name)) {
    notJunk.push(file.name);
  }
}

console.log(notJunk);
//=> ['test.jpg']

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

Parameters

filename: string