How to use the comb.array function in comb

To help you get started, we’ve selected a few comb 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 C2FO / patio / lib / dataset / query.js View on Github external
var comb = require("comb"),
    hitch = comb.hitch,
    array = comb.array,
    flatten = array.flatten,
    compact = array.compact,
    define = comb.define,
    argsToArray = comb.argsToArray,
    isString = comb.isString,
    isEmpty = comb.isEmpty,
    isNull = comb.isNull,
    isBoolean = comb.isBoolean,
    isNumber = comb.isNumber,
    merge = comb.merge,
    isArray = comb.isArray,
    isObject = comb.isObject,
    isFunction = comb.isFunction,
    isUndefined = comb.isUndefined,
    isHash = comb.isHash,
    isInstanceOf = comb.isInstanceOf,
github C2FO / patio / lib / adapters / mysql.js View on Github external
var mysql = require("mysql"),
    comb = require("comb"),
    hitch = comb.hitch,
    asyncArray = comb.async.array,
    define = comb.define,
    merge = comb.merge,
    string = comb.string,
    argsToArray = comb.argsToArray,
    format = string.format,
    Promise = comb.Promise,
    isString = comb.isString,
    array = comb.array,
    toArray = array.toArray,
    isArray = comb.isArray,
    isHash = comb.isHash,
    when = comb.when,
    isInstanceOf = comb.isInstanceOf,
    isFunction = comb.isFunction,
    isUndefinedOrNull = comb.isUndefinedOrNull,
    isUndefined = comb.isUndefined,
    isEmpty = comb.isEmpty,
    QueryError = require("../errors").QueryError,
    Dataset = require("../dataset"),
    Database = require("../database"),
    sql = require("../sql").sql,
    DateTime = sql.DateTime,
    Time = sql.Time,
    Year = sql.Year,
github C2FO / patio / lib / plugins / validation.js View on Github external
var comb = require("comb"),
    array = comb.array,
    compact = array.compact,
    flatten = array.flatten,
    toArray = array.toArray,
    net = require("net"),
    isIP = net.isIP,
    isIPv4 = net.isIPv4,
    isIPv6 = net.isIPv6,
    validator = require("validator"),
    dateCmp = comb.date.compare,
    isArray = comb.isArray,
    combDeepEqual = comb.deepEqual,
    combIsBoolean = comb.isBoolean,
    isString = comb.isString,
    combIsDefined = comb.isDefined,
    combIsNull = comb.isNull,
    ModelError = require("../errors.js").ModelError,
github C2FO / patio / lib / associations / _Association.js View on Github external
var comb = require("comb"),
    define = comb.define,
    isUndefined = comb.isUndefined,
    isUndefinedOrNull = comb.isUndefinedOrNull,
    isBoolean = comb.isBoolean,
    isString = comb.isString,
    isHash = comb.isHash,
    when = comb.when,
    isFunction = comb.isFunction,
    isInstanceOf = comb.isInstanceOf,
    Promise = comb.Promise,
    PromiseList = comb.PromiseList,
    array = comb.array,
    toArray = array.toArray,
    isArray = comb.isArray,
    Middleware = comb.plugins.Middleware,
    PatioError = require("../errors").PatioError;

var fetch = {
    LAZY: "lazy",
    EAGER: "eager"
};


/**
 * @class
 * Base class for all associations.
 *
 * <br>
github C2FO / patio / lib / adapters / postgres.js View on Github external
var pg = require("pg"),
    PgTypes = require("pg-types"),
    QueryStream = require('pg-query-stream'),
    comb = require("comb"),
    asyncArray = comb.async.array,
    string = comb.string,
    isHash = comb.isHash,
    argsToArray = comb.argsToArray,
    pad = string.pad,
    format = string.format,
    when = comb.when,
    array = comb.array,
    toArray = array.toArray,
    zip = array.zip,
    flatten = array.flatten,
    Promise = comb.Promise,
    isUndefinedOrNull = comb.isUndefinedOrNull,
    isUndefined = comb.isUndefined,
    isString = comb.isString,
    isArray = comb.isArray,
    isEmpty = comb.isEmpty,
    isBoolean = comb.isBoolean,
    isObject = comb.isObject,
    isFunction = comb.isFunction,
    define = comb.define,
    merge = comb.merge,
    isDefined = comb.isDefined,
    isInstanceOf = comb.isInstanceOf,
github C2FO / patio / lib / dataset / graph.js View on Github external
format = string.format,
    SQL = require("../sql"),
    sql = SQL.sql,
    isUndefinedOrNull = comb.isUndefinedOrNull,
    define = comb.define,
    merge = comb.merge,
    argsToArray = comb.argsToArray,
    isString = comb.isString,
    isHash = comb.isHash,
    isArray = comb.isArray,
    isObject = comb.isObject,
    isFunction = comb.isFunction,
    isBoolean = comb.isBoolean,
    isEmpty = comb.isEmpty,
    isInstanceOf = comb.isInstanceOf,
    toArray = comb.array.toArray,
    errors = require("../errors"),
    QueryError = errors.QueryError;

/*
 * This file contains dataset graphing related features. All methods return
 * a copy of the dataset.
 */


//leave for later initialization
var Dataset;


//checks for a table alies if there isnt one throw an error.
var raiseAliasError = function (options) {
    var isAlias = isUndefinedOrNull(options.tableAlias);
github C2FO / patio / lib / plugins / columnMapper.js View on Github external
var comb = require("comb"),
    toArray = comb.array.toArray,
    isInstanceOf = comb.isInstanceOf,
    isBoolean = comb.isBoolean,
    when = comb.when,
    isHash = comb.isHash,
    isString = comb.isString,
    sql = require("../sql.js").sql,
    AliasedExpression = sql.AliasedExpression,
    Identifier = sql.Identifier,
    isConditionSpecifier = sql.Expression.isConditionSpecifier,
    ModelError = require("../errors.js").ModelError;


/**
 * @class This plugin exposes the ability to map columns on other tables to this Model.
 *
 * See {@link patio.plugins.ColumnMapper.mappedColumn} for more information.
github C2FO / patio / lib / dataset / sql.js View on Github external
var comb = require("comb"),
    define = comb.define,
    array = comb.array,
    toArray = array.toArray,
    intersect = array.intersect,
    compact = array.compact,
    string = comb.string,
    format = string.format,
    argsToArray = comb.argsToArray,
    isInstanceOf = comb.isInstanceOf,
    isArray = comb.isArray,
    isNumber = comb.isNumber,
    isDate = comb.isDate,
    isNull = comb.isNull,
    isBoolean = comb.isBoolean,
    isFunction = comb.isFunction,
    isUndefined = comb.isUndefined,
    isObject = comb.isObject,
    isHash = comb.isHash,
github C2FO / patio / lib / associations / manyToMany.js View on Github external
var comb = require("comb"),
    define = comb.define,
    isUndefined = comb.isUndefined,
    isUndefinedOrNull = comb.isUndefinedOrNull,
    isFunction = comb.isFunction,
    isInstanceOf = comb.isInstanceOf,
    sql = require("../sql").sql,
    array = comb.array,
    isBoolean = comb.isBoolean,
    when = comb.when,
    zip = array.zip,
    Promise = comb.Promise,
    PromiseList = comb.PromiseList,
    OneToMany = require("./oneToMany"),
    pluralize = comb.pluralize,
    AssociationError = require("../errors").AssociationError;

var LOGGER = comb.logger("comb.associations.ManyToMany");
/**
 * @class Class to define a manyToMany association.
 *
 * <br>
 * <b>NOT to be instantiated directly</b>
 * Its just documented for reference.
github C2FO / patio / lib / database / schema.js View on Github external
"use strict";
var comb = require("comb"),
    asyncArray = comb.async.array,
    isFunction = comb.isFunction,
    argsToArray = comb.argsToArray,
    array = comb.array,
    isArray = comb.isArray,
    isString = comb.isString,
    isUndefined = comb.isUndefined,
    isNumber = comb.isNumber,
    toArray = comb.array.toArray,
    hitch = comb.hitch,
    format = comb.string.format,
    Dataset = require("../dataset"),
    Promise = comb.Promise,
    PromiseList = comb.PromiseList,
    errors = require("../errors"),
    DatabaseError = errors.DatabaseError,
    generators = require("./schemaGenerators"),
    SchemaGenerator = generators.SchemaGenerator,
    AlterTableGenerator = generators.AlterTableGenerator,
    sql = require("../sql").sql,