
Security News
Another Round of TEA Protocol Spam Floods npm, But It’s Not a Worm
Recent coverage mislabels the latest TEA protocol spam as a worm. Here’s what’s actually happening.
@aladas-org/json-preprocessor
Advanced tools
This is a JSON Preprocessor designed initially to work in tandem with @aladas-org/P5-patterns
but it should be usable with other projects. By design the input of this Preprocessor is fully compatible with regular JSON.
The advantage is to preserve the benefit of tools like JSON validators
, on the other hand there is no possibility of Traditional preprocessor directives such as Comments
(except maybe a trick like { "// Sample comment": "" }, taking care to not reuse the same key which is indeed a distortion).
0.0.5
Update of comments header in json_preprocessor.js3.1. Install NodeJS from https://nodejs.org/en
3.2. Open a Command Line interpreter (CLI)
cmd.exe in the Search field3.3. Import json-preprocessor repository
git clone https://github.com/ALADAS-org/json-preprocessor.git3.4. Download the prerequisites (Express.js)
npm install3.5. Start local Http server
run.bathttp://127.0.0.1:8080/public folder3.6. Launch Demo
demo shortcuthttp://127.0.0.1:8080/) which opens the index.html under public folderDevTools (browser's inspector): to display it, use CTRL SHIFT i shortcut.4.1. @include directive
include file (e.g. public\includes\color_palette_basic.json)@constants directive then define elements within @constants
which is an Array of Key/Value pairs (name and value are the required Key/Value field names)"@constants": [ { "name": "red", "value": "#ff0000" }, ... ]
@include directive (and provide the src key to locate the path to the include file),$ (e.g. $red){
"name": "Inclusion test",
"description": "inclusion test for color_palette",
"@include": { "src": "./includes/color_palette_basic.json", "type": "COLOR_PALETTE" },
"Shapes": { "0": { "bgColor": "$red" }, ... }
}
$red) replaced by their Value (eg. #ff0000){ ...
"Shapes": { "0": { "bgColor": "#ff0000" }, ... }
}
JsonPP class
5.1.1. JsonPP.Run()
JsonPP API. See example in public\demo.js (loaded by index.html)let url = "http://127.0.0.1:8080/include_test.json";
let json_data = await fetch( url ).then(res => res.json());
console.log(" >> -------- BEFORE Preprocessing --------");
console.log(JSON.stringify(json_data));
// 'JsonPP' class is provided in `public\src\json_preprocessor.js`
// and in `dist\json_preprocessor.js` for distribution purpose
let json_data_pp = await JsonPP.Run(json_data);
console.log(" >> -------- AFTER Preprocessing --------");
console.log(JSON.stringify(json_data_pp));
FAQs
JSON preprocessor
We found that @aladas-org/json-preprocessor demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 2 open source maintainers 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
Recent coverage mislabels the latest TEA protocol spam as a worm. Here’s what’s actually happening.

Security News
PyPI adds Trusted Publishing support for GitLab Self-Managed as adoption reaches 25% of uploads

Research
/Security News
A malicious Chrome extension posing as an Ethereum wallet steals seed phrases by encoding them into Sui transactions, enabling full wallet takeover.