2.0.3 • Published 2 years ago

clear_concise_creative v2.0.3

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

clear_concise_creative

License: MIT NPM Downloads Play with docs

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

ParamType
pathstring

copy(toCopy, copyTo, copy)

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

ParamTypeDescription
toCopystring
copyTostring
copybooleanall

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

ParamType
pathstring

writeJSON(filePath, object)

ccc.writeJSON('./db.json', array) ccc.writeJSON('./db.json', object)

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

ParamType
filePathstring
objectobject

readJSON(filePath) ⇒ object

let getJSON = ccc.readJSON("./db.json")

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

ParamType
filePathstring

appendToJSON(filePath, key, data)

  1. Grabs JSON from json file
  2. If the key does not exist, then it will create a new key and assign the object
  3. If the key does exist, and it is not an array
  4. It will create an array and it will push the object into the array

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

ParamType
filePathstring
keystring
dataobject

Example

ccc.appendToJSON("./data/appendToMe.json", "test", { id: "lesley" })

replaceJSON(filePath, filePath, object)

  1. Reads from json file
  2. Replaces object depeneding on array passed in

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

ParamTypeDescription
filePathstring
filePathstring
objectobjectto 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

ParamType
filePathstring
arrDirarray

Example

let scripts = ccc.getJSONObject("../package.json", ["scripts"])

mergeJSONObject(filePath, arrDir, updateObj)

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

ParamType
filePathstring
arrDirarray
updateObjobject

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

ParamType
filePathstring
arrDirarray
addObjobject

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

ParamType
folderstring
extstring

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

ParamType
folderstring

writeFile(type, "string")

  1. 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

ParamType
typestring
"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")

  1. Formats data
  2. Appends to file

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

ParamType
typestring
"string"string

Example

ccc.appendFile("./readMe.txt", { yo: "whatsup" })
1.1.1

2 years ago

1.1.0

2 years ago

1.0.18

2 years ago

1.0.17

2 years ago

1.0.16

2 years ago

1.1.8

2 years ago

1.0.9

2 years ago

1.1.7

2 years ago

1.0.8

2 years ago

1.1.6

2 years ago

1.0.7

2 years ago

1.1.5

2 years ago

1.0.6

2 years ago

1.1.4

2 years ago

1.1.3

2 years ago

1.1.2

2 years ago

2.0.3

2 years ago

2.0.2

2 years ago

1.1.12

2 years ago

1.1.11

2 years ago

2.0.1

2 years ago

1.0.11

2 years ago

1.0.10

2 years ago

1.0.15

2 years ago

1.0.14

2 years ago

1.0.13

2 years ago

1.0.12

2 years ago

1.0.5

2 years ago

1.0.4

2 years ago

1.0.2

2 years ago

1.0.1

2 years ago