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

seneca-log-filter

Package Overview
Dependencies
Maintainers
2
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

seneca-log-filter

Seneca log filtering module

  • 0.1.0
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
392
decreased by-63.84%
Maintainers
2
Weekly downloads
 
Created
Source

Seneca

A Seneca.js Log Filter Module

seneca-log-filter

npm version Build Status Coverage Status Dependency Status Gitter chat

  • Sponsor: nearForm

Examples

var LogFilter = require('seneca-log-filter')
var filter = LogFilter({'omit-metadata': true, level: 'info' })
var obj = {level: 'info', foo: 'test', bar: 'test' }

var filteredObj = filter(obj)

// filteredObj is equal to {foo: 'test', bar: 'test' }

API

LogFilter(config)

  • config is an object which can take several properties which change the behaviour of the filter which are listed below.
    • level a required property which states the log level to filter out
    • omit-metadata a value which can be true or false, if true this omits the properties with the names seneca, level and when when filtering an object
    • omit an array of strings of names of properties to omit when filtering an object
Returns

A function which can be called on an object to filter properties out of it.

Test

npm test

Contributing

This module follows the general Senecajs org contribution guidelines, and encourages open participation. If you feel you can help in any way, or discover any Issues, feel free to create an issue or create a pull request!

If you wish to read more on our guidelines, feel free to

License

Copyright (c) 2016, David Gonzalez. Licensed under MIT.

Keywords

FAQs

Package last updated on 13 Sep 2016

Did you know?

Socket

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
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc