mcode-package

Our open-source building blocks for JavaScript apps, published on npm. Each package can be used on its own, or install 'mcode-package' to collect them all into a single 'mcode.' namespace: mcode.log(), mcode.swap(), mcode.isJson(), and more, as if they came from one package.


  • Since: 2024
  • Category: Bundle
  • License: MIT
  • Runs: Frontend & Backend
npm GitHub

mcode-log

Replaces console.log() with mcode.log(), mcode.warn(), mcode.error(), mcode.exp(), and others that have severity built into the call. Every event is time-stamped, tagged with its source module, and colorized, objects are shown as pure data, and exceptions include a stack dump or trace, in the Browser console or on the Server.


  • Since: 2024
  • Category: Logging
  • License: MIT
  • Runs: Frontend & Backend
npm GitHub

mcode-data

Consistent data handling for large, extensible apps: type checking and type coercion for strings, numbers, JSON, HTML, dates, and time stamps, plus safe nested properties, defaults, ID generation, encoding, case conversion, and HTTP status helpers. No dependencies.


  • Since: 2024
  • Category: Data Types
  • License: MIT
  • Runs: Frontend & Backend
npm GitHub

mcode-list

List processing that is more flexible than a standard Dictionary. mcode.swap() uses any list as 'keys' and any other list of the same size as 'values', and mcode.call() uses a key to call a function from a list. Lists work in either direction and replace long switch statements with data.


  • Since: 2024
  • Category: List Processing
  • License: MIT
  • Runs: Frontend & Backend
npm GitHub

mcode-cache

Namespaced Node.js and Redis caching with consistent key construction for files, data structures, and app values. Typed values, transactions, geo and sorted sets, and pub/sub, with in-memory or Redis namespaces side by side.


  • Since: 2024
  • Category: Caching
  • License: MIT
  • Runs: Node.js & Redis
npm GitHub

Code like a Machine

Every package follows our MicroCODE coding style: consistent, explicit, simple, and readable. Each one is documented with JSDoc, tested with Jest, and used every day in our own apps. Get them all with one command:

npm install mcode-package

visit our GitHub