https://github.com/arjenhill/ppo
A super small and useful utils library for JavaScript.
https://github.com/arjenhill/ppo
javascript javascript-tools
Last synced: 8 months ago
JSON representation
A super small and useful utils library for JavaScript.
- Host: GitHub
- URL: https://github.com/arjenhill/ppo
- Owner: arjenhill
- License: apache-2.0
- Created: 2018-03-06T02:03:16.000Z (almost 8 years ago)
- Default Branch: master
- Last Pushed: 2020-08-11T06:07:28.000Z (over 5 years ago)
- Last Synced: 2025-04-28T09:48:38.637Z (8 months ago)
- Topics: javascript, javascript-tools
- Language: JavaScript
- Homepage: https://github.ahthw.com/ppo/
- Size: 2.61 MB
- Stars: 16
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
## Overview
   
> A utility belt library for modern JavaScript.
Every frontend developer has written his own utils library, and we often write methods that are easily forgotten and highly used. [ppo](https://github.com/jiayi2/ppo/) is a super small and useful utils library for JavaScript. It and [lodash](https://github.com/lodash/lodash) [underscore](https://github.com/jashkenas/underscore) [lazy.js](https://github.com/dtao/lazy.js) almost no coupling.
I sorted out the most frequently used function functions in everyday development. These functions are almost ubiquitous in your development, and they are not found in lodash underscore.
Most of the code comes from the [stackoverflow](https://stackoverflow.com/) site in the high score answer, here to pay tribute to the original author.
ppo little poor, gzip less than 6k, so a library you can use it anytime, anywhere without worrying about anything.
See the [latest docs/documentation](https://github.ahthw.com/ppo/) for a full API reference.
## Recommendation
Latest Branch [bbo-next](https://github.com/halldwang/ppo/tree/bbo-next)
## Installation
#### Install using npm
[](https://npmjs.org/package/ppo-cli)
```
npm install ppo-cli --save
...
import ppo from 'ppo-cli';
```
### Include in html
This function can only be used in previous version. (version <= 1.3.22)
More Change [branch](https://github.com/halldwang/ppo-cli/tree/master) or Tags [1.3.19](https://github.com/halldwang/ppo-cli/tree/1.3.19) [1.3.20](https://github.com/halldwang/ppo-cli/tree/1.3.20) [1.3.22](https://github.com/halldwang/ppo-cli/tree/1.3.22)
```
```
#### CDN
```
//mat1.gtimg.com/www/js/libs/ppo.1.3.22.min.js
```
## Usage
```
var username = ppo.getCookie('username');
ppo.log('hello world!');
var id = ppo.setTimesout(function(word){
console.log(word);
console.log(this); // log {index: 3 ,times: 8, over: false}
}, 1000/20, 8, 'helloworld')
```
## Why?
When you use react, vue, angular often need to write a lot of utils method. But lodash and underscore these libraries are not omnipotent. So you have to find a lot of tool library. Use ppo, you can solve the daily development of many small problems. Simple and compact!
## License
Trine is ISC licensed. See the [LICENSE](https://github.com/halldwang/ppo-cli/blob/beta/LICENSE) document for more information.