
Research
Namastex.ai npm Packages Hit with TeamPCP-Style CanisterWorm Malware
Malicious Namastex.ai npm packages appear to replicate TeamPCP-style Canister Worm tradecraft, including exfiltration and self-propagation.
hocon-parser
Advanced tools
This is a very basic [Hocon](https://github.com/typesafehub/config/blob/master/HOCON.md) parser written in JavaScript.
This is a very basic Hocon parser written in JavaScript.
It does almost no validation whatsoever but can create an object from most hocon files.
Please feel free to contribute with PRs.
This module is intended to work in the browser and nodejs.
Browser usage :
<script type="text/javascript" src="/node_modules/hocon-parser/hocon.min.js"></script>
<script type="text/javascript">
var obj = parseHocon(someHoconText);
</script>
NodeJS :
var parseHocon = require('hocon-parser');
var obj = parseHocon(someHoconText);
npm install hocon-parsernpm testnpm run releaseInput Hocon string:
myConfig.cool.numb: 5
myConfig.cool.stuff: {
x : quotesarebadmmkay
z : {
yes: 'no not really'
}
}
myConfig.cool.stuff { z { no='yes yes really' } }
myConfig.dupe: ${myConfig.cool.stuff.x}
meinarr [2,3, {x:haha}]
meinobj {hocon: issoweirdman}
notherobj : ${meinobj.hocon}
Output object:
{
"myConfig": {
"cool": {
"numb": 5,
"stuff": {
"x": "quotesarebadmmkay",
"z": {
"yes": "no not really",
"no": "yes yes really"
}
}
},
"dupe": "quotesarebadmmkay"
},
"meinarr": [2, 3, {
"x": "haha"
}],
"meinobj": {
"hocon": "issoweirdman"
},
"notherobj": "issoweirdman"
}
| Feature | Completion | Example |
|---|---|---|
| Objects | :white_check_mark: | myKey { myOtherKey: 'myValue' } |
| Arrays | :white_check_mark: | myKey [1,2,3,4] |
| Comments | :white_check_mark: | // some comment # some comment |
= and : Separators | :white_check_mark: | myKey='myValue' |
| Unquoted Strings | :white_check_mark: | myKey: myString |
Multiline Strings (""") | :white_check_mark: | myKey: """what's happening""" |
| Path Expressions | :white_check_mark: | myRoot.myKey.someKey : 4 |
| Substitutions | :white_check_mark: | myKey: $(myRoot.myKey) |
| String Concatenation in Arrays | :white_check_mark: | myArr: [hello there] |
| Objects Merging | :x: | |
| Value Concatenation | :x: | |
include | :x: |
FAQs
This is a very basic [Hocon](https://github.com/typesafehub/config/blob/master/HOCON.md) parser written in JavaScript.
The npm package hocon-parser receives a total of 2,083 weekly downloads. As such, hocon-parser popularity was classified as popular.
We found that hocon-parser 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.

Research
Malicious Namastex.ai npm packages appear to replicate TeamPCP-style Canister Worm tradecraft, including exfiltration and self-propagation.

Product
Explore exportable charts for vulnerabilities, dependencies, and usage with Reports, Socket’s new extensible reporting framework.

Product
Socket for Jira lets teams turn alerts into Jira tickets with manual creation, automated ticketing rules, and two-way sync.