# y-utils

> Some helpful functions.

Latest version **0.1.0** (published 2017-03-27) · MIT license · 0 weekly downloads

> **Deprecated.** This package is deprecated.

## Install

```sh
npm install y-utils
pnpm add y-utils
yarn add y-utils
bun add y-utils
```

## Health

**Score 10/100 (F)** — status: deprecated.

Negative: deprecated.

## Facts

| | |
|---|---|
| Version | 0.1.0 |
| Published | 2017-03-27 |
| First published | 2017-03-27 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | Y3G |
| Maintainers | yusangeng |

## Links

- npm: https://www.npmjs.com/package/y-utils
- Repository: https://github.com/yusangeng/yutils
- Homepage: https://github.com/yusangeng/yutils#readme
- Issues: https://github.com/yusangeng/yutils/issues
- npm.io page: https://npm.io/package/y-utils

## Recent versions

- 0.1.0 (latest) — 2017-03-27

## README

# y-utils - js 工具函数

[![Build Status](https://travis-ci.org/yusangeng/yutils.svg?branch=master)](https://travis-ci.org/yusangeng/yutils) [![Standard - JavaScript Style Guide](https://img.shields.io/badge/code_style-standard-brightgreen.svg)](https://standardjs.com)

### Install

```
npm install y-utils --save
```

### Usage

#### id

``` js
import id from 'y-utils/id'

const id1 = id() // Unique id value
const id2 = id()
```

#### is

和 is.js 接近

#### toAsync

``` js
import toAsync from 'y-utils/toAsync'

const asyncFn = toAsync(() => console.log(1))

asyncFn()
console.log(2)

// output '2, 1'
```

#### curry

``` js
import curry from 'y-utils/curry'

function abc (a, b, c) {
  return a + b + c
}

const fn = curry(abc)

fn(1)(2)(3) //=> 6
fn(1, 2)(3) //=> 6
fn(1)(2, 3) //=> 6
fn(1, 2, 3) //=> 6
```

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