Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@ctx-core/logger

Package Overview
Dependencies
Maintainers
1
Versions
253
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@ctx-core/logger - npm Package Compare versions

Comparing version 2.2.12 to 3.0.0

63

chalk.js

@@ -1,2 +0,61 @@

require = require('esm')(module)
module.exports = require('./chalk.mjs')
const use_chalk = typeof window === 'undefined' && typeof require === 'function'
const chalk = _chalk()
export function debug__chalk() {
return (console.debug || console.info).apply(console, _ARR__chalk__debug(...arguments))
}
export function log__chalk() {
return console.log.apply(console, _ARR__chalk__log(...arguments))
}
export function info__chalk() {
return console.info.apply(console, _ARR__chalk__info(...arguments))
}
export function warn__chalk() {
return console.warn.apply(console, _ARR__chalk__warn(...arguments))
}
export function error__chalk() {
return console.error.apply(console, _ARR__chalk__error(...arguments))
}
function _ARR__chalk__debug() {
return (
use_chalk
? [chalk.white(...arguments)]
: arguments
)
}
function _ARR__chalk__log() {
return (
use_chalk
? [chalk.grey(...arguments)]
: arguments
)
}
function _ARR__chalk__info() {
return (
use_chalk
? [chalk.green(...arguments)]
: arguments
)
}
function _ARR__chalk__warn() {
return (
use_chalk
? [chalk.red(...arguments)]
: arguments
)
}
function _ARR__chalk__error() {
return (
use_chalk
? [chalk.red.bold(...arguments)]
: arguments
)
}
function _chalk() {
if (use_chalk) {
return require('chalk')
} else {
return function chalk(...args) {
return args
}
}
}

@@ -1,2 +0,40 @@

require = require('esm')(module)
module.exports = require('./lib.mjs')
import {
debug__chalk,
log__chalk,
info__chalk,
warn__chalk,
error__chalk
} from './chalk.js'
export function debug() {
return debug__chalk(_timestamp(), ...arguments)
}
export function log() {
return log__chalk(_timestamp(), ...arguments)
}
export function info() {
return info__chalk(_timestamp(), ...arguments)
}
export function warn() {
return warn__chalk(_timestamp(), ...arguments)
}
export function error() {
return error__chalk(_timestamp(), ...arguments)
}
export const error__log = error
function _timestamp() {
return (new Date()).toISOString()
}
export function _log(message, fn) {
return function () {
log(message)
return fn.apply(this, arguments)
}
}
export function _console(fn, ctx__log) {
return function () {
for (let key in ctx__log) {
console[key](ctx__log[key])
}
return fn.apply(this, arguments)
}
}

9

package.json
{
"name": "@ctx-core/logger",
"version": "2.2.12",
"version": "3.0.0",
"description": "ctx-core logger",

@@ -24,7 +24,6 @@ "main": "lib.js",

"dependencies": {
"@ctx-core/object": "^2.6.0",
"chalk": "^2.4.1",
"esm": "^3.0.84"
"@ctx-core/object": "^3.0.0",
"chalk": "^2.4.1"
},
"gitHead": "ef8c06c1b6e6183cce5b0836c59761cce170a6e9"
"gitHead": "7d0d73495e67101da1ad8aeb87a7b9918b4689c1"
}
SocketSocket SOC 2 Logo

Product

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

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc