1.0.1 • Published 6 years ago

chansole v1.0.1

Weekly downloads
3
License
MIT
Repository
github
Last release
6 years ago

Chansole

Chansole is a module that allow you to use multiple instances of the Console.

Usage

Be aware that chansole works only in a browser

First, install chansole using npm or yarn:

npm install --save chansole

yarn add chansole

then import it and create your channels:

import channel from 'chansole';

const consoleA = channel('channelA');
const consoleB = channel('channelB');

consoleA.log('Hello, A');
consoleB.log('Hello, B');

channel method in the example returns the native browser's console instance, so you can use all features of its API

Browser settings

Google Chrome and Chromium

Open the DevTools Console Settings and check the Selected context only checkbox

Check "Selected context only" checkbox

Select a context

Select a context

Now you'll see messages in the selected context only

Profit

Mozilla Firefox

Open the DevTools Settings and check the Select an iframe as the currently targeted document checkbox

Check "Select an iframe as the currently targeted document" checkbox

Select a context

Select a context

License

MIT

1.0.1

6 years ago

1.0.0

6 years ago