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

logform

Package Overview
Dependencies
Maintainers
1
Versions
32
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

logform - npm Package Compare versions

Comparing version 1.2.1 to 1.2.2

.gitattributes

5

CHANGELOG.md
# CHANGELOG
### 1.2.2
**2017/12/05**
- [#4], [#11] Fix timestamp and replace `date-fns` with `fecha` (with test cases) [`@ChrisAlderson`].
### 1.2.1

@@ -4,0 +9,0 @@ **2017/10/01**

8

examples/filter.js

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

/* eslint no-unused-vars: 0 */
const { format } = require('../');

@@ -21,4 +23,4 @@ const { combine, timestamp, label } = format;

const willNeverThrow = format.combine(
format(info => { return false })(), // Ignores everything
format(info => { throw new Error('Never reached') })()
format(info => { return false; })(), // Ignores everything
format(info => { throw new Error('Never reached'); })()
);

@@ -29,2 +31,2 @@

message: 'wow such testing'
}))
}));

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

/* eslint no-unused-vars: 0 */
const { format } = require('../');

@@ -2,0 +3,0 @@

{
"name": "logform",
"version": "1.2.1",
"version": "1.2.2",
"description": "An mutable object-based log format designed for chaining & objectMode streams.",
"main": "index.js",
"scripts": {
"lint": "populist *.js",
"pretest": "populist *.js test/*.js examples/*.js",
"lint": "populist *.js test/*.js examples/*.js",
"pretest": "npm run lint",
"test": "nyc mocha test/*.test.js"

@@ -29,3 +29,3 @@ },

"colors": "^1.1.2",
"date-fns": "^1.28.5"
"fecha": "^2.3.2"
},

@@ -32,0 +32,0 @@ "devDependencies": {

@@ -12,3 +12,3 @@ # logform

format.align(),
format.printf(info => `${info.timestamp} ${info.level}: ${message}`)
format.printf(info => `${info.timestamp} ${info.level}: ${info.message}`)
);

@@ -15,0 +15,0 @@ ```

'use strict';
const fecha = require('fecha');
const format = require('./format');
const formatDate = require('date-fns/format');

@@ -18,3 +18,3 @@ /*

? opts.format()
: formatDate(opts.format);
: fecha.format(new Date(), opts.format);
}

@@ -21,0 +21,0 @@

Sorry, the diff of this file is not supported yet

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