////////////////////////////////////////////////// 
Factory function to create a suitable BigInteger.

@param value
The value for the big integer.
@param base {integer}
Base of the conversion of elements in ``value``.
@returns
A BigInteger object.
355237
function _bi(value, base) {
        if (base !== undefined) {
            if (base === 256) {
                return _bi(utils.string2bytes(value));
            }
            return new BigInteger(value, base);
        } else if (typeof value === 'string') {
            return new BigInteger(value, 10);
        } else if ((value instanceof Array) || (value instanceof Uint8Array)) {
            return new BigInteger(value);
        } else if (typeof value === 'number') {
            return new BigInteger(value.toString(), 10);
        } else {
            throw "Can't convert " + value + " to BigInteger";
        }
    }
783712
public static BigInteger read(String value) {
		if (!StringUtils.hasText(value)) return null;
		
		return new BigInteger(value);
	}
225487
public static int safeToInt(long value) {
        if (value > Integer.MAX_VALUE || value < Integer.MIN_VALUE) {
            throw new ArithmeticException("Calculation overflows an int: " + value);
        }
        return (int) value;
    }
193690
@Override
    public Long convert(Object value) {
        if (value instanceof Number) {
            double d = ((Number)value).doubleValue();
            if (Double.isNaN(d) || Math.round(d)!=d) throw new IllegalArgumentException("Not a valid long: " + value);
            return ((Number)value).longValue();
        } else if (value instanceof String) {
            return Long.parseLong((String)value);
        } else if (value instanceof Idfiable) {
            return ((Idfiable)value).longId();
        } else return null;
    }
192699
public static final BigInteger getBigInteger(Number value)
   {
      BigInteger result = null;
      if (value != null)
      {
         if (value instanceof BigInteger)
         {
            result = (BigInteger) value;
         }
         else
         {
            result = BigInteger.valueOf(Math.round(value.doubleValue()));
         }
      }
      return (result);
   }
190841
public static IntegerBinding toIntExact(final ObservableLongValue value) {
        return createIntegerBinding(() -> Math.toIntExact(value.get()), value);
    }
926068
static int asInteger(Object value, int min, int max) throws ProvidenceConfigException {
        if (value instanceof Long) {
            return validateInRange("Long", (Long) value, min, max);
        } else if (value instanceof Float || value instanceof Double) {
            long l = ((Number) value).longValue();
            if ((double) l != ((Number) value).doubleValue()) {
                throw new ProvidenceConfigException("Truncating integer decimals from " + value.toString());
            }
            return validateInRange(value.getClass().getSimpleName(), l, min, max);
        } else if (value instanceof Number) {
            return validateInRange(value.getClass().getSimpleName(), ((Number) value).intValue(), min, max);
        } else if (value instanceof Numeric) {
            return validateInRange("Numeric", ((Numeric) value).asInteger(), min, max);
        } else if (value instanceof Boolean) {
            return ((Boolean) value) ? 1 : 0;
       }
        throw new ProvidenceConfigException("Unable to convert " + value.getClass().getSimpleName() + " to an int");
    }
622639
public static Ratio of(long value, long base )
    {
        return new Ratio( BigDecimal.valueOf( value ), BigDecimal.valueOf( base ) );
    }
384302
private static BigDecimal getBigDecimalOrNull(Object value) {
            if ( !(value instanceof Number || value instanceof String) ) {
                return null;
            }
            if ( !BigDecimal.class.isAssignableFrom( value.getClass() ) ) {
                if ( value instanceof Long || value instanceof Integer || value instanceof Short || value instanceof Byte ||
                     value instanceof AtomicLong || value instanceof AtomicInteger ) {
                    value = new BigDecimal( ((Number) value).longValue(), MathContext.DECIMAL128 );
                } else if ( value instanceof BigInteger ) {
                    value = new BigDecimal( ((BigInteger) value).toString(), MathContext.DECIMAL128 );
                } else if ( value instanceof String ) {
                    // we need to remove leading zeros to prevent octal conversion
                    value = new BigDecimal( ((String) value).replaceFirst("^0+(?!$)", ""), MathContext.DECIMAL128 );
                } else {
                    value = new BigDecimal( ((Number) value).doubleValue(), MathContext.DECIMAL128 );
                }
            }
            return (BigDecimal) value;
        }
170407
public static Integer readInteger(String value, Integer defaultValue) {
		if (!StringUtils.hasText(value)) return defaultValue;
		
		return Integer.valueOf(value);
	}
148183
@Override
	public double transform(double value) {
		double logValue = Math.log(value>0?value:0)/Math.log(base);
		return logValue;
	}
1238938
function createBaseSize(value) {
        if (/px/.test(value)) {
          return value.replace(/px/, '');
        }

        if (/em|rem/.test(value)) {
          return value.replace(/em|rem/, '') * 16;
        }

        if (/%/.test(value)) {
          return value.replace(/%/, '')/100 * 16;
        }
      }
363622
@Override
    public Byte convert(Object value) {
        if (value instanceof Number) {
            double d = ((Number)value).doubleValue();
            if (Double.isNaN(d) || Math.round(d)!=d) throw new IllegalArgumentException("Not a valid byte: " + value);
            long l = ((Number)value).longValue();
            if (l>=Byte.MIN_VALUE && l<=Byte.MAX_VALUE) return Byte.valueOf((byte)l);
            else throw new IllegalArgumentException("Value too large for byte: " + value);
        } else if (value instanceof String) {
            return Byte.parseByte((String)value);
        } else return null;
    }
198932
public static UnsignedLong valueOf(BigInteger value) {
    checkNotNull(value);
    checkArgument(value.signum() >= 0 && value.bitLength() <= Long.SIZE,
        "value (%s) is outside the range for an unsigned long value", value);
    return fromLongBits(value.longValue());
  }
594163
public void addInt(int value) {
        data[endOffset] = value;
        endOffset++;
        
        // Grow the buffer if needed
        if (endOffset == data.length)
            resize();
        
    }
636805
protected BigDecimal coerceToBigDecimal(Value value) {
		
		if (!(value instanceof NumberValue))
			throw new CommandExecutionException("Value is not a number");
		return ((NumberValue) value).get();
	}
914758
public Object execute(final Object value, final CsvContext context) {
		validateInputNotNull(value, context);
		
		final BigDecimal result;
		if( value instanceof String ) {
			final String s = (String) value;
			try {
				if( symbols == null ) {
					result = new BigDecimal(s);
				} else {
					result = new BigDecimal(fixSymbols(s, symbols));
				}
			}
			catch(final NumberFormatException e) {
				throw new SuperCsvCellProcessorException(String.format("'%s' could not be parsed as a BigDecimal",
					value), context, this, e);
			}
		} else {
			throw new SuperCsvCellProcessorException(String.class, value, context, this);
		}
		
		return next.execute(result, context);
	}