You're Invited:Meet the Socket Team at BlackHat and DEF CON in Las Vegas, Aug 4-6.RSVP
Socket
Book a DemoInstallSign in
Socket

tily

Package Overview
Dependencies
Maintainers
0
Versions
50
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

tily

Fast, small and purely functional utility library

2.23.2
latest
Source
npmnpm
Version published
Maintainers
0
Created
Source

tily

Fast, small and purely functional utility library.

API Document

Install

$ npm install tily

Features

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 'tily/object/pathOr';
import compose from 'tily/function/compose';
import toLower from 'tily/string/toLower';
import map from 'tily/array/map';

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

Benchmarks

$ npm run benchmark
UtilityLodashRamdaTily
clone120,807 ops/sec112,053 ops/sec293,572 ops/sec
array/filter2,080,728 ops/sec1,849,633 ops/sec2,046,113 ops/sec
is/empty1,506,963 ops/sec474,177 ops/sec3,731,564 ops/sec
function/flip7,528,745 ops/sec3,735,143 ops/sec3,490,207 ops/sec
object/path12,023,128 ops/sec8,894,639 ops/sec7,587,076 ops/sec
string/trim4,215,928 ops/sec1,034,655 ops/sec6,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

LibraryBundle 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 'tily/...'2.32 kb

For detailed comparison with specific libraries see COMPARE.md

Keywords

utils

FAQs

Package last updated on 17 Sep 2024

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts