directory-tree
Advanced tools
Comparing version 2.2.1 to 2.2.2
102
index.d.ts
@@ -1,54 +0,58 @@ | ||
declare const directoryTree: ( | ||
path: string, | ||
options?: { | ||
normalizePath?: boolean; | ||
exclude?: RegExp | RegExp[]; | ||
attributes?: string[]; | ||
extensions?: RegExp; | ||
}, | ||
onEachFile?: (item: DirectoryTree, path: string, stats: Stats) => void, | ||
onEachDirectory?: (item: DirectoryTree, path: string, stats: Stats) => void, | ||
) => DirectoryTree; | ||
declare function directoryTree( | ||
path: string, | ||
options?: { | ||
normalizePath?: boolean; | ||
exclude?: RegExp | RegExp[]; | ||
attributes?: string[]; | ||
extensions?: RegExp; | ||
}, | ||
onEachFile?: (item: directoryTree.DirectoryTree, path: string, stats: directoryTree.Stats) => void, | ||
onEachDirectory?: (item: directoryTree.DirectoryTree, path: string, stats: directoryTree.Stats) => void, | ||
): directoryTree.DirectoryTree; | ||
declare class DirectoryTree { | ||
path: string; | ||
name: string; | ||
size: number; | ||
type: "directory" | "file"; | ||
children?: DirectoryTree[]; | ||
extension?: string; | ||
} | ||
export as namespace directoryTree | ||
/* | ||
* Node.js fs.Stats from | ||
* https://github.com/DefinitelyTyped/DefinitelyTyped/blob/fbe90f14d5f6b6d65c4aa78284f212c736078d19/types/node/index.d.ts#L3696 | ||
*/ | ||
declare class Stats { | ||
isFile(): boolean; | ||
isDirectory(): boolean; | ||
isBlockDevice(): boolean; | ||
isCharacterDevice(): boolean; | ||
isSymbolicLink(): boolean; | ||
isFIFO(): boolean; | ||
isSocket(): boolean; | ||
dev: number; | ||
ino: number; | ||
mode: number; | ||
nlink: number; | ||
uid: number; | ||
gid: number; | ||
rdev: number; | ||
size: number; | ||
blksize: number; | ||
blocks: number; | ||
atimeMs: number; | ||
mtimeMs: number; | ||
ctimeMs: number; | ||
birthtimeMs: number; | ||
atime: Date; | ||
mtime: Date; | ||
ctime: Date; | ||
birthtime: Date; | ||
declare namespace DirectoryTree { | ||
export class DirectoryTree { | ||
path: string; | ||
name: string; | ||
size: number; | ||
type: "directory" | "file"; | ||
children?: DirectoryTree[]; | ||
extension?: string; | ||
} | ||
/* | ||
* Node.js fs.Stats from | ||
* https://github.com/DefinitelyTyped/DefinitelyTyped/blob/fbe90f14d5f6b6d65c4aa78284f212c736078d19/types/node/index.d.ts#L3696 | ||
*/ | ||
export class Stats { | ||
isFile(): boolean; | ||
isDirectory(): boolean; | ||
isBlockDevice(): boolean; | ||
isCharacterDevice(): boolean; | ||
isSymbolicLink(): boolean; | ||
isFIFO(): boolean; | ||
isSocket(): boolean; | ||
dev: number; | ||
ino: number; | ||
mode: number; | ||
nlink: number; | ||
uid: number; | ||
gid: number; | ||
rdev: number; | ||
size: number; | ||
blksize: number; | ||
blocks: number; | ||
atimeMs: number; | ||
mtimeMs: number; | ||
ctimeMs: number; | ||
birthtimeMs: number; | ||
atime: Date; | ||
mtime: Date; | ||
ctime: Date; | ||
birthtime: Date; | ||
} | ||
} | ||
export = directoryTree; |
{ | ||
"name": "directory-tree", | ||
"version": "2.2.1", | ||
"version": "2.2.2", | ||
"lockfileVersion": 1, | ||
@@ -5,0 +5,0 @@ "requires": true, |
{ | ||
"name": "directory-tree", | ||
"version": "2.2.1", | ||
"version": "2.2.2", | ||
"description": "Convert a directory tree to a JS object.", | ||
@@ -5,0 +5,0 @@ "repository": { |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
17610
378