Skip to content

Tests for Element Units like EW, EH, EMIN, and EMAX provided as a JS module

License

Notifications You must be signed in to change notification settings

tomhodgins/element-unit-tests

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

element-unit-tests

JavaScript tests for element-based units like EW, EH, EMIN, and EMAX provided as a JS module.

Usage

These functions are provided in two formats:

As a CommonJS Module

If you are using Node or other tools that can load commonjs modules you will want to use the index.js version of the library. The simplest way to get started is to require this module in another module with require() like this:

let elementUnit = require('../index.js')

An example of this can be found in tests/cjs-test.js

As a Vanilla JS Module

If you are using vanilla JS modules you will want to use the index.vanilla.js version of the library. The simplest way to get started is to import this module into another module like this:

import * as elementUnit from './path/to/index.vanilla.js'

An example of this can be found in tests/vanilla-test.html

Now the functions from this library (ew, eh, emin, emax) should be available for use inside this module as elementUnit.ew, elementUnit.eh, etc.

Demo

A functional demo of these functions being used for styling can be found in tests/demo.html

Related Info

About

Tests for Element Units like EW, EH, EMIN, and EMAX provided as a JS module

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published