New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

@lapidev/walker

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@lapidev/walker

@hapi/hapi plugin that adds routes from the filesystem

latest
Source
npmnpm
Version
0.1.0
Version published
Maintainers
1
Created
Source

@lapidev/walker

Simple package that walks a directory and imports the files.

Example

The following example will walk the directory <CWD>/src/walk for files with extensions ts, tsx

import { join } from 'node:path';
import { cwd } from 'node:process';

import { walk } from '@lapidev/walker';
import type { WalkOptions, WalkResult } from '@lapidev/walker';

type Exports = {
  name: string;
  run: (name: string) => void;
};

const run = async () => {
  const options: WalkOptions = {
    baseDir: join(cwd(), 'src', 'walk'),
    extensions: ['ts', 'tsx'],
  };

  const result: WalkResult<Exports>[] = await walk<Exports>(options);

  console.log(result);
};

void run();

FAQs

Package last updated on 16 Jul 2022

Did you know?

Socket

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.

Install

Related posts