0.9.14 • Published 6 years ago

zenn v0.9.14

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

Under development

npm version devDependencies Status dependencies Status

About

Zenn is a Javascript boilerplate library for web projects that aims to make maintaining and improving any project easy.

Installation

Install with npm:

$ npm install zenn

Modules

The library provides modules that each focus on a single small task. Some modules default export a class, others export multiple objects. These can include a collection of utility functions, or ready-to-use 'singletons' (prototype-linked objects) that often act as an adapter or utility-layer for DOM API's.

ZennCharacterLimiter

import ZennCharacterLimiter from 'zenn/lib/ZennCharacterLimiter';
typeexports
ES2015 classsingle

The Zenn character limiter limits the maximum input length of input[type="text"], input[type="email"] or textarea elements to a given amount of characters.

ZennCharacterLimiter documentation

ZennWordLimiter

import ZennWordLimiter from 'zenn/lib/ZennWordLimiter';
typeexports
ES2015 classsingle

The Zenn word-limiter limits the maximum input length of input[type="text"], input[type="email"] or textarea elements to a given amount of words.

ZennWordLimiter documentation

ZennHistory

import * as ZennHistory from 'zenn/lib/ZennHistory';
// or
import { PUSH, REPLACE } from 'zenn/lib/ZennHistory';
typeexports
Objectmultiple

The ZennHistory module provides 2 objects PUSH and REPLACE that share the same API. They operate on the window.history.pushState() and window.history.replaceState() methods respectively. The modules are focused on an approach where you 'patch' the current history state. For instance, you might only want to add new key-value pairs to the existing query-string, and keep all other data of the current entry intact:

ZennHistory.PUSH.assignQuery({ test: 42 });

this will add test=42 to the query-string in a new state (we used the PUSH object).

ZennHistory documentation

ZennStateSwitch

import ZennStateSwitch from 'zenn/lib/ZennStateSwitch';
typeexports
ES2015 classsingle

The ZennStateSwitch allows to synchronize one or multiple HTML elements' classes with a state value from a given array of strings. The switch implements a ReactiveX Observable that emits new states as they are set through the class its API. An array of valid state strings is to be passed to the constructor.

ZennStateSwitch documentation

ZennEmitter

import ZennEmitter from 'zenn/lib/ZennEmitter';
typeexports
ES2015 classsingle

The ZennEmitter class is built on top of ReactiveX JS, and provides a center point for event subscriptions to multiple custom event types.

ZennStateSwitch documentation

0.9.14

6 years ago

0.9.13

6 years ago

0.9.12

6 years ago

0.9.11

7 years ago

0.9.10

7 years ago

0.9.9

7 years ago

0.9.8

7 years ago

0.9.6

7 years ago

0.9.5

7 years ago

0.9.4

7 years ago

0.9.3

7 years ago

0.9.2

7 years ago

0.9.1

7 years ago

0.9.0

7 years ago