easypathutil
Advanced tools
Comparing version 1.0.1 to 1.0.2
{ | ||
"name": "easypathutil", | ||
"version": "1.0.1", | ||
"version": "1.0.2", | ||
"description": "Fluent filepaths, made simple.", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
@@ -29,6 +29,9 @@ <div align="center"> | ||
### Goals/Why use Easypathutil | ||
• This package hopes to make your paths easier to follow for deeply nested files. | ||
• Easily check for existence of a file or folder, read, get stats, or require. | ||
### Goals/Why use Easypathutil | ||
This package hopes to make your paths easier to follow for deeply nested files. | ||
• Lightweight: Package size is around 6kB | ||
The tutorial below aims to demonstrate the core functionality of this package. | ||
@@ -42,5 +45,5 @@ | ||
const file = require('fs').readFileSync(require('path').join(\_\_dirname, '../../../../data/users.json')); | ||
const file = require('fs').readFileSync(require('path').join(__dirname, '../../../../data/users.json')); | ||
const json = JSON.parse(file); | ||
const default_object = new (require(require('path').join(\_\_dirname, '../../../../classes/A')).default); | ||
const default_object = new (require(require('path').join(__dirname, '../../../../classes/A')).default); | ||
@@ -100,3 +103,3 @@ **After:** | ||
// optional "." or "\_" and case insensitive | ||
// optional "." or "_" and case insensitive | ||
myjsfile.$read_file, myjsfile.$read_file_sync | ||
@@ -118,3 +121,3 @@ myjsfile.$readfile, myjsfile.$readfile_sync | ||
const jsonfile = myfolder('jsonfile.json'); // Points to /root/home/projects/myfolder/jsonfile.json | ||
const parsedjson = jsonfile.$json // Aliases: .$json, .$toJson, .$JSON, .$to_json, etc, optional "." or "\_" and case insensitive | ||
const parsedjson = jsonfile.$json // Aliases: .$json, .$toJson, .$JSON, .$to_json, etc, optional "." or "_" and case insensitive | ||
@@ -161,1 +164,4 @@ **New object shortcut (.$new, .$new_default)** | ||
This package adapts as needs arise, and although it has been tested on some versions of node v8 and v10, problems may still occur. | ||
Enjoy this package? Consider starring on [github](https://github.com/wzhouwzhou/easypathutil) and checking out some of my other work: | ||
[Youtube Search API](https://npmjs.com/ytsearcher) |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
18309
163