Skip to content

Latest commit

 

History

History
35 lines (23 loc) · 590 Bytes

File metadata and controls

35 lines (23 loc) · 590 Bytes

function-control

English | 简体中文

Small function parameter helpers for TypeScript projects.

Install

npm install @arylo-scripts/function-control

Usage

import { headParams, tailParams } from '@arylo-scripts/function-control'

const logWithScope = headParams(console.log, '[build]')
logWithScope('started') // Output: [build] started

const logDone = tailParams(console.log, 'done')
logDone('build') // Output: build done

API

See the API reference.

Development

npm install
npm run lint
npm run build