How to use the fxjs.is_string function in fxjs

To help you get started, we’ve selected a few fxjs 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 marpple / FxSQL / src / index.js View on Github external
.map(v =>
          is_string(v) ? [{ text: columnize(v) }, { text: ', ' }] :
            is_tag(v) ? [v(), { text: ', ' }] :
              [{ text: Object.entries(v).map(v => v.map(dq).join(' AS ')).join(', ')}, { text: ', ' }]));
      sqls.pop();
github marpple / FxSQL / src / ljoin.js View on Github external
each(me => {
            while (!(last(cur).depth < me.depth)) cur.pop();
            const left = last(cur);
            if (me.rel_type == '-') {
              me.left_key = me.left_key || (me.is_poly ? 'id' : singular(me.table) + '_id');
              me.key = me.key || (me.is_poly ? 'attached_id' : 'id');
              left.left_joins.push(me);
            } else {
              me.left_key = me.left_key || 'id';
              me.key = me.key || (me.is_poly ? 'attached_id' : singular(left.table) + '_id');
            }
            left.rels.push(me);

            me.poly_type = me.is_poly ?
              SQL `AND ${EQ(
                is_string(me.poly_type) ? { attached_type: me.poly_type || left.table } : me.poly_type
              )}` : tag();

            cur.push(me);
          }, rest);
          return left;
github marpple / FxSQL / src / index.js View on Github external
          map(c => is_string(c) ? me.as + '.' + c : c),
          uniq)) :