util4jsdeprecated

The util4js library contains JavaScript utilities.

Usage no npm install needed!

<script type="module">
  import util4js from 'https://cdn.skypack.dev/util4js';
</script>

README

util4js

The util4js library contains JavaScript utilities.

Installation

npm install util4js

API

Exception

Exception class is the base class for all exceptions.

Example

"use strict";

require("class4js");
var util4js = require("../lib/util4js.js");

var CustomException = $class({
  __construct__: function () {
    this.name = "CustomException"; 
  }
}, util4js.Exception);

try {
  throw new CustomException("Exception was raised");
} catch (ex) {
  console.log(ex.name + ": " + ex.message);
}

License

This software is distributed under the terms of the GNU General Public License, version 3 (GPL-3.0).