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

caterpillar-filter

Package Overview
Dependencies
Maintainers
1
Versions
62
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

caterpillar-filter - npm Package Compare versions

Comparing version 2.0.1 to 2.0.2

4

example.js
// Import
var logger = new (require('caterpillar').Logger)();
var filter = new (require('./').Filter)({level:6}); // omit log level entries above 6
var logger = require('caterpillar').createLogger();
var filter = require('./').createFilter({level:6}); // omit log level entries above 6

@@ -5,0 +5,0 @@ // Pipe logger output to filter, then filter output to stdout

@@ -1,6 +0,9 @@

(The MIT License)
Copyright (c) 2012+ Bevry Pty Ltd <us@bevry.me>
Copyright (c) 2011 Benjamin Lupton <b@lupton.cc>
<!-- LICENSEFILE/ -->
# License
Copyright &copy; Bevry Pty Ltd <us@bevry.me> (http://bevry.me)
## The MIT License
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the 'Software'), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

@@ -11,1 +14,5 @@

THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
<!-- /LICENSEFILE -->

@@ -1,6 +0,7 @@

// Generated by CoffeeScript 1.6.2
// Generated by CoffeeScript 1.6.3
var Filter, _ref,
__bind = function(fn, me){ return function(){ return fn.apply(me, arguments); }; },
__hasProp = {}.hasOwnProperty,
__extends = function(child, parent) { for (var key in parent) { if (__hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; };
__extends = function(child, parent) { for (var key in parent) { if (__hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; },
__slice = [].slice;

@@ -11,3 +12,4 @@ Filter = (function(_super) {

function Filter() {
this._transform = __bind(this._transform, this); _ref = Filter.__super__.constructor.apply(this, arguments);
this._transform = __bind(this._transform, this);
_ref = Filter.__super__.constructor.apply(this, arguments);
return _ref;

@@ -22,3 +24,2 @@ }

var entry, message;
entry = JSON.parse(chunk.toString());

@@ -44,3 +45,12 @@ message = this.format(entry);

module.exports = {
Filter: Filter
Filter: Filter,
createFilter: function() {
var args;
args = 1 <= arguments.length ? __slice.call(arguments, 0) : [];
return (function(func, args, ctor) {
ctor.prototype = func.prototype;
var child = new ctor, result = func.apply(child, args);
return Object(result) === result ? result : child;
})(Filter, args, function(){});
}
};
{
"name": "caterpillar-filter",
"version": "2.0.1",
"description": "Filter out undesired log levels from your Caterpillar logger stream",
"homepage": "https://github.com/bevry/caterpillar-filter",
"keywords": [
"caterpillar", "caterpillar-transform",
"console", "log", "logger", "logging", "debug",
"stream", "transform",
"human", "readable"
],
"author": "Bevry Pty Ltd <us@bevry.me> (http://bevry.me)",
"maintainers": [
"Benjamin Lupton <b@lupton.cc> (https://github.com/balupton)"
],
"contributors": [
"Benjamin Lupton <b@lupton.cc> (https://github.com/balupton)"
],
"bugs": {
"url": "https://github.com/bevry/caterpillar-filter/issues"
},
"repository": {
"type": "git",
"url": "http://github.com/bevry/caterpillar-filter.git"
},
"engines": {
"node": ">=0.8"
},
"dependencies": {},
"peerDependencies": {
"caterpillar": "2.x"
},
"devDependencies": {
"readable-stream": "~1.0.2",
"caterpillar": "2.x",
"coffee-script": "~1.6.2",
"joe": "~1.2.0",
"joe-reporter-console": "~1.2.1",
"chai": "~1.5.0"
},
"directories": {
"lib": "./out/lib"
},
"scripts": {
"test": "node ./out/test/caterpillar-filter-test.js"
},
"main": "./out/lib/caterpillar-filter.js"
"title": "Filter Transform for [Caterpillar](https://github.com/bevry/caterpillar)",
"name": "caterpillar-filter",
"version": "2.0.2",
"description": "Filter out undesired log levels from your [Caterpillar](https://github.com/bevry/caterpillar) logger stream",
"homepage": "https://github.com/bevry/caterpillar-filter",
"keywords": [
"caterpillar",
"caterpillar-transform",
"console",
"log",
"logger",
"logging",
"debug",
"stream",
"transform",
"human",
"readable"
],
"author": "Bevry Pty Ltd <us@bevry.me> (http://bevry.me)",
"maintainers": [
"Benjamin Lupton <b@lupton.cc> (https://github.com/balupton)"
],
"contributors": [
"Benjamin Lupton <b@lupton.cc> (https://github.com/balupton)"
],
"bugs": {
"url": "https://github.com/bevry/caterpillar-filter/issues"
},
"repository": {
"type": "git",
"url": "http://github.com/bevry/caterpillar-filter.git"
},
"engines": {
"node": ">=0.8"
},
"dependencies": {},
"peerDependencies": {
"caterpillar": "2.x"
},
"devDependencies": {
"readable-stream": "~1.1.9",
"caterpillar": "2.x",
"coffee-script": "~1.6.2",
"joe": "~1.3.0",
"joe-reporter-console": "~1.2.1",
"chai": "~1.8.1"
},
"directories": {
"lib": "./out/lib"
},
"scripts": {
"test": "node ./out/test/caterpillar-filter-test.js"
},
"main": "./out/lib/caterpillar-filter.js",
"badges": {
"travis": true,
"npm": true,
"gittip": "bevry",
"flattr": "344188/balupton-on-Flattr",
"paypal": "QB8GQPZAH84N6"
},
"license": {
"type": "MIT"
}
}

@@ -0,24 +1,42 @@

<!-- TITLE/ -->
# Filter Transform for [Caterpillar](https://github.com/bevry/caterpillar)
[![Build Status](https://secure.travis-ci.org/bevry/caterpillar-filter.png?branch=master)](http://travis-ci.org/bevry/caterpillar-filter)
[![NPM version](https://badge.fury.io/js/caterpillar-filter.png)](https://npmjs.org/package/caterpillar-filter)
[![Flattr this project](https://raw.github.com/balupton/flattr-buttons/master/badge-89x18.gif)](http://flattr.com/thing/344188/balupton-on-Flattr)
<!-- /TITLE -->
<!-- BADGES/ -->
[![Build Status](http://img.shields.io/travis-ci/bevry/caterpillar-filter.png?branch=master)](http://travis-ci.org/bevry/caterpillar-filter "Check this project's build status on TravisCI")
[![NPM version](https://badge.fury.io/js/caterpillar-filter.png)](https://npmjs.org/package/caterpillar-filter "View this project on NPM")
[![Gittip donate button](http://img.shields.io/gittip/bevry.png)](https://www.gittip.com/bevry/ "Donate weekly to this project using Gittip")
[![Flattr donate button](https://raw.github.com/balupton/flattr-buttons/master/badge-89x18.gif)](http://flattr.com/thing/344188/balupton-on-Flattr "Donate monthly to this project using Flattr")
[![PayPayl donate button](https://www.paypalobjects.com/en_AU/i/btn/btn_donate_SM.gif)](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=QB8GQPZAH84N6 "Donate once-off to this project using Paypal")
<!-- /BADGES -->
<!-- DESCRIPTION/ -->
Filter out undesired log levels from your [Caterpillar](https://github.com/bevry/caterpillar) logger stream
<!-- /DESCRIPTION -->
<!-- INSTALL/ -->
## Install
### Backend
### [Node](http://nodejs.org/), [Browserify](http://browserify.org/)
- Use: `require('caterpillar-filter')`
- Install: `npm install --save caterpillar-filter`
1. [Install Node.js](http://bevry.me/node/install)
2. `npm install --save caterpillar-filter`
### [Ender](http://ender.jit.su/)
- Use: `require('caterpillar-filter')`
- Install: `ender add caterpillar-filter`
### Frontend
<!-- /INSTALL -->
1. [See Browserify](http://browserify.org/)
## Usage

@@ -64,11 +82,49 @@

<!-- HISTORY/ -->
## History
You can discover the history inside the [History.md](https://github.com/bevry/caterpillar-filter/blob/master/History.md#files) file
[Discover the change history by heading on over to the `History.md` file.](https://github.com/bevry/caterpillar-filter/blob/master/History.md#files)
<!-- /HISTORY -->
<!-- BACKERS/ -->
## Backers
### Maintainers
These amazing people are maintaining this project:
- Benjamin Lupton <b@lupton.cc> (https://github.com/balupton)
### Sponsors
No sponsors yet! Will you be the first?
[![Gittip donate button](http://img.shields.io/gittip/bevry.png)](https://www.gittip.com/bevry/ "Donate weekly to this project using Gittip")
[![Flattr donate button](https://raw.github.com/balupton/flattr-buttons/master/badge-89x18.gif)](http://flattr.com/thing/344188/balupton-on-Flattr "Donate monthly to this project using Flattr")
[![PayPayl donate button](https://www.paypalobjects.com/en_AU/i/btn/btn_donate_SM.gif)](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=QB8GQPZAH84N6 "Donate once-off to this project using Paypal")
### Contributors
These amazing people have contributed code to this project:
- Benjamin Lupton <b@lupton.cc> (https://github.com/balupton) - [view contributions](https://github.com/bevry/caterpillar-filter/commits?author=balupton)
[Become a contributor!](https://github.com/bevry/caterpillar-filter/blob/master/Contributing.md#files)
<!-- /BACKERS -->
<!-- LICENSE/ -->
## License
Licensed under the incredibly [permissive](http://en.wikipedia.org/wiki/Permissive_free_software_licence) [MIT License](http://creativecommons.org/licenses/MIT/)
<br/>Copyright &copy; 2012+ [Bevry Pty Ltd](http://bevry.me)
<br/>Copyright &copy; 2011 [Benjamin Lupton](http://balupton.com)
Licensed under the incredibly [permissive](http://en.wikipedia.org/wiki/Permissive_free_software_licence) [MIT license](http://creativecommons.org/licenses/MIT/)
Copyright &copy; Bevry Pty Ltd <us@bevry.me> (http://bevry.me)
<!-- /LICENSE -->
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