Usage
Installation
npm install domq.js --save
There have four files in dist
after build.
dist
├── domq.js (UMD)
├── domq.common.js (CJS)
├── domq.esm.js (ESM)
└── domq.modular.js (MODULAR)
It's used domq.modular.js
by default.
import { D } from 'domq.js'
Or you can also import the other file as needed.
import { D } from 'domq.js/dist/domq.esm.js'
Modular Usage
You should put the methods as needed on D
function manually.
import {
D,
isArray,
addClass
} from 'domq.js/src/domq.modular';
// Static methods
const methods = {
isArray
}
// Prototype methods
const fnMethods = {
addClass
}
D.extend(methods);
D.fn.extend(fnMethods);
Last updated
Was this helpful?