1.0.28 • Published 7 years ago

filepathspecs v1.0.28

Weekly downloads
2
License
ISC
Repository
-
Last release
7 years ago

filePathSpecs v1.0.4

The filePathSpecs library exported as Node.js modules.

Docs

Returns a model for the filePath as follows:

DOMAIN PATH

path - http://stackoverflow.com/questions/2479309/javascript-and-backslashes-replace/index.html
filePath - http://stackoverflow.com/questions/2479309/javascript-and-backslashes-replace/
domainExistsStatus - true/false
domain - stackoverflow.com
domainName - stackoverflow
subdomain - www
domainPath - /questions/2479309/javascript-and-backslashes-replace/
domainExt - com
baseFolder: 'javascript-and-backslashes-replace/',
isFile - true/false
folderExists - true/false
isDomain - true/false
domainExistsStatus - true/false

FILE PATH WITH FILE

path - /Users/mikeboni/Desktop/sampleProject/routes/filePathSpecs/index.js
filePath - /Users/mikeboni/Desktop/sampleProject/routes/filePathSpecs/
os - osx/windows
rootFolder - Users/
fileFolder - filePathSpecs/
isFile - true
folderExists - true
fileName - index.js
file - index
ext - js
fileExists - true

FILE PATH

path - /Users/mikeboni/Desktop/sampleProject/routes/filePathSpecs/
os - osx/windows
rootFolder - Users/
fileFolder - filePathSpecs/
isFile - false
folderExists - true

Installation

npm install filePathSpecs

Init

var fsOperations = require('filePathSpecs');

Get File/Path Specs

Create a model object

var fsOperations = require('filePathSpecs');

var p = new PathSpec('/Users/mikeboni/Desktop/sampleProject/routes/filePathSpecs/index.js');

console.log(p);

Access all properties as listed above under Docs.

1.0.28

7 years ago

1.0.27

7 years ago

1.0.26

7 years ago

1.0.25

7 years ago

1.0.24

7 years ago

1.0.23

7 years ago

1.0.22

7 years ago

1.0.21

7 years ago

1.0.20

7 years ago

1.0.19

7 years ago

1.0.18

7 years ago

1.0.17

7 years ago

1.0.16

7 years ago

1.0.15

7 years ago

1.0.12

7 years ago

1.0.11

7 years ago

1.0.10

7 years ago

1.0.9

7 years ago

1.0.8

7 years ago

1.0.7

7 years ago

1.0.6

7 years ago

1.0.5

7 years ago

1.0.4

7 years ago

1.0.3

7 years ago

1.0.2

7 years ago