@devutil/devutil

1.0.0 • Public • Published

DevUtil.js

Useful JavaScript development utilities (functions).

Usage

JavaScript file

  1. Download whole repository or just a single devutil.js file.

  2. Add to .html file (<head> section):

<script src="devutil.js"></script>

  1. Call JavaScript function from your JavaScript code, example:
<script type="application/javascript">
  console.log(DevUtil.isTrue(true));
</script>

Functions

JavaScript function Description
DevUtil.isDefined() true if variable is defined, false otherwise
DevUtil.isUndefined() true if variable is undefined, false otherwise
DevUtil.isTrue() true if variable's value equals to true, false otherwise
DevUtil.isFalse() true if variable's value equals to false, false otherwise

Unit tests

  1. Install npm package manager

  2. Install Jest framework. For example, via 'npm':

npm install --save-dev jest

  1. Run unit tests:

npm run test

License

MIT

Copyright (c) 2021, Andrey Kashukov

Package Sidebar

Install

npm i @devutil/devutil

Weekly Downloads

0

Version

1.0.0

License

MIT

Unpacked Size

4.75 kB

Total Files

6

Last publish

Collaborators

  • devutil