
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.
Use dot path notation to find diffs, map paths, and set or extract values in JSON-serializable inputs.
Use dot path notation to find diffs, map paths, and set or extract values in JSON-serializable inputs.
npm install dottpath
# or
yarn add dottpath
const dottpath = require("dottpath"); // commonjs
// or
import dottpath from "dottpath"; // esm
Generate a flat array of all dot paths in an input.
dottpath.map({ a: 1, b: { c: 2 } }); // ["a", "b.c"]
dottpath.map({ a: [1, 2] }); // ["a.0", "a.1"]
dottpath.map([1, [2, 3]]); // ["0", "1.0", "1.1"]
dottpath.map({}); // []
Extract values from an input using dot path notation.
dottpath.extract({ a: { b: 1 } }, "a.b"); // 1
dottpath.extract({ a: 1, b: 2 }, ["a", "b"]); // [1, 2]
dottpath.extract({ a: 1, b: 2 }, { x: "a", y: "b" }); // { x: 1, y: 2 }
dottpath.extract({ a: { b: 1 } }, "a.c"); // undefined
Set values at specified dot paths in an input.
dottpath.set({ a: 1, b: { c: 2 } }, { "b.c": 99 }); // { a: 1, b: { c: 99 } }
dottpath.set({ a: 1, b: { c: 2 } }, { a: 0 }); // { a: 0, b: { c: 2 } }
dottpath.set([1, [2, 3]], { "1.0": 99 }); // [1, [99, 3]]
dottpath.set({ a: 1 }, {}); // { a: 1 }
Find differences between two JSON-serializable inputs.
dottpath.diffs({ a: 1 }, { a: 2 });
// [{ path: "a", valueA: 1, valueB: 2, state: "value changed", change: 1, timestamp: ... }]
dottpath.diffs({ a: 1, b: 2 }, { a: 1 });
// [{ path: "b", valueA: 2, valueB: undefined, state: "property removed", timestamp: ... }]
dottpath.diffs({ a: 1 }, { a: 1, b: 2 });
// [{ path: "b", valueA: undefined, valueB: 2, state: "property added", timestamp: ... }]
dottpath.diffs({ a: 1 }, { a: 2 }, ["a"]); // excludes path "a"
// []
| Property | Type | Description |
|---|---|---|
path | string | Dot path of the changed value |
valueA | unknown | Value from the first input |
valueB | unknown | Value from the second input |
state | "value changed" | "property added" | "property removed" | Type of change |
change | number | Numeric or timestamp delta (only for numeric or date values) |
timestamp | number | Unix timestamp of when the diff was computed |
MIT
FAQs
Use dot path notation to find diffs, map paths, and set or extract values in JSON-serializable inputs.
The npm package dottpath receives a total of 94 weekly downloads. As such, dottpath popularity was classified as not popular.
We found that dottpath 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.

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.