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.
tv4-formats
Advanced tools
Common JSON Schema string format constraints in the form of tv4 validator callbacks
Provides the implementation of common JSON Schema string format constraints in the form of tv4 validator callbacks. Thus, it's a plug-in for tv4.
First, install it, together with tv4 itself, via Node.js'es npm into your project
$ npm install --save tv4 tv4-formats
Then, in the code
var tv4 = require('tv4'),
formats = require('tv4-formats'),
assert = require('assert'),
validator = tv4.freshApi(),
schema = {type: 'string', format: 'date'};
validator.addFormat(formats);
assert(validator.validate('2014-02-11', schema)); // Valid ISO 8601 date
assert(!validator.validate('2014-02-29', schema)); // Invalid. Only 28 days in this February
assert(!validator.validate('11.02.2014', schema)); // Invalid. Wrong date format
Here, the format: 'date'
part of the schema validation is provided by tv4-formats
package.
FAQs
Common JSON Schema string format constraints in the form of tv4 validator callbacks
The npm package tv4-formats receives a total of 5,595 weekly downloads. As such, tv4-formats popularity was classified as popular.
We found that tv4-formats 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.