Research
Security News
Threat Actor Exposes Playbook for Exploiting npm to Build Blockchain-Powered Botnets
A threat actor's playbook for exploiting the npm ecosystem was exposed on the dark web, detailing how to build a blockchain-powered botnet.
ddl-json-schema
Advanced tools
JSON Schema for the W3C Customer Experience Digital Data Layer.
The W3C Customer Experience Digital Data Layer is a specification that describes a method for exposing customer data through a global JavaScript object in a consistent manner that can be consumed by multiple vendors.
If you are building a service that consumes the contents of the Digital Data Layer you may want to validate the data coming in and verify that it conforms to the expected format.
If you are building an ecommerce website that exposes the Digital Data Layer, you might have a test suite where you verify that the data you are exposing conforms to the expected format.
npm install ddl-json-schema
var schema = require("ddl-json-schema");
schema.root;
// this is a schema defines the entire digitalData object
schema.attributes;
// this schema describes a valid attributes object
schema.security;
// this schema describes a valid security object or string
schema.category;
// this schema describes a valid category object
schema.product;
// this schema describes a valid product object
schema.price;
// this schema describes a valid price object
schema.address;
// this schema describes a valid address object
schema.date;
// this schema describes a valid date string
In version 2.0.0 there is an API change in terms of what is exported as the module. Instead of exporting the overall digitalData schema as the default export, we now export schemas for a number of W3C Customer Experience Digital Data Layer components. This is meant to enable more granular validation, for instance if your api only receives a product object (or array) rather than the entire digitalData object, and you still want to validate these objects against the specification.
The window.digitalData
object may be extended in many ways. The objects in the specification are not required to be present, but if they are used they must adhere to the specified property names and types. On the global object the following names are reserved properties on the digitalData
object: pageInstanceID
, page
, product
, cart
, transaction
, event
, component
, user
, privacy
, version
.
Reserved property | Type | Specification |
---|---|---|
pageInstanceID | string | |
page | object | specification |
product | array | specification |
cart | object | specification |
transaction | object | specification |
event | array | specification |
component | array | specification |
user | array | specification |
privacy | object | specification |
version | string |
Project logo created by Valeriy from the Noun Project.
FAQs
JSON Schema for the W3C Customer Experience Digital Data Layer
The npm package ddl-json-schema receives a total of 0 weekly downloads. As such, ddl-json-schema popularity was classified as not popular.
We found that ddl-json-schema 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
Security News
A threat actor's playbook for exploiting the npm ecosystem was exposed on the dark web, detailing how to build a blockchain-powered botnet.
Security News
NVD’s backlog surpasses 20,000 CVEs as analysis slows and NIST announces new system updates to address ongoing delays.
Security News
Research
A malicious npm package disguised as a WhatsApp client is exploiting authentication flows with a remote kill switch to exfiltrate data and destroy files.