PHP 8.2.30
Preview: defaultSymbols.js.flow Size: 2.99 KB
/home/byroehnu/easepay.easetack.com/node_modules/polished/lib/math/presets/defaultSymbols.js.flow

// @flow

function last(...a: Array<number>): number {
  return a[a.length - 1]
}

function negation(a: number): number {
  return -a
}

function addition(a: number, b: number): number {
  return a + b
}

function subtraction(a: number, b: number): number {
  return a - b
}

function multiplication(a: number, b: number): number {
  return a * b
}

function division(a: number, b: number): number {
  return a / b
}

function max(...a: Array<number>): number {
  return Math.max(...a)
}

function min(...a: Array<number>): number {
  return Math.min(...a)
}

function comma(...a: Array<number | string>): Array<number | string> {
  return Array.of(...a)
}

const defaultSymbols = {
  symbols: {
    '*': {
      infix: {
        symbol: '*',
        f: multiplication,
        notation: 'infix',
        precedence: 4,
        rightToLeft: 0,
        argCount: 2,
      },
      symbol: '*',
      regSymbol: '\\*',
    },
    '/': {
      infix: {
        symbol: '/',
        f: division,
        notation: 'infix',
        precedence: 4,
        rightToLeft: 0,
        argCount: 2,
      },
      symbol: '/',
      regSymbol: '/',
    },
    '+': {
      infix: {
        symbol: '+',
        f: addition,
        notation: 'infix',
        precedence: 2,
        rightToLeft: 0,
        argCount: 2,
      },
      prefix: {
        symbol: '+',
        f: last,
        notation: 'prefix',
        precedence: 3,
        rightToLeft: 0,
        argCount: 1,
      },
      symbol: '+',
      regSymbol: '\\+',
    },
    '-': {
      infix: {
        symbol: '-',
        f: subtraction,
        notation: 'infix',
        precedence: 2,
        rightToLeft: 0,
        argCount: 2,
      },
      prefix: {
        symbol: '-',
        f: negation,
        notation: 'prefix',
        precedence: 3,
        rightToLeft: 0,
        argCount: 1,
      },
      symbol: '-',
      regSymbol: '-',
    },
    ',': {
      infix: {
        symbol: ',',
        f: comma,
        notation: 'infix',
        precedence: 1,
        rightToLeft: 0,
        argCount: 2,
      },
      symbol: ',',
      regSymbol: ',',
    },
    '(': {
      prefix: {
        symbol: '(',
        f: last,
        notation: 'prefix',
        precedence: 0,
        rightToLeft: 0,
        argCount: 1,
      },
      symbol: '(',
      regSymbol: '\\(',
    },
    ')': {
      postfix: {
        symbol: ')',
        f: undefined,
        notation: 'postfix',
        precedence: 0,
        rightToLeft: 0,
        argCount: 1,
      },
      symbol: ')',
      regSymbol: '\\)',
    },
    min: {
      func: {
        symbol: 'min',
        f: min,
        notation: 'func',
        precedence: 0,
        rightToLeft: 0,
        argCount: 1,
      },
      symbol: 'min',
      regSymbol: 'min\\b',
    },
    max: {
      func: {
        symbol: 'max',
        f: max,
        notation: 'func',
        precedence: 0,
        rightToLeft: 0,
        argCount: 1,
      },
      symbol: 'max',
      regSymbol: 'max\\b',
    },
  },
}

export default defaultSymbols

Directory Contents

Dirs: 0 × Files: 7

Name Size Perms Modified Actions
127 B lr--r--r-- 2026-03-14 01:49:21
Edit Download
2.85 KB lrw-r--r-- 2026-02-28 00:31:12
Edit Download
2.98 KB lrw-r--r-- 2026-02-28 00:30:28
Edit Download
2.99 KB lrw-r--r-- 2026-02-28 00:29:08
Edit Download
907 B lrw-r--r-- 2026-02-28 00:31:14
Edit Download
1.11 KB lrw-r--r-- 2026-02-28 00:30:30
Edit Download
1.05 KB lrw-r--r-- 2026-02-28 00:29:14
Edit Download

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