
Research
Malicious npm Packages Impersonate Flashbots SDKs, Targeting Ethereum Wallet Credentials
Four npm packages disguised as cryptographic tools steal developer credentials and send them to attacker-controlled Telegram infrastructure.
datapackage-validate
Advanced tools
Validate Data Package datapackage.json files.
npm install datapackage-validate
Following assume you've imported the module as follows:
var validator = require('datapackage-validate');
Validate the provided object or string as a Data Package.
validator.validate(raw, schema)
raw
: datapackage.json string or object to validate (note method will
take care of parsing the string and checking it is valid JSON if it is not
parsed already)schema
: A schema to validate raw
against, or, a string that is the unique identifier for a schema in the Data Package Registry, which is used to retrieve the matching schemaNote the method is asynchronous and returns a Promise (implemented with bluebird). The Promise resolves with following structure:
{
valid: true | false,
errors: [
{
// every error has a message
message: 'Invalid JSON: ...'
// JSON errors come from json-lint and will also have
line:
},
{
message: 'Array is too short (0), minimum 1',
// schema errors come from schema validator and include additiona
// path in input JSON
dataPath: '/resources',
// path in schema
schemaPath: '/properties/resources/minItems',
},
...
]
warnings: [
{
message: 'No title field'
},
...
]
};
FAQs
Validate Data Packages
The npm package datapackage-validate receives a total of 2 weekly downloads. As such, datapackage-validate popularity was classified as not popular.
We found that datapackage-validate demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 4 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.
Research
Four npm packages disguised as cryptographic tools steal developer credentials and send them to attacker-controlled Telegram infrastructure.
Security News
Ruby maintainers from Bundler and rbenv teams are building rv to bring Python uv's speed and unified tooling approach to Ruby development.
Security News
Following last week’s supply chain attack, Nx published findings on the GitHub Actions exploit and moved npm publishing to Trusted Publishers.