1.0.3 • Published 2 years ago

js-zfuncs v1.0.3

Weekly downloads
-
License
ISC
Repository
-
Last release
2 years ago

Useful functions for js/ts

Featured functions

  • debounce
  • throttle
  • b64Encode
  • b64Decode

Install

yarn add js-zfuncs
npm i js-zfuncs

Usage

Add new type: module in package.json

// cat package.json
{
  "name": "app",
  "type": "module",
  ....
}

Import it in your code:

// app.js
import * as funcs from 'js-zfuncs'

function add(a,b){
    console.log(a+b)
    return a+b
}
const addWrap=funcs.debounce(add, 100)
addWrap(1,2).then(v=>console.log({v:v}))
addWrap(2,2).then(v=>console.log({v:v}))

execute it:

node app.js
1.0.3

2 years ago

1.0.2

2 years ago

1.0.1

2 years ago

1.0.0

2 years ago