Socket
Socket
Sign inDemoInstall

@blackglory/log

Package Overview
Dependencies
3
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.2.0 (2022-04-19)

Features

  • improve timestmap resolution (4070bc7)

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>

FAQs

Last updated on 19 Apr 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