Miss any of our Open RFC calls?Watch the recordings here! »

es6-query

1.0.0 • Public • Published

es6-query

Build Status devDependency Status

Simple, lightweight, DOM manipulation object using plain ES6 syntax.

Getting Started

Install

npm install es6-query --save-dev

Usage

import query from 'es6-query';

//-- Simple example
const dom = query('#some-id');

if(dom.hasClass('some-class')){
    dom.removeClass('some-class');
}

//-- It's chainable!
dom.addClass('chain').removeClass('some-class');

API

  • addClass(name:String)
  • removeClass(name:String)
  • hasClass(name:String)
  • toggleClass(name:String)
  • remove()
  • get(index:int)
  • data(name:int)

Tests

npm test

License

Install

npm i es6-query

DownloadsWeekly Downloads

1

Version

1.0.0

License

MIT

Last publish

Collaborators

  • avatar