Socket
Socket
Sign inDemoInstall

@blackglory/log

Package Overview
Dependencies
23
Maintainers
1
Versions
15
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    @blackglory/log

```sh npm install --save @blackglory/log # or yarn add @blackglory/log ```


Version published
Weekly downloads
916
increased by222.54%
Maintainers
1
Created
Weekly downloads
 

Changelog

Source

2.0.2 (2023-06-11)

Bug Fixes

  • export src (1c4922b)

Readme

Source

log

Install

npm install --save @blackglory/log
# or
yarn add @blackglory/log

Usage

import { log } from '@blackglory/log'

const value = log('foo', 'bar')
// Equivalent to
const value = (console.log('foo', 'bar'), 'bar')

API

log

function log<T>(...data: [...any[], T]): T

time

function time<T>(message: string, fn: () => T): T
function time<T>(message: string, fn: () => PromiseLike<T>): Promise<T>

timeFunction

function timeFunction<Result, Args extends any[]>(
  message: string
, fn: (...args: Args) => Result
): (...args: Args) => Result

timeAsyncFunction

function timeAsyncFunction<Result, Args extends any[]>(
  message: string
, fn: (...args: Args) => PromiseLike<Result>
): (...args: Args) => Promise<Result>

group

function group<T>(label: string, fn: () => T): T
function group<T>(fn: () => T): T

FAQs

Last updated on 11 Jun 2023

Did you know?

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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc