1.0.0 • Published 4 years ago

@askalione/file v1.0.0

Weekly downloads
-
License
MIT
Repository
github
Last release
4 years ago

Nodejs-File

Nodejs-File is a simple utility for working with file path.

Usage

const file = require('@askalione/file');
const path = 'C:\\alexey\\dev\\file.js';

Get file name:

var name = file.getName(path); // return "file.js"

Get file name without extension:

var name = file.getNameWithoutExtension(path); // return "file"

Get file info:

var info = file.getInfo(path); // return { name: "file", extension: ".js"}

License

File is open source, licensed under the MIT License.