@foragefox/doubledash
v2.2.2
Published
DoubleDash is simple utility library meant to help transition people off of jQuery.
Readme
Double Dash
Double Dash is simple utility library meant to help transition people off of jQuery.
Installation
npm install @foragefox/doubledash
Usage
Browser (script tag)
Using a CDN:
<script src="https://unpkg.com/@foragefox/doubledash"></script>This exposes a global __ object:
__.dom.find('[data-logic]')Bundlers (import)
import __ from '@foragefox/doubledash';
import individual categories
import { dom, event } from '@foragefox/doubledash';
import individual functions
import { find, findOne, isEmpty } from '@foragefox/doubledash';
Categories
We orginiaze our functions into categories:
- animation
- dom
- event
- form
- lang
- location
- size
- template
Namespace structure
The name space is broken down by the library, category and function name.
{library}.{category}.{function}eg.
__.dom.parents(element, target)library = __
category = dom
function = parents
Documentation
Find our docs here
| Animation | Dom | Event | Lang | Location | Size | Template | | ----------------------------------------------------- | ---------------------------------- | ---------------------------------- | ----------------------------------------- | --------------------------------------- | ----------------------------------------- | --------------------------------------- | | animate() | after() | off() | escapeHtml() | offset() | width() | supplant() | | onClick() | append() | on() | extend() | position() | outerWidth() | | | onHover() | before() | once() | isArray() | | setWidth() | | | onEntrance() | children() | trigger() | isBoolean() | | height() | | | onLoop() | clone() | | isEmpty() | | outerHeight() | | | | closest() | | isFunction() | | setHeight() | | | | contains() | | isJson() | | | | create() | | isNull() | | | | empty() | | isNumber() | | | | find() | | isObject() | | | | findOne() | | isRegExp() | | | | hide() | | isSet() | | | | next() | | isString() | | | | parents() | | isUndefined() | | | | prepend() | | | | prev() | | | | remove() | | | | show() | | | | siblings() | | | | toggle() | |
Testing
Before running npm run test, make sure you add the temporary option in the package.json: "type": "module"
