essenz
TypeScript icon, indicating that this package has built-in type declarations

1.2.3 • Public • Published

essenz

The convenience library for JavaScript.

This is a library that contains commonly used functions to work with arrays, object, HTML elements etc. It can be used as a replacement for babel-polyfill since it's rather big in size. But essenz doesn't provide real polyfills, just an individual set of functions that can be imported using import { fun } from 'essenz'.

For now please see index.d.ts for a list of functions.

Some examples

Add events to all elements with the same class

import {selectByClass, addEvent} from 'essenz'

const clickMeElements = selectByClass('click-me')
addEvent(clickMeElements, 'click', event => console.log('hello'))

Map over objects

import {objectEntries} from 'essenz'
const data = {a: 10, b: 30}

objectEntries(data)
  .map(([key, value]) => console.log(key, value))
// > a 10
// > b 30

Readme

Keywords

Package Sidebar

Install

npm i essenz

Weekly Downloads

0

Version

1.2.3

License

MIT

Unpacked Size

54 kB

Total Files

25

Last publish

Collaborators

  • alinnert