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

util-ex

Package Overview
Dependencies
Maintainers
1
Versions
58
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

util-ex - npm Package Compare versions

Comparing version 0.0.1 to 0.1.0

lib/_shims.js

26

lib/log.js

@@ -1,3 +0,26 @@

var inspect = require('util').inspect;
var inspect = require('./inspect');
var format = require('./format');
function pad(n) {
return n < 10 ? '0' + n.toString(10) : n.toString(10);
}
var months = ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep',
'Oct', 'Nov', 'Dec'];
// 26 Feb 16:19:34
function timestamp() {
var d = new Date();
var time = [pad(d.getHours()),
pad(d.getMinutes()),
pad(d.getSeconds())].join(':');
return [d.getDate(), months[d.getMonth()], time].join(' ');
}
module.exports = function() {
console.log('%s - %s', timestamp(), format.apply(exports, arguments));
};
/*
module.exports = function(msg, type, depth) {

@@ -8,1 +31,2 @@ if (isNaN(depth)) depth = 10;

}
*/

2

package.json

@@ -5,3 +5,3 @@ {

"homepage": "https://github.com/snowyu/util-ex.js",
"version": "0.0.1",
"version": "0.1.0",
"author": {

@@ -8,0 +8,0 @@ "name": "Riceball LEE",

@@ -1,3 +0,26 @@

var inspect = require('util').inspect;
var inspect = require('./inspect');
var format = require('./format');
function pad(n) {
return n < 10 ? '0' + n.toString(10) : n.toString(10);
}
var months = ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep',
'Oct', 'Nov', 'Dec'];
// 26 Feb 16:19:34
function timestamp() {
var d = new Date();
var time = [pad(d.getHours()),
pad(d.getMinutes()),
pad(d.getSeconds())].join(':');
return [d.getDate(), months[d.getMonth()], time].join(' ');
}
module.exports = function() {
console.log('%s - %s', timestamp(), format.apply(exports, arguments));
};
/*
module.exports = function(msg, type, depth) {

@@ -8,1 +31,2 @@ if (isNaN(depth)) depth = 10;

}
*/
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