0.0.6 • Published 6 years ago

cora.js v0.0.6

Weekly downloads
2
License
MIT
Repository
github
Last release
6 years ago

cora.js

A simple vanilla javascript library, designed to make using Javascript more fun and efficient

Documentation

Install cora.js

To install cora.js, you will need bower or npm

Install with bower

First, run the following command:

$ bower install cora.js

If you are using jQuery, link the script before you link cora.js.

Next, link cora.js by using the following line of code in your <head> tag:

<script src="./bower_components/cora.js/dist/cora.js"></script>

Install with npm

Done! Now you can use cora to its fullest capability!

First, run the following command:

$ npm i cora.js

If you are using jQuery, link the script before you link cora.js.

Next, link cora.js by using the following line of code in your <head> tag:

<script src="./bower_components/cora.js/dist/cora.js"></script>

OR In a linked js file, do:

const corajs = require("cora.js");
const cora = new corajs.class();

Docs

cora.prototype.log(string toLog)

Log toLog in to the log file. Can be retrieved with cora.prototype.getLog() Example:

var toLog = "This is a test log!";
cora.prototype.log(toLog);

Return type: none

cora.prototype.getLog()

Get the contents of the log array. Example:

var log = cora.prototype.getLog();

Return type: Array

cora.prototype.printLog()

Print the log to the console. Example:

cora.prototype.printLog();

Return type: none

print()

Replacment for console.log(); Example:

print("Hello world");

Return type: none

cora.prototype.getInnerHtml(id)

Get inner HTML of element Example:

var id = "test"; //No #!
var innerHtml = cora.prototype,getInnerHtml(id);

Return type: none

Created by B.K.