New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

functionfoundry

Package Overview
Dependencies
Maintainers
1
Versions
88
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

functionfoundry - npm Package Compare versions

Comparing version 0.5.8 to 0.6.1

lib/SEARCH.js

21

lib/COND.js

@@ -17,18 +17,13 @@ 'use strict';

// last case
if (i === cases.length - 1) {
if (typeof a !== 'undefined') {
return cases[a];
}
if (typeof a !== 'undefined') {
// return the previously found item
return a;
} else if (i === cases.length - 1) {
// return the last item
return b;
} else if (i % 2 === 0 && b) {
// return the found item
return cases[i + 1];
}
// condition case
if (typeof a === 'undefined' && i % 2 === 0 && b) {
return i + 1;
}
return a;
}, undefined);
}

@@ -6,3 +6,2 @@ 'use strict';

});
exports.packages = exports.engineeringFunctions = exports.textFunctions = exports.statisticFunctions = exports.financialFunctions = exports.dateTimeFunctions = exports.mathFunctions = exports.dataFunctions = exports.referenceFunctions = exports.informationFunctions = exports.logicalFunctions = undefined;

@@ -85,2 +84,4 @@ var _ABS = require('./ABS');

var _LOOKUP = require('./LOOKUP');
var _LOWER = require('./LOWER');

@@ -114,2 +115,4 @@

var _SEARCH = require('./SEARCH');
var _SIN = require('./SIN');

@@ -135,25 +138,36 @@

var logicalFunctions = exports.logicalFunctions = ['if', 'ifna', 'iferror', 'and', 'eq', 'or', 'xor', 'not', 'lt', 'lte', 'gt', 'gte', 'ne', 'switch', 'choose', 'cond'];
var logicalFunctions = ['if', 'ifna', 'iferror', 'and', 'eq', 'or', 'xor', 'not', 'lt', 'lte', 'gt', 'gte', 'ne', 'switch', 'choose', 'cond'];
var informationFunctions = exports.informationFunctions = ['isarray', 'isblank', 'isemail', 'iserror', 'iseven', 'isformula', 'islogical', 'isna', 'isnontext', 'isnumber', 'isodd', 'istext', 'isrange', 'isref', 'isurl', 'n', 'na', 'precedents', 'sheet', 'sheets', 'type'];
var informationFunctions = ['isarray', 'isblank', 'isemail', 'iserror', 'iseven', 'isformula', 'islogical', 'isna', 'isnontext', 'isnumber', 'isodd', 'istext', 'isrange', 'isref', 'isurl', 'n', 'na', 'precedents', 'sheet', 'sheets', 'type'];
var referenceFunctions = exports.referenceFunctions = ['indirect', 'isref', 'rows', 'columns', 'range', 'cell', 'cellindex', 'index2addr', 'index2col', 'index2row'];
var referenceFunctions = ['indirect', 'isref', 'rows', 'columns', 'range', 'cell', 'cellindex', 'index2addr', 'index2col', 'index2row'];
var dataFunctions = exports.dataFunctions = ['sort', 'filter', 'unique'];
var dataFunctions = ['sort', 'filter', 'unique'];
var mathFunctions = exports.mathFunctions = ['abs', 'acos', 'acosh', 'acot', 'acoth', 'add', 'aggregate', 'arabic', 'asin', 'asinh', 'atan', 'atan2', 'atanh', 'base', 'ceiling', 'combin', 'combina', 'cos', 'cosh', 'cot', 'coth', 'csc', 'csch', 'decimal', 'degrees', 'divide', 'even', 'exp', 'fact', 'factdouble', 'floor', 'gcd', 'gt', 'gte', 'int', 'lcm', 'log', 'log10', 'lt', 'lte', 'mdeterm', 'minus', 'minverse', 'mmult', 'mod', 'mround', 'multinomial', 'multiply', 'odd', 'pi', 'tau', 'power', 'product', 'quotient', 'radians', 'rand', 'randbetween', 'roman', 'round', 'rounddown', 'roundup', 'sec', 'sech', 'seriessum', 'sign', 'sin', 'sqrt', 'sqrtpi', 'subtotal', 'sum', 'tan'];
var mathFunctions = ['abs', 'acos', 'acosh', 'acot', 'acoth', 'add', 'aggregate', 'arabic', 'asin', 'asinh', 'atan', 'atan2', 'atanh', 'base', 'ceiling', 'combin', 'combina', 'cos', 'cosh', 'cot', 'coth', 'csc', 'csch', 'decimal', 'degrees', 'divide', 'even', 'exp', 'fact', 'factdouble', 'floor', 'gcd', 'gt', 'gte', 'int', 'lcm', 'log', 'log10', 'lt', 'lte', 'mdeterm', 'minus', 'minverse', 'mmult', 'mod', 'mround', 'multinomial', 'multiply', 'odd', 'pi', 'tau', 'power', 'product', 'quotient', 'radians', 'rand', 'randbetween', 'roman', 'round', 'rounddown', 'roundup', 'sec', 'sech', 'seriessum', 'sign', 'sin', 'sqrt', 'sqrtpi', 'subtotal', 'sum', 'tan'];
var dateTimeFunctions = exports.dateTimeFunctions = ['date', 'datevalue', 'datedif', 'day', 'days360', 'edate', 'eomonth', 'hour', 'isleapyear', 'isoweeknum', 'minute', 'month', 'networkdays', 'now', 'second', 'time', 'timevalue', 'today', 'weekday', 'weeknum', 'workday', 'year', 'yearfrac'];
var dateTimeFunctions = ['date', 'datevalue', 'datedif', 'day', 'days360', 'edate', 'eomonth', 'hour', 'isleapyear', 'isoweeknum', 'minute', 'month', 'networkdays', 'now', 'second', 'time', 'timevalue', 'today', 'weekday', 'weeknum', 'workday', 'year', 'yearfrac'];
var financialFunctions = exports.financialFunctions = ['accrintm', 'amorlinc', 'coupdays', 'coupdaysnc', 'coupncd', 'coupnum', 'couppcd', 'cumipmt', 'cumprinc', 'db', 'ddb', 'disc', 'dollarde', 'dollarfr', 'duration', 'effect', 'fv', 'fvschedule', 'intrate', 'irr', 'ipmt', 'mduration', 'mirr', 'nominal', 'nper', 'npv', 'oddfprice', 'oddfyield', 'pmt', 'pv'];
var financialFunctions = ['accrintm', 'amorlinc', 'coupdays', 'coupdaysnc', 'coupncd', 'coupnum', 'couppcd', 'cumipmt', 'cumprinc', 'db', 'ddb', 'disc', 'dollarde', 'dollarfr', 'duration', 'effect', 'fv', 'fvschedule', 'intrate', 'irr', 'ipmt', 'mduration', 'mirr', 'nominal', 'nper', 'npv', 'oddfprice', 'oddfyield', 'pmt', 'pv'];
var statisticFunctions = exports.statisticFunctions = ['avedev', 'average', 'averagea', 'averageif', 'averageifs', 'correl', 'count', 'counta', 'countin', 'countblank', 'countif', 'countifs', 'countunique', 'devsq', 'fisher', 'fisherinv', 'forecast', 'frequency', 'gammaln', 'geomean', 'growth', 'harmean', 'intercept', 'kurt', 'large', 'linest', 'logest', 'max', 'maxa', 'median', 'min', 'mina', 'pearson', 'permut', 'permutationa', 'phi', 'prob', 'rsq', 'skew', 'slope', 'small', 'standardize', 'stdeva', 'stdevpa', 'steyx', 'transpose', 'trend', 'trimmean', 'vara', 'varpa'];
var statisticFunctions = ['avedev', 'average', 'averagea', 'averageif', 'averageifs', 'correl', 'count', 'counta', 'countin', 'countblank', 'countif', 'countifs', 'countunique', 'devsq', 'fisher', 'fisherinv', 'forecast', 'frequency', 'gammaln', 'geomean', 'growth', 'harmean', 'intercept', 'kurt', 'large', 'linest', 'logest', 'max', 'maxa', 'median', 'min', 'mina', 'pearson', 'permut', 'permutationa', 'phi', 'prob', 'rsq', 'skew', 'slope', 'small', 'standardize', 'stdeva', 'stdevpa', 'steyx', 'transpose', 'trend', 'trimmean', 'vara', 'varpa'];
var textFunctions = exports.textFunctions = ['asc', 'bahttext', 'clean', 'char', 'code', 'concatenate', 'dbcs', 'dollar', 'exact', 'find', 'fixed', 'left', 'len', 'lower', 'join', 'mid', 'numbervalue', 'pronetic', 'proper', 'replace', 'rept', 'right', 'search', 'split', 'substitute', 't', 'text', 'trim', 'upper', 'value'];
var textFunctions = ['asc', 'bahttext', 'clean', 'char', 'code', 'concatenate', 'dbcs', 'dollar', 'exact', 'find', 'fixed', 'left', 'len', 'lower', 'join', 'mid', 'numbervalue', 'pronetic', 'proper', 'replace', 'rept', 'right', 'search', 'split', 'substitute', 't', 'text', 'trim', 'upper', 'value'];
var engineeringFunctions = exports.engineeringFunctions = ['besseli', 'besselj', 'besselk', 'bessely', 'bin2dec', 'bin2hex', 'bin2oct', 'bitand', 'bitlshift', 'bitor', 'bitrshift', 'bitxor', 'complex', 'convert', 'dec2bin', 'dec2hex', 'dec2oct', 'delta', 'erf', 'erfc', 'gestep', 'hex2bin', 'hex2dec', 'hex2oct', 'imabs', 'imaginary', 'imargument', 'imconjugate', 'imcos', 'imcosh', 'imcot', 'imdiv', 'imexp', 'imln', 'imlog19', 'imlog2', 'impower', 'improduct', 'imreal', 'imsec', 'imsech', 'imsin', 'imsinh', 'imsqrt', 'imcsc', 'imcsch', 'imsub', 'imtan', 'oct2bin', 'oct2dec', 'oct2hex'];
var engineeringFunctions = ['besseli', 'besselj', 'besselk', 'bessely', 'bin2dec', 'bin2hex', 'bin2oct', 'bitand', 'bitlshift', 'bitor', 'bitrshift', 'bitxor', 'complex', 'convert', 'dec2bin', 'dec2hex', 'dec2oct', 'delta', 'erf', 'erfc', 'gestep', 'hex2bin', 'hex2dec', 'hex2oct', 'imabs', 'imaginary', 'imargument', 'imconjugate', 'imcos', 'imcosh', 'imcot', 'imdiv', 'imexp', 'imln', 'imlog19', 'imlog2', 'impower', 'improduct', 'imreal', 'imsec', 'imsech', 'imsin', 'imsinh', 'imsqrt', 'imcsc', 'imcsch', 'imsub', 'imtan', 'oct2bin', 'oct2dec', 'oct2hex'];
var packages = exports.packages = (0, _FLATTEN.FLATTEN)([logicalFunctions, informationFunctions, referenceFunctions, dataFunctions, mathFunctions, dateTimeFunctions, financialFunctions, statisticFunctions, textFunctions, engineeringFunctions]).sort();
var allFunctions = (0, _FLATTEN.FLATTEN)([logicalFunctions, informationFunctions, referenceFunctions, dataFunctions, mathFunctions, dateTimeFunctions, financialFunctions, statisticFunctions, textFunctions, engineeringFunctions]).sort();
exports.default = {
allFunctions: allFunctions,
logicalFunctions: logicalFunctions,
informationFunctions: informationFunctions,
referenceFunctions: referenceFunctions,
dataFunctions: dataFunctions,
mathFunctions: mathFunctions,
dateTimeFunctions: dateTimeFunctions,
financialFunctions: financialFunctions,
statisticFunctions: statisticFunctions,
textFunctions: textFunctions,
engineeringFunctions: engineeringFunctions,
ABS: _ABS.ABS,

@@ -197,2 +211,3 @@ ACOS: _ACOS.ACOS,

ISTEXT: _ISTEXT.ISTEXT,
LOOKUP: _LOOKUP.LOOKUP,
LOWER: _LOWER.LOWER,

@@ -212,2 +227,3 @@ LT: _LT.LT,

REPT: _REPT.REPT,
SEARCH: _SEARCH.SEARCH,
SIN: _SIN.SIN,

@@ -214,0 +230,0 @@ SORT: _SORT.SORT,

@@ -7,4 +7,4 @@ "use strict";

exports.LOWER = LOWER;
function LOWER(string) {
return string.toLowerCase();
function LOWER(str) {
return str.toLowerCase();
}
{
"name": "functionfoundry",
"version": "0.5.8",
"version": "0.6.1",
"description": "Functions inspired by the spreadsheets",

@@ -5,0 +5,0 @@ "main": "lib/index.js",

# functionfoundry
[![Circle CI](https://circleci.com/gh/FunctionFoundry/functionfoundry.svg?style=svg)](https://circleci.com/gh/FormulaPages/box)
[![Circle CI](https://circleci.com/gh/FunctionFoundry/functionfoundry.svg?style=svg)](https://circleci.com/gh/FunctionFoundry)
Functions inspired by the spreadsheet for the web
Functions inspired by the spreadsheet for the web.
This project has 3 directories.
| name | purpose |
| ------------- | ----------- |
|src| Original JavaScript 2015 source code|
|lib| CommonJS code created by Babel compiler|
|test| Tests using the substack/tape framework|
If you want to learn how the function behave then please read the tests.

@@ -7,21 +7,15 @@ // COND.js -

// last case
if (i === cases.length - 1 ) {
if (typeof a !== 'undefined') {
return cases[a];
}
if (typeof a !== 'undefined') {
// return the previously found item
return a;
} else if (i === cases.length - 1 ) {
// return the last item
return b;
} else if (i % 2 === 0 && b) {
// return the found item
return cases[i+1];
}
// condition case
if (typeof a === 'undefined' &&
i % 2 === 0 && b) {
return i+1;
}
return a;
}, undefined)
}

@@ -66,3 +66,3 @@ import {ABS} from './ABS'

export var logicalFunctions = [
let logicalFunctions = [
'if',

@@ -86,3 +86,3 @@ 'ifna',

export var informationFunctions = [
let informationFunctions = [
'isarray',

@@ -111,3 +111,3 @@ 'isblank',

export var referenceFunctions = [
let referenceFunctions = [
'indirect',

@@ -125,3 +125,3 @@ 'isref',

export var dataFunctions = [
let dataFunctions = [
'sort',

@@ -132,3 +132,3 @@ 'filter',

export var mathFunctions = [
let mathFunctions = [
'abs',

@@ -207,3 +207,3 @@ 'acos',

export var dateTimeFunctions = [
let dateTimeFunctions = [
'date',

@@ -234,3 +234,3 @@ 'datevalue',

export var financialFunctions = [
let financialFunctions = [
'accrintm',

@@ -268,3 +268,3 @@ 'amorlinc',

export var statisticFunctions = [
let statisticFunctions = [
'avedev',

@@ -322,3 +322,3 @@ 'average',

export var textFunctions = [
let textFunctions = [
'asc',

@@ -356,3 +356,3 @@ 'bahttext',

export var engineeringFunctions = [
let engineeringFunctions = [
'besseli',

@@ -411,3 +411,3 @@ 'besselj',

export var packages = FLATTEN([
let allFunctions = FLATTEN([
logicalFunctions,

@@ -426,2 +426,13 @@ informationFunctions,

export default {
allFunctions,
logicalFunctions,
informationFunctions,
referenceFunctions,
dataFunctions,
mathFunctions,
dateTimeFunctions,
financialFunctions,
statisticFunctions,
textFunctions,
engineeringFunctions,
ABS,

@@ -428,0 +439,0 @@ ACOS,

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc