1.0.6 • Published 6 years ago

tsumami v1.0.6

Weekly downloads
3
License
MIT
Repository
github
Last release
6 years ago

tsumami

ES6 DOM Utility function

Installation

as NPM package

npm install tsumami --save

# or

yarn add tsumami

CDN delivered <script>

add the following script tags before your code

<script src="https://unpkg.com/tsumami"></script>

Tsumami modules will be available in the global scope as:

  • tsumami.dom: DOM utilities docs
  • tsumami.EventManager: EventManager constructor docs
  • tsumami.events: global EventManager instance docs
  • tsumami.utils: utilities docs
  • tsumami.Nodes: Nodes constructor docs

Usage

Import individual functions and classes into your project

import { byId, qsa } from 'tsumami';
import events from 'tsumami/lib/events';

//like querySelectorAll but returns an array
const articles = qsa('.c-articles'); //Array.isArray(articles) === true

const form = byId('my-form');

events.on(form, 'submit', (e) => {
    //...
});

Modules Docs

Contributing

  1. Fork it or clone the repo
  2. Install dependencies yarn install
  3. Code your changes and write new tests in the tests folder.
  4. Ensure everything is fine by running yarn build
  5. Push it or submit a pull request :D
1.0.6

6 years ago

1.0.5

6 years ago

1.0.4

7 years ago

1.0.3

7 years ago

1.0.2

7 years ago

1.0.1

7 years ago

1.0.0

7 years ago