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

a-toolbox

Package Overview
Dependencies
Maintainers
1
Versions
64
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

a-toolbox - npm Package Compare versions

Comparing version 0.0.16 to 0.0.17

45

main.js

@@ -13,2 +13,6 @@ // standardjs

return (typeof v !== 'undefined' || v !== null)
},
onBrowser: function () {
return (typeof window !== 'undefined' && typeof module === 'undefined')
}

@@ -24,6 +28,26 @@ },

Log: function (params) {
var __segments = params.segments
var __levels = params.levels
// @todo const __mode = params.mode console, file, email ...
var __segments
var __levels
var __browser
var MARKER_SUCCESS, MARKER_ERROR, MARKER_INFO, MARKER_WARNING
var __init = function (params) {
__segments = params.segments
__levels = params.levels
__browser = tools.core.onBrowser()
// @todo const __mode = params.mode console, file, email ...
MARKER_SUCCESS = '✔' // ✔ ✔️
MARKER_ERROR = '✗️'
MARKER_INFO = 'ℹ️'
MARKER_WARNING = '❗️️'
if (!__browser) {
var colors = require('colors')
MARKER_SUCCESS = colors.green(MARKER_SUCCESS)
MARKER_ERROR = colors.red(MARKER_ERROR)
MARKER_INFO = colors.blue(MARKER_INFO)
MARKER_WARNING = colors.yellow(MARKER_WARNING)
} else {
}
}
var verbose = function (segment, level) {

@@ -33,7 +57,13 @@ if ((__segments === '*' || tools.array.contains(__segments, segment)) &&

var _args = Array.prototype.slice.call(arguments)
if (level === 'error') {
if (level === tools.Log.level.ERROR) {
_args[1] = MARKER_ERROR
console.error.apply(console, _args)
} else if (level === 'warning') {
} else if (level === tools.Log.level.WARNING) {
_args[1] = MARKER_WARNING
console.warn.apply(console, _args)
} else if (level === tools.Log.level.SUCCESS) {
_args[1] = MARKER_SUCCESS
console.log.apply(console, _args)
} else {
_args[1] = MARKER_INFO
console.log.apply(console, _args)

@@ -44,2 +74,4 @@ }

__init(params)
return {

@@ -568,3 +600,4 @@ verbose: verbose

WARNING: 'WARNING',
INFO: 'INFO'
INFO: 'INFO',
SUCCESS: 'SUCCESS'
}

@@ -571,0 +604,0 @@

{
"name": "a-toolbox",
"version": "0.0.16",
"version": "0.0.17",
"description": "lightweight tools",
"keywords": [
"tools",
"log",
"lib",

@@ -34,2 +35,5 @@ "misc",

"main": "main",
"dependencies" : {
"colors": "x"
},
"devDependencies": {

@@ -36,0 +40,0 @@ "standard": "x",

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