clear_concise_creative v2.0.3
clear_concise_creative
Instructions:
npm install clear_concise_creative
const clear_concise_creative =  require('clear_concise_creative')If utilizing in html...:
<script src="./node_modules/clear_concise_creative/index.js"></script>
<script> 
$(()=> { 
     const output =  clear_concise_creative.method(parameter)
 })
</script>Functions
checkPath(path) ⇒ boolean
checkPath(path)
Kind: global function
Date: 2022-03-10
Author: zen-out  
| Param | Type | 
|---|---|
| path | string | 
copy(toCopy, copyTo, copy)
Kind: global function
Date: 2022-03-07
Author: zen-out  
| Param | Type | Description | 
|---|---|---|
| toCopy | string | |
| copyTo | string | |
| copy | boolean | all | 
Example
ccc.copy("./src/**.js", "./dist") 
ccc.copy("./src/ ** / *", "dist", true)deletePath(path)
ccc.deletePath("./test/deleteThis2") ccc.deletePath("./test/deleteThis2/delete.js")
Kind: global function
Date: 2022-03-04
Author: zen-out  
| Param | Type | 
|---|---|
| path | string | 
writeJSON(filePath, object)
ccc.writeJSON('./db.json', array) ccc.writeJSON('./db.json', object)
Kind: global function
Date: 2022-03-04
Author: zen-out  
| Param | Type | 
|---|---|
| filePath | string | 
| object | object | 
readJSON(filePath) ⇒ object
let getJSON = ccc.readJSON("./db.json")
Kind: global function
Date: 2022-03-04
Author: zen-out  
| Param | Type | 
|---|---|
| filePath | string | 
appendToJSON(filePath, key, data)
- Grabs JSON from json file
 - If the key does not exist, then it will create a new key and assign the object
 - If the key does exist, and it is not an array
 - It will create an array and it will push the object into the array
 
Kind: global function
Date: 2022-03-04
Author: zen-out  
| Param | Type | 
|---|---|
| filePath | string | 
| key | string | 
| data | object | 
Example
ccc.appendToJSON("./data/appendToMe.json", "test", { id: "lesley" })replaceJSON(filePath, filePath, object)
- Reads from json file
 - Replaces object depeneding on array passed in
 
Kind: global function
Date: 2022-03-05
Author: zen-out  
| Param | Type | Description | 
|---|---|---|
| filePath | string | |
| filePath | string | |
| object | object | to replace | 
Example
let objectDir = ["opts", "theme_opts", "codepen"]
ccc.replaceJSON("./data/appendToMe.json", objectDir, { "sexylink": "link" })getJSONObject(filePath, arrDir) ⇒ object
Kind: global function
Returns: object - JSON object
Date: 2022-03-06
Author: zen-out  
| Param | Type | 
|---|---|
| filePath | string | 
| arrDir | array | 
Example
let scripts = ccc.getJSONObject("../package.json", ["scripts"])mergeJSONObject(filePath, arrDir, updateObj)
Kind: global function
Date: 2022-03-06
Author: zen-out  
| Param | Type | 
|---|---|
| filePath | string | 
| arrDir | array | 
| updateObj | object | 
Example
let addedCommands = ccc.mergeJSONObject("../package.json", ["scripts"], {
    "play": "node playground.js",
    "deploy": "git add . && git commit -m 'updated' && git push && npm version patch && npm publish",
})addToNestedJSON(filePath, arrDir, addObj)
Kind: global function
Date: 2022-03-06
Author: zen-out  
| Param | Type | 
|---|---|
| filePath | string | 
| arrDir | array | 
| addObj | object | 
Example
ccc.addToNestedJSON("../sample.json", ["opts", "theme_opts", "menu"], {
    "title": "visual instructions",
    "link": "hi",
    "target": "_blank"
})getDirNames(folder, ext) ⇒ array
only return file names that include the extension
Kind: global function
Date: 2022-03-08
Author: zen-out  
| Param | Type | 
|---|---|
| folder | string | 
| ext | string | 
Example
let dirNames = ccc.getDirNames("./src", ".js")
console.log(dirNames)
let jsOnly = getDirNames("./", ".html")
console.log("🚀 ~ file: readWrite.js ~ line 33 ~ jsOnly", jsOnly)listDir(folder) ⇒ array
Kind: global function
Examplel: listDir("./")
Date: 2022-03-22
Author: zen-out  
| Param | Type | 
|---|---|
| folder | string | 
writeFile(type, "string")
- Will format the type of data you have and then write to the file accordingly
 
Kind: global function
Date: 2022-03-05
Author: zen-out  
| Param | Type | 
|---|---|
| type | string | 
| "string" | string | 
Example
let writeThis = ccc.writeFile("./data/writeToMe.txt", [1, 2, 3])
let writeObject = ccc.writeFile("./data/writeToMe.txt", { id: 1, name: "lesley" })appendFile(type, "string")
- Formats data
 - Appends to file
 
Kind: global function
Date: 2022-03-06
Author: zen-out  
| Param | Type | 
|---|---|
| type | string | 
| "string" | string | 
Example
ccc.appendFile("./readMe.txt", { yo: "whatsup" })4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago