1.0.9 • Published 2 years ago
sparkly_clean v1.0.9
sparkly_clean
Instructions:
npm install sparkly_clean
const sparkly_clean = require('sparkly_clean')
If utilizing in html...:
<script src="./node_modules/sparkly_clean/index.js"></script>
<script>
$(()=> {
const output = sparkly_clean.method(parameter)
})
</script>
Functions
foldersToDelete(git, days) ⇒ any
- Checks whether or not git is needed
Kind: global function
Date: 2022-03-04
Author: zen-out
Param | Type |
---|---|
git | any |
days | any |
filterForGitTrue() ⇒ any
Filters got git true
Kind: global function
Date: 2022-03-04
Author: zen-out
dateIsLonger(limit) ⇒ any
- If true, should delete. let shouldWeDelete = dateIsLonger("March 2, 2022", 5) let shouldDelete = dateIsLonger("March 2, 2022", 1) console.log("🚀 ~ file: fs.js ~ line 82 ~ shouldDelete", shouldDelete) console.log("🚀 ~ file: fs.js ~ line 80 ~ shouldWeDelete", shouldWeDelete)
Kind: global function
Date: 2022-03-04
Author: zen-out
Param | Type |
---|---|
limit | any |
getDirectoryStructure(filepath, {extensions:extension}, (item, PATH, stats) ⇒ any
getDirectoryStructure("./tree", /.txt$/)
Kind: global function
Date: 2022-03-04
Author: zen-out
Param | Type |
---|---|
filepath | any |
{extensions:extension} | any |
(item | any |
PATH | any |
stats | any |
printDirectory(filePath, extension) ⇒ any
Kind: global function
Date: 2022-03-04
Author: zen-out
Param | Type |
---|---|
filePath | any |
extension | any |
Example
1. Gets directory structure
2. Prints out directory into structure/index.json file
isGitSync() ⇒ any
Kind: global function
Date: 2022-03-04
Author: zen-out
Param | Type |
---|---|
path.join(dir | any |
'.git' | any |
Example
isGitSync(dir)
formatStats(filePath) ⇒ object
Kind: global function
Date: 2022-03-04
Author: zen-out
Param | Type |
---|---|
filePath | any |
Example
1. Get Stats, based on the path
2. Object
{
git: false,
atime: 2022-03-04T07:14:08.480Z,
birthtime: 2022-03-04T05:56:32.358Z,
size: 352
}
getShape() ⇒ any
- Prints directory structure
Kind: global function
Date: 2022-03-04
Author: zen-out
Param | Type |
---|---|
"./delete" | any |