Socket
Socket
Sign inDemoInstall

path-ops

Package Overview
Dependencies
0
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    path-ops

Operators for node path.


Version published
Weekly downloads
2
decreased by-60%
Maintainers
1
Install size
4.35 kB
Created
Weekly downloads
 

Readme

Source

Path OPS

Operators for node path.

Alias

  • resolveWithAlias(path, aliasMap)

Resolve alias paths to source paths.

import { resolveWithAlias } from "path-ops";

resolveWithAlias("@/page/index", { "@": "src" });
// => src/page/index

// types
declare function resolveWithAlias(
  path: string,
  aliasMap: Record<string, string>
): string;
  • resolveToAlias

Resolve source paths to alias paths.

import { resolveToAlias } from "path-ops";

resolveToAlias("src/page/index", { "@": "src" });
// => @/page/index

// types
declare function resolveToAlias(
  path: string,
  aliasMap: Record<string, string>
): string;

Keywords

FAQs

Last updated on 24 Oct 2022

Did you know?

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc