aex_lib v0.1.10
AEox's Library
Description
aex_lib is created and accidentally uploaded library by brkeejp.
Library currently under development (Well in the end accidentally uploaded :). That mean updated frequently. I created this library because I want to create custom server & applications with customized codes. I strongly suggest you don't use this library. I'm not engineer or something, I'm just starter. (But this your decision). My current goal expand my library and upload with this way everyone can be use. Anyway you can found details below...
Installation
$ npm install aex_lib
Usage
function: TemplateString()
This function read any string as literals.
Example
Input File: app.js
const aexlib = require("aex_lib");
var Text = new aexlib.TemplateString("Bye ${this.name}!");
Text.fill({name: "Others"});
console.log(Text.render());
Output: console
Hello Others!
Or simply
Input File: app.js
const aexlib = require("aex_lib");
console.log(new aexlib.TemplateString("Hello visitor! This text generated with ${this.generator}.", {
generator: "aex_lib"
}).render());
Output: console
Hello visitor! This text generated with aex_lib.
function: TemplateFile
This function read plain text, html, json, or any kind of text files with literals.
Example
Input File: app.js
const aexlib = require("aex_lib");
var Doc = new aexlib.TemplateFile("text.txt");
Doc.fill({name: "World"});
console.log(Doc.render());
Input File: text.txt
Hello ${this.name}! Time is now ${new Date().toString()}.
Output: console
Hello World! Time is now Tue Apr 02 2019 16:09:25 GMT+0300 (GMT+03:00).
Countion
if path start with "/
" then command uses root directory
if path start with "~
" then command uses home directory
if path start with "./
" or "../
" then command uses current directory
if path start with letter then command uses main application directory
Contact
For any bug, suggestion or maybe just chatting you can always write me mail. brkee.jp@gmail.com