question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Use "tmi" instead of "irc" as browser global (breaking change)

See original GitHub issue

Using “tmi” or “tmijs” would make more sense and be more clear in the browser as a global and in the documentation for other platforms like NodeJS.

Seeing:

var irc = require('tmi.js');

… irks me because every other module I use, I use either the name of the module or in some cases, a specific character (typically related in a visual context and/or popularized by the authors and users). It would also be better for avoiding clashing with some other library that might be loaded.

Examples:

var request = require('request'); // Exact

var bodyParser = require('body-parser'); // Camel-cased

var _ = require('lodash'); // Visual representation by symbol (a low dash) and popularization of a symbol

var jQuery = $ = require('jquery'); // Popularization of a symbol

Suggestions:

// Browser
var client = new tmi.client(/*...*/);
var client = new tmijs.client(/*...*/);
// Nodejs
var tmi = require('tmi.js'),
    client = new tmi.client(/*...*/);

var tmijs = require('tmi.js'),
    client = new tmijs.client(/*...*/);

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Reactions:3
  • Comments:8 (8 by maintainers)

github_iconTop GitHub Comments

2reactions
Schmoopiiecommented, Apr 14, 2016

Totally agree with this, we could actually keep the old one for a while and provide a deprecation notice, that way it won’t be a breaking change.

0reactions
ben-ebcommented, Apr 14, 2016

I guess it isn’t really a big deal.

Read more comments on GitHub >

github_iconTop Results From Across the Web

tmi.js - Bountysource
As announced months before, Twitch now identifies users by a unique ID instead of their name. Today, Twitch decided to make a breaking...
Read more >
Cannot use amplify-js in browser environment (breaking vite ...
I believe your issue is related to the AWS SDK instead of Amplify JS. Can you confirm?
Read more >
Untitled
Inner and outer planets diagram, Dirgantara flight training center, Modifikasi yamaha r15 biru, 5 worst ways to break up, Idp global apply online, ......
Read more >
PlM - River Thames Conditions - Environment Agency - GOV.UK
#jokerman Sabadell pisos, Wfdf ultimate, Dora explorer cake, Covergirl trublend ... Breaking news now world, Allred romney gag order, Redova instrumento, ...
Read more >
How to Polyfill node core modules in webpack 5
BREAKING CHANGE : webpack < 5 used to include polyfills for node.js core modules by default. This is no longer the case. Verify...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found