# @ackystack/ackystack-utils

Latest version **2.0.0** (published 2020-11-26) · Apache-2.0 license · 0 weekly downloads

## Install

```sh
npm install @ackystack/ackystack-utils
pnpm add @ackystack/ackystack-utils
yarn add @ackystack/ackystack-utils
bun add @ackystack/ackystack-utils
```

## Health

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

Positive: has types; no vulnerabilities; high quality score.

Warnings: low downloads; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 2.0.0 |
| Published | 2020-11-26 |
| First published | 2020-11-26 |
| Weekly downloads | 0 |
| License | Apache-2.0 |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 14 |
| Unpacked size | 2 MB |
| Known vulnerabilities | 0 (+23 in 1 direct dependencies) |
| Install scripts | no |
| GitHub stars | 1 |
| Author | Xuanzi An |
| Maintainers | anxuanzi |

## Links

- npm: https://www.npmjs.com/package/@ackystack/ackystack-utils
- Repository: https://github.com/AckyStack/AckyStack-Frontend-Utils
- npm.io page: https://npm.io/package/@ackystack/ackystack-utils

## Dependencies (14)

- [qs](https://npm.io/package/qs.md) ^6.9.4
- [axios](https://npm.io/package/axios.md) ^0.21.0
- [nanoid](https://npm.io/package/nanoid.md) ^3.1.18
- [ts-md5](https://npm.io/package/ts-md5.md) ^1.2.7
- [bcryptjs](https://npm.io/package/bcryptjs.md) ^2.4.3
- [@types/qs](https://npm.io/package/@types/qs.md) ^6.9.5
- [crypto-js](https://npm.io/package/crypto-js.md) ^4.0.0
- [js-base64](https://npm.io/package/js-base64.md) ^3.6.0
- [@types/js-base64](https://npm.io/package/@types/js-base64.md) ^3.0.0
- [@rollup/plugin-json](https://npm.io/package/@rollup/plugin-json.md) ^4.1.0
- [rollup-plugin-terser](https://npm.io/package/rollup-plugin-terser.md) ^7.0.2
- [@rollup/plugin-commonjs](https://npm.io/package/@rollup/plugin-commonjs.md) ^16.0.0
- [rollup-plugin-typescript2](https://npm.io/package/rollup-plugin-typescript2.md) ^0.29.0
- [rollup-plugin-node-polyfills](https://npm.io/package/rollup-plugin-node-polyfills.md) ^0.2.1

## Recent versions

- 2.0.0 (latest) — 2020-11-26

## README

# AckyStack Front End Utilities

[![npm version](https://badge.fury.io/js/%40ackystack%2Fackystack-utils.svg)](https://badge.fury.io/js/%40ackystack%2Fackystack-utils)	[![jsDelivr](https://data.jsdelivr.com/v1/package/npm/@ackystack/ackystack-utils/badge)](https://www.jsdelivr.com/package/npm/@ackystack/ackystack-utils)	[![Maintenance](https://img.shields.io/badge/Maintained%3F-yes-green.svg)](https://GitHub.com/AckyStack/AckyStack-Frontend-Utils/graphs/commit-activity)	[![Website ackystack.com](https://img.shields.io/website-up-down-green-red/http/shields.io.svg)](https://www.ackystack.com/)	[![GitHub license](https://img.shields.io/github/license/AckyStack/AckyStack-Frontend-Utils.svg)](https://github.com/AckyStack/AckyStack-Frontend-Utils/blob/master/LICENSE)	[![GitHub contributors](https://img.shields.io/github/contributors/AckyStack/AckyStack-Frontend-Utils.svg)](https://GitHub.com/AckyStack/AckyStack-Frontend-Utils/graphs/contributors/)

A utility made for AckyStack front end developers. This utilities toolkit cloud help developers to do some AckyStack special operations more efficiently. It includes but not limit to: `Codec Module`, `Encryption Module` and `Http Request Module`. Have fun and be free to use this library!!!



## Install Instruction

##### NPM


```npm install @ackystack/ackystack-utils```



##### YARN


```yarn add @ackystack/ackystack-utils```



##### CDN

Add one of the following tag in your HTML document.

```html
<script src="https://cdn.jsdelivr.net/npm/@ackystack/ackystack-utils@latest/dist/ackystack-utils.min.js"></script>
```

 or a specific version 

```html
<script src="https://cdn.jsdelivr.net/npm/@ackystack/ackystack-utils@2.0.0/dist/ackystack-utils.min.js"></script>
```



## Usage

```javascript
    // instantiate with default configuration
    let asu = new AckyStackUtils();

    /** Encryption Utils*/

	//This method will do exactly what you think (return a string)
    asu.EncryptionUtils().sha256Encrypt();
	//This method will do exactly what you think (return a string)
    asu.EncryptionUtils().md5Encrypt();     
	//This method will do exactly what you think (return a string)
    asu.EncryptionUtils().passwordEncrypt();


    /** Codec Utils*/

	//This method will do exactly what you think (return a string)
    asu.CodecUtils().base64Encode();
	//This method will do exactly what you think (return a string)
    asu.CodecUtils().base64Decode();


    /** HTTP Request Utils*/
    
    // send a get request with axios
    asu.RequestUtils().get('url', {a: 'hello', b: 1234123}).then(response => {
        //When the request success and also gets feedback from the server...
        console.log(response.ret);
        console.log(response.msg);
        console.log(response.data);
    }).catch(reason => {
        //When the request faild to send, or server send error feedback...
        //the 'reason' will be either a server response, or a Promise error.
        console.log(reason);
    })
    
    //send a post request with axios
    //The post method has three arguments, as you can tell what first and second is. 
	//The third argument is called 'isForm',
    //I'm sure about you can tell what does it do from the name.
    asu.RequestUtils().post('url', {a: 'hello', b: 1234123}, true).then(response => {
        //do something...
    }).catch(reason => {
        //do something else...
    })

```

more and more methods coming up ~


## Contributing

**All contributions are super welcome!**


## Contact us

Please contact us if you need any help or just chill out:

- **Skype Group (English support provided):** https://join.skype.com/PSa6F48kLSE9
- **Telegram group (English support provided):** https://t.me/ackystack
- **Discord:** `coming soon~`
- **QQ Group (Chinese):**  `644487246`

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