element-query-tests

1.1.0 • Public • Published

element-query-tests

JavaScript tests for element query conditions 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 elementQuery = 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 elementQuery from './path/to/index.vanilla.js'

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

Now the functions from this library (minWidth, maxWidth, minHeight, maxHeight, minChildren, children, maxChildren, minCharacters, characters, maxCharacters, minScrollX, maxScrollX, minScrollY, maxScrollY, minAspectRatio, maxAspectRatio, orientation) should be available for use inside this module as elementQuery.minWidth, elementQuery.maxWidth, etc

Demo

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

Related Info

Package Sidebar

Install

npm i element-query-tests

Weekly Downloads

5

Version

1.1.0

License

MIT

Unpacked Size

16.2 kB

Total Files

9

Last publish

Collaborators

  • tomhodgins