PHP 8.2.30
Preview: index.js Size: 554 B
/opt/alt/alt-nodejs6/root/lib/node_modules/npm/node_modules/request/node_modules/har-validator/lib/index.js

'use strict'

var Promise = require('pinkie-promise')
var runner = require('./runner')
var schemas = require('./schemas')

var promisify = function (schema) {
  return function (data) {
    return new Promise(function (resolve, reject) {
      runner(schema, data, function (err, valid) {
        return err === null ? resolve(data) : reject(err)
      })
    })
  }
}

module.exports = promisify(schemas.har)

// utility methods for all parts of the schema
Object.keys(schemas).map(function (name) {
  module.exports[name] = promisify(schemas[name])
})

Directory Contents

Dirs: 1 × Files: 4

Name Size Perms Modified Actions
schemas DIR
- drwxr-xr-x 2024-03-03 22:41:43
Edit Download
304 B lrw-r--r-- 2021-09-28 09:36:06
Edit Download
186 B lrw-r--r-- 2021-09-28 09:36:06
Edit Download
554 B lrw-r--r-- 2021-09-28 09:36:06
Edit Download
590 B lrw-r--r-- 2021-09-28 09:36:06
Edit Download

If ZipArchive is unavailable, a .tar will be created (no compression).