Last active
January 18, 2024 07:57
-
-
Save flancer64/132f8b0da8ecfe87ef50b417f7c0a9d2 to your computer and use it in GitHub Desktop.
Template for TeqFW utility code.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* This is a description of a set of utilities. | |
*/ | |
// MODULE'S IMPORT | |
import {existsSync} from 'node:fs'; | |
// MODULE'S CLASSES | |
export default class Vnd_Plugin_Back_Util_Cookie { | |
/** | |
* Declares the dependencies that should be injected by the Object Container. | |
* @param {Vnd_Plugin_Back_Defaults} DEF - The injected dependency. | |
*/ | |
constructor({Vnd_Plugin_Back_Defaults$: DEF}) { | |
// INSTANCE'S METHODS | |
/** | |
* This is a function with TeqFW injected dependencies. | |
* @param {*} data - The input data. | |
* @return {string} - The result string. | |
*/ | |
this.diDepsFn = function (data) { | |
return `${DEF.PREFIX}: ${data}`; | |
}; | |
} | |
// CLASS' METHODS | |
/** | |
* This is a function with classic ES6 dependencies (imported). | |
* @param {string} data - The input data. | |
* @return {boolean} - The result boolean. | |
*/ | |
es6DepsFn(data) { | |
return existsSync(data); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment