This package has been deprecated

Author message:

Package no longer supported. Contact Support at https://www.npmjs.com/support for more info.

y-utils

0.1.0 • Public • Published

y-utils - js 工具函数

Build Status Standard - JavaScript Style Guide

Install

npm install y-utils --save

Usage

id

import id from 'y-utils/id'
 
const id1 = id() // Unique id value
const id2 = id()

is

和 is.js 接近

toAsync

import toAsync from 'y-utils/toAsync'
 
const asyncFn = toAsync(() => console.log(1))
 
asyncFn()
console.log(2)
 
// output '2, 1'

curry

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

Readme

Keywords

none

Package Sidebar

Install

npm i y-utils

Weekly Downloads

0

Version

0.1.0

License

MIT

Last publish

Collaborators

  • y3g
  • yusangeng