GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - Tinkoff/utils.js: Fast, small and purely functional utility library

BranchesTags
Open more actions menu

Latest commit

 

History

66 Commits
66 Commits

Folders and files

NameName
Last commit message
Last commit date
.github/workflows
.github/workflows
 
 
bundleSize
bundleSize
 
 
generate/docs
generate/docs
 
 
plugins/esdoc
plugins/esdoc
 
 
src
src
 
 
tools
tools
 
 
.editorconfig
.editorconfig
 
 
.esdoc.json
.esdoc.json
 
 
.gitignore
.gitignore
 
 
.npmignore
.npmignore
 
 
.prettierrc.json
.prettierrc.json
 
 
.release-it.json
.release-it.json
 
 
CHANGELOG.md
CHANGELOG.md
 
 
COMPARE.md
COMPARE.md
 
 
CONTRIBUTING.md
CONTRIBUTING.md
 
 
LICENSE
LICENSE
 
 
README.md
README.md
 
 
babel.config.js
babel.config.js
 
 
jest.config.js
jest.config.js
 
 
package-lock.json
package-lock.json
 
 
package.json
package.json
 
 
runBenchmark.ts
runBenchmark.ts
 
 
tsconfig.benchmark.json
tsconfig.benchmark.json
 
 
tsconfig.json
tsconfig.json
 
 

Repository files navigation

Tinkoff Utils Build status Coverage Status

Fast, small and purely functional utility library

Install

$ npm install @tinkoff/utils

Features

  • Fast
  • Small
  • Fully tested
  • Documented
  • Purely functional
  • Modern codebase

Structure of the library

  • /object – for objects
  • /string – for strings
  • /promise – for promises
  • /array – for arrays or array-like objects
  • /function – for functions – composition, currying and so on, also a set of simple functions (noop, T, F)
  • /is – set of type checking methods
  • / – root contains utilities which don't satisfy any of the above categories or are universal

Usage

import pathOr from '@tinkoff/utils/object/pathOr';
import compose from '@tinkoff/utils/function/compose';
import toLower from '@tinkoff/utils/string/toLower';
import map from '@tinkoff/utils/array/map'

const toLowerName = compose(
    toLower,
    pathOr(['name'], '')
);
const result = map(toLowerName)([{name: 'testA'}, {name: 'testb'}])

Benchmarks

$ npm run benchmark
Utility Lodash Ramda Utils
clone 120,807 ops/sec 112,053 ops/sec 293,572 ops/sec
array/filter 2,080,728 ops/sec 1,849,633 ops/sec 2,046,113 ops/sec
is/empty 1,506,963 ops/sec 474,177 ops/sec 3,731,564 ops/sec
function/flip 7,528,745 ops/sec 3,735,143 ops/sec 3,490,207 ops/sec
object/path 12,023,128 ops/sec 8,894,639 ops/sec 7,587,076 ops/sec
string/trim 4,215,928 ops/sec 1,034,655 ops/sec 6,029,794 ops/sec

Browser support

  • Chrome >= 40
  • Firefox >= 52
  • Edge >= 14
  • IE >= 11
  • Safari >= 10
  • iOS >= 10
  • Android >= 4.4

Node support

  • 6.4.0 and higher

Bundle size

Library Bundle size
import _ from 'lodash' 70.1 kb
import ... from 'lodash/...' 21.8 kb
import R from 'ramda' 41.3 kb
import ... from 'ramda/src/...' 10 kb
import ... from '@tinkoff/utils/...' 2.32 kb

For detailed comparison with specific libraries see COMPARE.md

About

Fast, small and purely functional utility library

tinkoff.github.io/utils.js/

Topics

currylodashperfomanceramdatinkoffutils

Resources

Readme
Apache-2.0 license

Contributing

Contributing
Activity
Custom properties

Stars

177 stars

Watchers

17 watching

Forks

23 forks
Report repository

Releases

Packages

Used by

Contributors

Languages

You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.