Socket
Socket
Sign inDemoInstall

@blackglory/log

Package Overview
Dependencies
6
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
Maintainers
1
Created

Changelog

Source

1.3.0 (2022-10-11)

Features

  • add group (870b954)

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 Oct 2022

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