# jerryslib

> A JavaScript library

Latest version **1.1.1** (published 2018-02-19) · ISC license · 0 weekly downloads

## Install

```sh
npm install jerryslib
pnpm add jerryslib
yarn add jerryslib
bun add jerryslib
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.1.1 |
| Published | 2018-02-19 |
| First published | 2018-02-10 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 18.3 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Maintainers | jerryonlyzrj |

## Links

- npm: https://www.npmjs.com/package/jerryslib
- Repository: http://git.imweb.io/jerry/adam
- npm.io page: https://npm.io/package/jerryslib

## Recent versions

- 1.1.1 (latest) — 2018-02-19
- 1.1.0 — 2018-02-19
- 1.0.5 — 2018-02-14
- 1.0.4 — 2018-02-14
- 1.0.3 — 2018-02-14
- 1.0.2 — 2018-02-14
- 1.0.1 — 2018-02-14
- 1.0.0 — 2018-02-10

## README

# Jerryslib

## Write less, Do more

***

Jerryslib is designed to be a simple simple way to use some of the JavaScript native API easily!



## Installation

***

You can install with npm:

```
$ npm install jerryslib
```



## Usage

***

```
const jerryslib = require('jerryslib')
```



## Function

***

### .query(name, querystring)

Method for getting the value of the name you pass in from the querystring

```js
jerryslib.query('hello', '?hello=js') //js
```



 ### .serialize(data)

Method for serialize JSON or parameter object to a URL string

```js
jerryslib.serialize({hello: 'js', hi: 'test'}) //'?hello=js&hi=test'
```



###.$(selector)

Like JQuery, It's a DOM selector. You can use tag selector, class selector and ID selector

```js
jerryslib.$(selector) //return a DOM or null
```



### .removeNode(node)

Method for delete a node you passed

```js
jerryslib.removeNode(node) //return DOM(node)
```



### .insertAfter(node)

Method for insert a node after the target you pass in

```js
jerryslib.insertAfter(node) //without return
```



###.addClass(node, className)

Method for add a class in the node you pass in

```js
jerryslib.addClass(node, className) //without return
```



### .getAbsoluteUrl(url)

Method for get the absolute URL from the relative URL

```js
jerryslib.getAbsoluteUrl('/jerry') //'http://imweb.io/jerry'
```



### .debounce(callback, time)

Useful for implementing behavior that should only happen after a repeated action has completed.

```js
let delay = jerryslib.debounce(output, 300) //return a function
function output(data){
    console.log(data)
}
delay()
delay() //it will delay 300ms
```



### .removeItemByIndex(index, arr)

Method for remove a item by its index from a array

```js
jerryslib.removeItemByIndex(1, [1,2,3]) //[1, 3]
```



### .sum(a, b)

Method for sum

```js
jerryslib.sum(1, 2) //3
```

---
_Source: https://npm.io/package/jerryslib · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
