How to use the tv4.tv4 function in tv4

To help you get started, we’ve selected a few tv4 examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github codecombat / aether / lib / validators / options.js View on Github external
(function() {
  var tv4;

  tv4 = require('tv4').tv4;

  module.exports = function(options) {
    return tv4.validateMultiple(options, {
      "type": "object",
      additionalProperties: false,
      properties: {
        thisValue: {
          required: false
        },
        global: {
          type: 'array',
          required: false
        },
        functionName: {
          required: false
        },
github DefinitelyTyped / tsd / build / tsd.js View on Github external
(function (tsd) {
    var fs = require('fs');
    var path = require('path');
    var util = require('util');
    var assert = require('assert');
    var tv4 = require('tv4').tv4;
    var Installed = (function () {
        function Installed(selector, commit, hash) {
            if (typeof selector === "undefined") { selector = null; }
            if (typeof commit === "undefined") { commit = null; }
            if (typeof hash === "undefined") { hash = null; }
            this.selector = selector;
            this.commit = commit;
            this.hash = hash;
        }
        Installed.prototype.toString = function () {
            return this.selector;
        };
        return Installed;
    })();
    tsd.Installed = Installed;    
    var Config = (function () {
github DefinitelyTyped / tsd / deploy / source.js View on Github external
function Config() {
        this.version = "v3";
        this.dependencies = {
        };
        this.tv4 = require('tv4').tv4;
        this.schema = JSON.parse(System.IO.FileManager.handle.readFile(Config.SCHEMA_PATH));
    }
    Config.FILE_NAME = 'tsd-config.json';
github DefinitelyTyped / tsd / build / tsd.js View on Github external
(function (tsd) {
    var fs = require('fs');
    var path = require('path');
    var util = require('util');
    var assert = require('assert');
    var mkdirp = require('mkdirp');
    var tv4 = require('tv4').tv4;
    var Context = (function () {
        function Context(configPath, verbose) {
            if (typeof configPath === "undefined") { configPath = null; }
            if (typeof verbose === "undefined") { verbose = false; }
            this.verbose = verbose;
            this.log = xm.getLogger();
            this.packageInfo = tsd.PackageJSON.getLocal();
            this.paths = new tsd.Paths(this.packageInfo);
            this.config = tsd.Config.getLocal(configPath || this.paths.config);
            this.paths.setTypings(this.config.typingsPath);
            if(this.verbose) {
                this.logInfo(this.verbose);
            }
        }
        Context.prototype.logInfo = function (details) {
            if (typeof details === "undefined") { details = false; }