2.1.5 ā¢ Published 4 years ago
@suhy/vanilla-js-util v2.1.5
This npm app helps you to increase vanillaJS app building speed.
Getting Started
Install npm
npm install --save @suhy/vanilla-js-util
Feature
- createTag({tag: --, id: --, classes: -- }) : the value of classes is seperated by blank
createTag({tag: 'div', classes: 'emphasize bold'});
- resizeTextarea() : it enables textarea following user's input
resizeTextarea()
- focusSet(element) : from the element(window or dom element), focus on the first descendant input tag
const element = document.querySelector('.some')
focusSet(element);
- reloadScreen
: it replaces
window.location.reload
reloadScreen()
- capitalize : it changes the first letter of input text to capitalized letter
const todo = 'todo';
capitalize(todo); //=> Todo
Usage
import { createTag, resizeTextarea, focusSet, reloadScreen, capitalize } from '@suhy/vanilla-js-util';
Author
š¤ Suhyeon Jang
š¤ Contributing
- Fork it (https://github.com/shjang7/2020-04-17-personal-npm-package/fork)
- Create your feature branch (git checkout -b feature/choose-a-name)
- Commit your changes (git commit -am 'what this commit will fix/add')
- Push to the branch (git push origin feature/chosen-name)
- Create a new Pull Request