
Security News
/Research
Popular node-ipc npm Package Infected with Credential Stealer
Socket detected malicious node-ipc versions with obfuscated stealer/backdoor behavior in a developing npm supply chain attack.
@inf3rno/appendable-json
Advanced tools
By storing the following variable:
const example = [
123,
"Lorem,\nipsum."
];
I started with a JSON array.
[123,"Lorem,\nipsum."]
Our main problem with the JSON format, that the square brackets make it hard to append without parsing. So I removed the square brackets.
123,"Lorem,\nipsum."
This is not bad, we could append it by adding ,"next", but I don't like that the first item is different, so I added comma at the end.
123,"Lorem,\nipsum.",
Now if we want to parse only the second item, then we have a problem to find it without parsing the whole string, because the lorem ipsum string contains a comma.
I added a line break after the separator comma to solve this. Since the compact JSON coming from JSON.stringify does not contain any line break, this should suffice.
123,
"Lorem,\nipsum.",
I like this format, because it is easy to parse and build and it is great for logging or for file based event storages.
installation
npm install @inf3rno/appendable-json
usage
const aJSON = require("@inf3rno/appendable-json");
serialization
const string = aJSON.stringify([{a:1},{b:2},{c:3}]);
const appended = string + aJSON.stringify([{d:4},{e:5}]);
unserialization
const array = aJSON.parse(string);
FAQs
Appendable JSON based format
The npm package @inf3rno/appendable-json receives a total of 10 weekly downloads. As such, @inf3rno/appendable-json popularity was classified as not popular.
We found that @inf3rno/appendable-json demonstrated a not healthy version release cadence and project activity because the last version was released 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
/Research
Socket detected malicious node-ipc versions with obfuscated stealer/backdoor behavior in a developing npm supply chain attack.

Security News
TeamPCP and BreachForums are promoting a Shai-Hulud supply chain attack contest with a $1,000 prize for the biggest package compromise.

Security News
Packagist urges PHP projects to update Composer after a GitHub token format change exposed some GitHub Actions tokens in CI logs.