HackerReposA FIELD GUIDE TO OPEN SOURCE
ProSponsor the shelf♧ 0
← Back to top all-time
sindresorhus
globals
JavaScript2016–2019
sindresorhus / globals

globals

Global identifiers from different JavaScript environments

2Distinct people
2Mentions
0Explicit recommenders
617GitHub stars
REPOSITORY AT A GLANCE

What to know before exploring

What it is

Global identifiers from different JavaScript environments

GitHub

Where it is used

No documented product use has been verified yet.

What people are saying

No recommendation phrase was found in the indexed comments.

No classified warning is attached to this page. Read the discussions before treating silence as approval.

Also in these discussions

No other repository is repeatedly linked in the same discussions.

This week on Hacker News

Nov 7–Nov 14 UTC · Direct repository links and separately labeled related project stories. Indexed through 11/14/2026, 3:56:07 PM UTC.

No direct repository links were found in the indexed HN discussions over the past seven days. Older discussions are available below.

Mentions over time

HN mentions by year2 dated mentions

Observed mentions: 2016-03-24 20:32:27 UTC to 2019-05-13 03:42:02 UTC.

012016-01-01 00:00:00 UTC to 2017-01-01 00:00:00 UTC (exclusive): 1 mentions; 0 submissions, 1 comments20162017-01-01 00:00:00 UTC to 2018-01-01 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments20172018-01-01 00:00:00 UTC to 2019-01-01 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2019-01-01 00:00:00 UTC to 2020-01-01 00:00:00 UTC (exclusive): 1 mentions; 0 submissions, 1 comments2019

Counts come from the repository’s dated source evidence. Index cutoff: 2026-11-02 08:16:59 UTC.

View mention counts and date ranges
UTC ranges include their start and exclude their end. Select a period to filter the source evidence.
PeriodStart (UTC)End (exclusive, UTC)MentionsSubmissionsComments
20162016-01-01 00:00:00 UTC2017-01-01 00:00:00 UTC101
20172017-01-01 00:00:00 UTC2018-01-01 00:00:00 UTC000
20182018-01-01 00:00:00 UTC2019-01-01 00:00:00 UTC000
20192019-01-01 00:00:00 UTC2020-01-01 00:00:00 UTC101

What Hacker News says

2 sources
Thanks for the new method! In fengari we currently use https://github.com/fengari-lua/fengari-interop/blob/8e59efb7... const global_env = (function() { /* global WorkerGlobalScope */ /* see https://github.com/sindresorhus/globals/issues/127 */ if (typeof process !== "undefined") { /* node */ return global; } else if (typeof window !== "undefined") { /* browser window */ return window; } else if (typeof WorkerGlobalScope !== 'undefined' && self instanceof WorkerGlobalScope) { /* web worker */ return self; } else { /* unknown global env */ return (0, eval)('this'); /* use non-strict mode to get global env */ } })(); I created https://github.com/fengari-lua/fengari-interop/issues/45 to track
Read the rest
.
In A horrifying globalThis polyfill in JavaScript
Read the rest
ndex.... https://github.com/sindresorhus/file-url/blob/master/index.j... https://github.com/sindresorhus/fix-path/blob/master/index.j... https://github.com/sindresorhus/fn-args/blob/master/index.js https://github.com/sindresorhus/fn-name/blob/master/index.js https://github.com/sindresorhus/globals/blob/master/index.js https://github.com/sindresorhus/imul/blob/master/index.js https://github.com/sindresorhus/is-text-path/blob/master/ind... https://github.com/sindresorhus/is-up/blob/master/index.js https://github.com/sindresorhus/is-travis/blob/master/index.... https://github.com/sindresorhus/is-video/blob/master/index.j... https://github.com/sindresorhus/is-webp/blob/master/index.js https://github.com/sindresorhus/is-archive/blob/master/index... https://github.com/sindresorhus/is-admin/blob/master/index.j... https://github.com/sindresorhus/is-absolute-url/blob/master/... https://github.com/sindresorhus/ipify/blob/master/index.js https://github.com/sindresorhus/is-url-superb/blob/master/in... https://github.com/sindresorhus/is-tif/blob/master/index.js https://github.com/datetime/leap-year/blob/master/index.js https://github.com/sindresorhus/lpad/blob/master/index.js https://github.com/sindresorhus/md5-hex/blob/master/index.js And I ran out of willpower, at only L. Seems to me the complete lack of any decent standard library has caused this Cambrian explosion of packages, and the overhead is astounding. Sure it's appealing to google "nodejs validate ip", then run "npm install is-ip" and use it with "require('is-ip')", but fuck me how wasteful do you want to be. My frontend ember app ends up installing over 500mb of dependencies (most of which is useless test files and other redundant fluff files). How has this happened? What's to stop one of those one line packages adding a malicious one liner that concatenates and uploads your super-secret private source code to somebodies server? You're really trusting the complete integrity of your codebase because you depend on "is-array", because you can't be bothered to write "x.toString() === '[object Array]'", and JS introspection (which seems so (ab)used) is so broken that this is needed? Woah.
In Micropackages and Open Source Trust Scaling

MAKE YOURSELF AT HOME

A few shortcuts

/
Search the collection
?
Open this guide
Esc
Close dialogs and navigation

Your saved repositories and interests stay in this browser.