File: index.d.ts

package info (click to toggle)
node-cached-path-relative 1.1.0%2B~1.0.0-3
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, forky, sid, trixie
  • size: 116 kB
  • sloc: javascript: 28; makefile: 10
file content (13 lines) | stat: -rw-r--r-- 598 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
// Type definitions for cached-path-relative 1.0
// Project: https://github.com/ashaffer/cached-path-relative
// Definitions by: TeamworkGuy2 <https://github.com/TeamworkGuy2>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped

/**
 * Memoize the results of the path.relative function. path.relative can be an expensive operation
 * if it happens a lot, and its results shouldn't change for the same arguments.
 * Use it just like your normal path.relative, but it's memoized.
 */
declare function cachedPathRelative(from: string, to: string): string;

export = cachedPathRelative;