0.1.0 • Published 7 years ago

path-editor v0.1.0

Weekly downloads
3
License
Apache-2.0
Repository
github
Last release
7 years ago

path-editor NPM version Build Status Dependency Status Coverage percentageStandard - JavaScript Style Guide

A windows path variable editor

Installation

$ npm install --save path-editor

Usage

var pathEditor = require('path-editor');
/**
 * Getting it
 */
var myPath = pathEditor.get() // => get your path variable parsed as an array
var myRawPath = pathEditor.getRaw() // => get your path variable as stored

/**
 * Basic usage
 */
pathEditor
    .delete('pathToRemove') // Could be an Array
    .add('pathToAdd')
    .replace('pathToRemove','pathToAdd')
    .set() // => this do the job. it put sets your %PATH% variable
    .get() //get what you did
/**
 * Forcing the path
 */
pathEditor
    .force('Dont-force-silly-things')
    .set()
/**
 * Using options
 */
pathEditor
    .add('.',{relative:true}) // Resolves the path relative where you use it
    .set()

pathEditor
    .add('this/is/not/a/windows/path',{format:true}) // Resolves the path as windows store it
    .set()

License

MIT © Fabian Gutierrez