1.0.3 • Published 3 years ago
dwijs v1.0.3
dwiJs
lightweight javascript utilities function collections
Instalation
- using cdn (required internet)
- put script tag in your index.html header
<script src="https://cdn.jsdelivr.net/npm/dwijs@1.0.1/dist/dwiJs.js"></script>
- or download dwiJs.rar file
- extract rar file to folder /src
- and then put script tag in your index.html header
<script src="src/dwiJs.js"></script>
Usage
Access all Utils easily (Read Documentations for detail)
// Access StringUtils
StringUtils.join();
// Access EvalUtils
EvalUtils.containsArray("objArr[0]");
// and much more
StringUtils, EvalUtils, NumberUtils, ArrayUtils, ObjectUtils, ElementUtils
DwiVar for modeling variables
<div class="app">
<span> {{text}} </span>
</div>
<script>
// init DwiVar
new dwi.var("app", {
data: (){
return {
text: "your text here"
}
}
});
</script>
<div class="app">
<div> {{text}} </div>
<div>
Change Text Here : <br>
<input model value="{{text}}">
</div>
</div>
<script>
// init DwiVar
let app = new dwi.var(".app", {
data: (){
return {
text: "write text"
}
}
});
</script>