1.0.9 • Published 2 years ago

sparkly_clean v1.0.9

Weekly downloads
-
License
MIT
Repository
-
Last release
2 years ago

sparkly_clean

License: MIT NPM Downloads Play with docs

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

  1. Checks whether or not git is needed

Kind: global function
Date: 2022-03-04
Author: zen-out

ParamType
gitany
daysany

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

ParamType
limitany

getDirectoryStructure(filepath, {extensions:extension}, (item, PATH, stats) ⇒ any

getDirectoryStructure("./tree", /.txt$/)

Kind: global function
Date: 2022-03-04
Author: zen-out

ParamType
filepathany
{extensions:extension}any
(itemany
PATHany
statsany

printDirectory(filePath, extension) ⇒ any

Kind: global function
Date: 2022-03-04
Author: zen-out

ParamType
filePathany
extensionany

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

ParamType
path.join(dirany
'.git'any

Example

isGitSync(dir)

formatStats(filePath) ⇒ object

Kind: global function
Date: 2022-03-04
Author: zen-out

ParamType
filePathany

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

  1. Prints directory structure

Kind: global function
Date: 2022-03-04
Author: zen-out

ParamType
"./delete"any