core-js is a modular JavaScript standard library and polyfill system, not an end-user application. In production it supplies spec-compliant implementations of ECMAScript features, TC39 proposals, and selected web platform APIs for environments that lack native support. Its primary runtime behavior is side-effectful import: consumers load entry points such as `core-js`, `core-js/actual`, `core-js/full`, `core-js/es`, or granular per-feature modules, and the library either patches built-in constructors/prototypes or, in the `core-js-pure` variant, exports standalone implementations without global pollution. The architecture is a monorepo of packages: `core-js` (global polyfills), `core-js-pure` (pollution-free), `core-js-bundle` (prebuilt bundle), `core-js-compat` (compatibility data and module-selection engine), and `core-js-builder` (custom bundle generator). The implementation is split into thousands of tiny modules under `packages/core-js/modules/`, backed by a shared `internals/` layer that provides low-level spec operations, feature detection, environment/bug detection, iterator construction, collection internals, and export plumbing. Polyfill activation is decided by a `$({ target, stat, proto, forced }, ...)` export contract plus per-module `FORCED` flags derived from runtime probes and engine-version checks. Entry-point tiers (`es`, `stable`, `actual`, `full`, `stage`, `proposals`) map to spec maturity levels. Its primary data flow is configuration-driven: a consumer chooses an import path or, through Babel/swc integration, a set of target environments; `core-js-compat` converts targets into the minimum required module set; and `core-js-builder` can produce a custom bundle. The library itself depends on very few runtime dependencies; Babel, webpack, QUnit, Karma, and a matrix of JS engines are used for building, bundling, and testing. The codebase is unusually rigorous about spec conformance, including engine-specific bug workarounds and dual global/pure test suites. It is effectively the reference polyfill engine behind Babel's `useBuiltIns` and is highly study-worthy for anyone implementing low-level JavaScript compatibility layers.
This library provides a polyfill/shim for the IndexedDB API, implementing IndexedDB functionality using WebSQL as a backend storage mechanism. It works in both browser environments (leveraging native WebSQL where available) and Node.js (via websql-configurable/SQLite3). The library offers both invasive (automatically setting global indexedDB) and non-invasive (requiring explicit setup) versions. It implements the full IndexedDB specification including databases, object stores, indexes, transactions, and cursors, with proper handling of JavaScript value serialization through a structured cloning algorithm. The project features comprehensive test suites validating W3C compliance and active maintenance with regular updates to address compatibility issues and specification changes.
lodash is a widely-used JavaScript utility library providing a consistent API for manipulating arrays, objects, strings, numbers, and functions. It offers a monolithic UMD build, per-method modular packages, and a functional programming variant (lodash/fp) with auto-curried iteratee-first data-last methods. The library is feature-complete and actively maintained, though its build tooling ([email protected], [email protected], jscs) is outdated and targets ES5. It is not an application but a reusable library, with entry points in lodash.js and lodash/fp. The codebase demonstrates clean abstractions and extensive internal reuse, but internal modules like the FP conversion engine are tightly coupled.
This repository provides a WebCrypto API polyfill for Node.js, implementing the W3C Web Cryptography API using Node's native crypto module. It supports a comprehensive set of algorithms including AES (CBC, CTR, GCM, ECB, KW, CMAC), DES (CBC, EDE3-CBC), RSA (SSA, PSS, OAEP, ES), ECDSA, ECDH, EdDSA, ECDH-ES, Ed25519, X25519, HMAC, PBKDF2, HKDF, SHA-1/256/384/512, SHA3-256/384/512, and SHAKE128/256. The architecture follows a provider pattern where each algorithm is implemented as a separate class extending a base provider from the 'webcrypto-core' library. Key management is handled through internal CryptoKey classes with serialization support for JWK, raw, PKCS8, and SPKI formats. The library is designed as a drop-in replacement for the browser's crypto.subtle API, enabling isomorphic JavaScript cryptography.
This repository is a JavaScript library providing a BroadcastChannel polyfill with leader election capabilities. It enables cross-tab/window/node-process communication through multiple fallback mechanisms (native BroadcastChannel, IndexedDB, localStorage, Node.js sockets, and a simulate method). The library implements leader election algorithms to coordinate multiple instances, ensuring only one acts as leader at a time. It supports diverse environments including old browsers, modern browsers, WebWorkers, Node.js, Deno, and iframes. The architecture centers around a core BroadcastChannel class with pluggable method implementations, a method chooser for fallback selection, and separate leader election utilities. Key entry points are the exported BroadcastChannel class and createLeaderElection function from src/index.js.
This repository is a PHP 5.x polyfill library that provides implementations of the `random_bytes()` and `random_int()` cryptographic functions introduced in PHP 7. The library implements a fallback chain of secure random sources: libsodium extension, /dev/urandom (Unix), mcrypt_create_iv(), and CAPICOM (Windows). It throws exceptions when no secure random source is available rather than falling back to insecure alternatives. The library features modular implementation with separate files for each random source, along with utility functions for mbstring.func_overload-safe string operations and safe integer casting. It includes comprehensive unit tests and maintains compatibility with PHP versions from 5.2 through current versions by disabling itself on PHP 7.0+.