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

console-polyfill

Package Overview
Dependencies
Maintainers
1
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

console-polyfill - npm Package Compare versions

Comparing version 0.2.2 to 0.2.3

15

index.js

@@ -6,16 +6,15 @@ // Console-polyfill. MIT license.

'use strict';
global.console = global.console || {};
if (!global.console) {
global.console = {};
}
var con = global.console;
var prop, method;
var empty = {};
var dummy = function() {};
var properties = 'memory'.split(',');
var properties = ['memory'];
var methods = ('assert,clear,count,debug,dir,dirxml,error,exception,group,' +
'groupCollapsed,groupEnd,info,log,markTimeline,profile,profiles,profileEnd,' +
'show,table,time,timeEnd,timeline,timelineEnd,timeStamp,trace,warn').split(',');
while (prop = properties.pop()) if (!con[prop]) con[prop] = empty;
while (method = methods.pop()) if (!con[method]) con[method] = dummy;
while (prop = properties.pop()) if (!con[prop]) con[prop] = {};
while (method = methods.pop()) if (typeof con[method] !== 'function') con[method] = dummy;
// Using `this` for web workers & supports Browserify / Webpack.
})(typeof window === 'undefined' ? this : window);
// Using `this` for web workers while maintaining compatibility with browser
// targeted script loaders such as Browserify or Webpack where the only way to
// get to the global object is via `window`.
{
"name": "console-polyfill",
"version": "0.2.2",
"version": "0.2.3",
"description": "Browser console polyfill. Makes it safe to do console.log()-s etc always.",
"main": "index.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
},
"files": ["index.js"],
"repository": {

@@ -10,0 +8,0 @@ "type": "git",

# console-polyfill
Browser console polyfill. Makes it safe to do console.log()-s etc always.
Browser console polyfill. Makes it safe to do `console.log()`-s etc always.
## Installation
* Just include console-polyfill before your scripts.
* `component install paulmillr/console-polyfill` if you’re using [component(1)](https://github.com/component/component).
* `bower install console-polyfill` if you’re using [Twitter Bower](http://bower.io).
## Usage
* `npm install --save console-polyfill`; `require('console-polyfill')`
* Or, just include console-polyfill before your scripts.
* Or, do `bower install console-polyfill` if you’re using [Bower](http://bower.io).
## License
The MIT License (MIT)
Copyright (c) 2013 Paul Miller (http://paulmillr.com/)
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:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
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.
[MIT](https://github.com/paulmillr/mit) (c) 2016 Paul Miller (http://paulmillr.com)
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