Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@types/klaw-sync

Package Overview
Dependencies
Maintainers
1
Versions
12
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@types/klaw-sync

TypeScript definitions for klaw-sync

  • 6.0.5
  • ts4.5
  • ts4.6
  • ts4.7
  • ts4.8
  • ts4.9
  • ts5.0
  • ts5.1
  • ts5.2
  • ts5.3
  • ts5.4
  • ts5.5
  • ts5.6
  • ts5.7
  • ts5.8
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
51K
decreased by-1.2%
Maintainers
1
Weekly downloads
 
Created
Source

Installation

npm install --save @types/klaw-sync

Summary

This package contains type definitions for klaw-sync (https://github.com/manidlou/node-klaw-sync).

Details

Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/klaw-sync.

index.d.ts

/// <reference types="node" />

import * as fs from "fs";
declare namespace klawSync {
    interface Item {
        path: string;
        stats: fs.Stats;
    }

    type Filter = (item: Item) => boolean;

    interface Options {
        /**
         * @description True to only return files (ignore directories).
         *              Defaults to false if not specified.
         * @default false
         */
        nodir?: boolean | undefined;

        /**
         * @description True to only return directories (ignore files).
         *              Defaults to false if not specified.
         * @default false
         */
        nofile?: boolean | undefined;

        /**
         * @description The number of times to recurse before stopping.
         *              -1 for unlimited.
         * @default -1
         * @since v5.0.0
         */
        depthLimit?: number | undefined;

        /**
         * @description Custom fs, useful when mocking fs object.
         * @default graceful-fs
         * @since v4.0.0
         */
        fs?: {
            readdirSync(path: string): string[];
            statSync(path: string): fs.Stats;
        } | undefined;

        /**
         * @description function that gets one argument fn({path: '', stats: {}}) and returns true to include
         *              or false to exclude the item
         * @since v2.0.0
         */
        filter?: Filter | undefined;

        /**
         * @description traverse all subdirectories, regardless of `filter` option.
         *
         * When set to true, traverseAll produces similar behavior to the default
         * behavior prior to `v4.0.0`. The current default of `traverseAll: false`
         * is equivalent to the old `noRecurseOnFailedFilter: true`).
         *
         * @since v6.0.0
         */
        traverseAll?: boolean | undefined;
    }
}

declare function klawSync(
    root: string,
    options?: klawSync.Options,
): readonly klawSync.Item[];

export = klawSync;

Additional Details

  • Last updated: Mon, 20 Nov 2023 23:36:24 GMT
  • Dependencies: @types/node

Credits

These definitions were written by Brendan Forster.

FAQs

Package last updated on 21 Nov 2023

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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc