short-filename

1.0.2 • Public • Published

short-filename

On Windows, this module calls GetShortPathNameW to convert a path like C:\Program Files to C:\\PROGRA~1. On other OSes, it returns the input path.

Installation

npm install short-filename

Usage

const shortFilename = require('short-filename');
console.log(shortFilename('C:\\Program Files\\Microsoft Office'));
// C:\PROGRA~1\MICROS~2 

License

Copyright © 2023 Particle Industries, Inc. Released under the MIT license

Package Sidebar

Install

npm i short-filename

Weekly Downloads

31

Version

1.0.2

License

MIT

Unpacked Size

127 kB

Total Files

8

Last publish

Collaborators

  • monkbroc
  • particlebot