
Security News
Node.js Drops Bug Bounty Rewards After Funding Dries Up
Node.js has paused its bug bounty program after funding ended, removing payouts for vulnerability reports but keeping its security process unchanged.
mcode-list
Advanced tools
Our List Processing functions. These support list of Objects--ints, string, JSON, any--that are ordered and related to other lists on the same topic. These can be used to swap one item in a list with its corresponding element in a realted list. This is si
A public NPM Package of our internal list processing tools for Frontend and Backend JavaScript NodeJS projects.
This is an extremely 'light weight' package with zero dependencies (other than our own logging package which has none).
Identical logging on both...
This is our own internal list processing (lisp) code. It is used to gain more flexibility than a standard 'Dictionary'. Building large, extensible applications it is inevitable that you will have to extend decision trees and data sets. Both of these can be defined as 'lists', lists that--when paired togther--make decisions, select data, execute functions, perform transforms, etc. Over time we have distilled this down to two (2) simple functions:
mcode.swap() - allows any 'list' to be used as 'keys' and any other list of the same size to be used as 'values'.
mcode.call() - allows any 'list' to be used as 'keys' to call a function in any other list of the same size.
To test, from the CLI in the package folder...
> node examples


When using list processing it's best to start with a good definition of the lists of objects your App will deal with.
USE CASE #1: Localization, or dynamic language switching. Where you can define lists for your UI to switch languages on-the-fly.
Then at runtime, you call...
...this is over simplified but you get the idea. Using techiques like these we produced the first Plant-Floor manufacturing application in General Motors that could literally toggle thru all supported languages as fast as you could hit the 'switch languages' key, including switching the language being used in the App Log files.
Adding a new language would involve:
NOTE: No code would need to be touched anywhere.
USE CASE #2: Move your code base to a data driven structure, one that is easily extended in the future without editing the code itself.
First step, remove all embedded if-then-else and switch-case logic from your App and externalize the lists that drive Application decisions.
if (key == key1)
{
value = value1;
}
else if (key == key2)
{
value = value2;
}
else if (key == key3)
{
value = value3;
}
...
switch key:
{
case key1:
value = value1;
break;
case key2:
value = value2;
break;
case key3:
value = value3;
break;
...
}
keys: { key1, key2, key3 };
values: { value1, value2, value3 };
...
value = mcode.swap(key, keys, values);
keys: { key1, key2, key3 };
functions: { func1, func2, func3 };
...
value = mcode.call(key, keys, functions);
partialkeys: { part1, part2, part3 };
functions: { func1, func2, func3 };
...
value = list.callif(key, partialkeys, values, (key, partialkey) => key.includes(partialkey));
keys: { key1, key2, key3 };
values: { value1, value2, value3 };
...
key = mcode.swap(value, values, keys);
partialkeys: { part1, part2, part3 };
values: { value1, value2, value3 };
...
value = list.swapif(key, partialkeys, values, (key, partialkey) => key.includes(partialkey));
Easier, clearer, concise, and extensible, and the lists can be externalized as JSON data.
npm install mcode-list
This package includes a simple demo module: examples.js. Running it directly will show you a set of examples for using swap() and call().
node .\node_modules\mcode-list\examples
...this will demonstrate thru console logging various uses of the mcode-list functions.
npm install --save-dev jest
npm test

These are the functions we want at the ready in any module for development and debug.
| Function | Description | Usage |
|---|---|---|
| swap | Swaps a 'key' found in a key list with a matching 'value' in value list | value = mcode.swap(key, keys, values, [args]) |
| swapif | Supports a custom function to select a partion 'key' match | value = mcode.swapif(key, keys, values, function, [args]) |
| call | Calls a function in a 'functions' list based on a 'key' found in a keys list | result = mcode.call(key, keys, functions, [args]) |
| callif | Supports a custom function to select a partion 'key' match | result = mcode.call(key, keys, functions, function, [args]) |
We believe is explicit code documentation, for other users, and for our 'future selves'.
JSDocs is a standardized system for documenting functions and data structures that produces three (3) primary outputs:
This entire project--like all our projects--is documented with JSDocs.
To install JSDocs use, get to a terminal session in the project folder...
npm install --save-dev jsdoc
jsdoc.json
jsdoc -c .jsdoc.json
...then open ./docs/index.html

Contact Timothy McGuire, support@mcode.com.
| Word or Acronym | Description/Definition |
|---|---|
| LISP | List Processing. |
| NPM | Node Package Manager, actually “Node PM”, “Node pkgmakeinst” a system to deploy, install, and maintain NodeJS Apps. (PM was a BASH utility). |
| NVM | Node Version Manager, a tool that supports changing NodeJS versions. |
| MERN | MongoDB, Express, React, Node JS. |
| MongoDB | A ‘NoSQL’ database designed for Cloud applications, also referred to as a ‘Document Store’. |
| Express | Express is not a database but rather an ‘extensible routing language’ for communication between a Client and a Server. |
| React | A Web UI development system, a JavaScript library developed by Facebook and made public—and Open Source—since 2013. |
| Node JS | A development stack that executes from a local file store—on a local Server—instead of from a network of servers. |
| JSDocs | A toolset to automatically generate API-style documentation from source code tagging. |
Contributor's names and contact info...
This project is licensed under the MIT License - see the LICENSE.md file for details
MicroCODE, Inc. was founded in 1987 as a controls engineering and software development company.
We specialize in manufacturing and quality control applications that must run 24x7x365 for years at a time.
Our slogan, distilled from over three decades of developing, testing, installing, and supporting 24x7x365 manufacturing applications, is..

FAQs
Our List Processing functions. These support list of Objects--ints, string, JSON, any--that are ordered and related to other lists on the same topic. These can be used to swap one item in a list with its corresponding element in a realted list. This is si
We found that mcode-list demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
Node.js has paused its bug bounty program after funding ended, removing payouts for vulnerability reports but keeping its security process unchanged.

Security News
The Axios compromise shows how time-dependent dependency resolution makes exposure harder to detect and contain.

Research
A supply chain attack on Axios introduced a malicious dependency, plain-crypto-js@4.2.1, published minutes earlier and absent from the project’s GitHub releases.