functionfoundry
Advanced tools
Comparing version 0.12.5 to 0.12.6
@@ -557,3 +557,3 @@ 'use strict'; | ||
// Copyright @ 2015-2016 WebsiteHQ LLC | ||
// Copyright @ 2015-2016 JC Fisher | ||
@@ -560,0 +560,0 @@ // # FunctionFoundry |
@@ -19,3 +19,3 @@ 'use strict'; | ||
// ABS computes absolute value of a number | ||
// Copyright 2015 WebsiteHQ LLC | ||
// Copyright 2015 JC Fisher | ||
@@ -22,0 +22,0 @@ function abs(value) { |
@@ -19,3 +19,3 @@ 'use strict'; | ||
// ACOS computes the inverse cosine of a number | ||
// Copyright 2015 WebsiteHQ LLC | ||
// Copyright 2015 JC Fisher | ||
@@ -22,0 +22,0 @@ function acos(value) { |
@@ -19,3 +19,3 @@ 'use strict'; | ||
// ADD calculates the sum of two numbers. | ||
// Copyright 2015 WebsiteHQ LLC | ||
// Copyright 2015 JC Fisher | ||
@@ -22,0 +22,0 @@ function add() { |
@@ -19,3 +19,3 @@ 'use strict'; | ||
// ADDRESS converts a row and column into an address (e.g A1) | ||
// Copyright 2015 WebsiteHQ LLC | ||
// Copyright 2015 JC Fisher | ||
@@ -22,0 +22,0 @@ function address(row, col, absolute_relative_mode, use_a1_notation, sheet) { |
@@ -45,4 +45,4 @@ 'use strict'; | ||
}); | ||
} // Copyright 2015 WebsiteHQ LLC | ||
} // Copyright 2015 JC Fisher | ||
module.exports = exports['default']; |
@@ -19,3 +19,3 @@ 'use strict'; | ||
// AVERAGE computes sum of items divided by number of items | ||
// Copyright 2015 WebsiteHQ LLC | ||
// Copyright 2015 JC Fisher | ||
@@ -22,0 +22,0 @@ function average() { |
@@ -35,5 +35,5 @@ "use strict"; | ||
return parseInt(valueAsString, 2); | ||
} // Copyright 2015 WebsiteHQ LLC | ||
} // Copyright 2015 JC Fisher | ||
; | ||
module.exports = exports["default"]; |
@@ -19,3 +19,3 @@ 'use strict'; | ||
// branch( test, result_if_true, [test2, result_if_true,] false_result ) | ||
// Copyright 2015 WebsiteHQ LLC | ||
// Copyright 2015 JC Fisher | ||
@@ -22,0 +22,0 @@ function branch() { |
@@ -14,4 +14,4 @@ 'use strict'; | ||
return Math.floor(row * _constants.MaxCols + col); | ||
} // Copyright 2015 WebsiteHQ LLC | ||
} // Copyright 2015 JC Fisher | ||
module.exports = exports['default']; |
@@ -27,4 +27,4 @@ 'use strict'; | ||
}))); | ||
} // Copyright 2015 WebsiteHQ LLC | ||
} // Copyright 2015 JC Fisher | ||
module.exports = exports['default']; |
@@ -7,3 +7,3 @@ "use strict"; | ||
exports.default = char; | ||
// Copyright 2015 WebsiteHQ LLC | ||
// Copyright 2015 JC Fisher | ||
@@ -10,0 +10,0 @@ // CHAR convert number into character (e.g 65 => 'A') |
@@ -34,4 +34,4 @@ 'use strict'; | ||
return arguments.length <= index - 1 + 1 ? undefined : arguments[index - 1 + 1]; | ||
} // Copyright 2015 WebsiteHQ LLC | ||
} // Copyright 2015 JC Fisher | ||
module.exports = exports['default']; |
@@ -19,3 +19,3 @@ 'use strict'; | ||
// CLEAN accepts an object and remove properties that are blank. | ||
// Copyright 2015 WebsiteHQ LLC | ||
// Copyright 2015 JC Fisher | ||
@@ -22,0 +22,0 @@ function clean(obj) { |
@@ -22,4 +22,4 @@ 'use strict'; | ||
return text.charCodeAt(index - 1); | ||
} // Copyright 2015 WebsiteHQ LLC | ||
} // Copyright 2015 JC Fisher | ||
module.exports = exports['default']; |
@@ -27,3 +27,3 @@ 'use strict'; | ||
// COLUMN return the column number that corresponds to the reference. | ||
// Copyright 2015 WebsiteHQ LLC | ||
// Copyright 2015 JC Fisher | ||
@@ -30,0 +30,0 @@ function column(value) { |
@@ -19,3 +19,3 @@ 'use strict'; | ||
// Convert index to letter (e.g 0 -> A) | ||
// Copyright 2015 WebsiteHQ LLC | ||
// Copyright 2015 JC Fisher | ||
@@ -22,0 +22,0 @@ function columnletter(index) { |
@@ -19,3 +19,3 @@ 'use strict'; | ||
// Convert letter to number (e.g A -> 0) | ||
// Copyright 2015 WebsiteHQ LLC | ||
// Copyright 2015 JC Fisher | ||
@@ -22,0 +22,0 @@ function columnnumber(column) { |
@@ -7,3 +7,3 @@ "use strict"; | ||
exports.default = concatenate; | ||
// Copyright 2015 WebsiteHQ LLC | ||
// Copyright 2015 JC Fisher | ||
@@ -10,0 +10,0 @@ // CONCATENATE reduces a list of values into a single string. |
@@ -6,3 +6,3 @@ "use strict"; | ||
}); | ||
// Copyright 2015 WebsiteHQ LLC | ||
// Copyright 2015 JC Fisher | ||
@@ -9,0 +9,0 @@ // Shared constants |
@@ -19,3 +19,3 @@ 'use strict'; | ||
// COS returns the cosine of a value. | ||
// Copyright 2015 WebsiteHQ LLC | ||
// Copyright 2015 JC Fisher | ||
@@ -22,0 +22,0 @@ function cos(value) { |
@@ -17,4 +17,4 @@ 'use strict'; | ||
return (0, _serial2.default)(new Date(year, month - 1, day)); | ||
} // Copyright 2015 WebsiteHQ LLC | ||
} // Copyright 2015 JC Fisher | ||
module.exports = exports['default']; |
@@ -44,3 +44,3 @@ "use strict"; | ||
} | ||
} // Copyright 2015 WebsiteHQ LLC | ||
} // Copyright 2015 JC Fisher | ||
module.exports = exports["default"]; |
@@ -19,3 +19,3 @@ 'use strict'; | ||
// DATEVALUE parses a date string and returns a serial number. | ||
// Copyright 2015 WebsiteHQ LLC | ||
// Copyright 2015 JC Fisher | ||
@@ -22,0 +22,0 @@ function datevalue(d) { |
@@ -17,4 +17,4 @@ 'use strict'; | ||
return (0, _parsedate2.default)(d).getDate(); | ||
} // Copyright 2015 WebsiteHQ LLC | ||
} // Copyright 2015 JC Fisher | ||
module.exports = exports['default']; |
@@ -18,3 +18,3 @@ 'use strict'; | ||
// Copyright 2015 WebsiteHQ LLC | ||
// Copyright 2015 JC Fisher | ||
@@ -21,0 +21,0 @@ function days360(start_date, end_date, method) { |
@@ -19,3 +19,3 @@ 'use strict'; | ||
// based on https://github.com/sutoiku/formula.js/blob/mast../src/engineering.js | ||
// Copyright 2015 WebsiteHQ LLC | ||
// Copyright 2015 JC Fisher | ||
@@ -22,0 +22,0 @@ function dec2bin(input, places) { |
@@ -10,2 +10,4 @@ 'use strict'; | ||
exports.default = decodebase64; | ||
// Copyright 2015 JC Fisher | ||
function decodebase64(str) { | ||
@@ -12,0 +14,0 @@ |
@@ -23,3 +23,4 @@ 'use strict'; | ||
return JSON.parse(b64DecodeUnicode(token.split('.')[1])); | ||
} | ||
} // Copyright 2015 JC Fisher | ||
module.exports = exports['default']; |
@@ -7,3 +7,3 @@ "use strict"; | ||
exports.default = diff; | ||
// Copyright 2015 WebsiteHQ LLC | ||
// Copyright 2015 JC Fisher | ||
@@ -10,0 +10,0 @@ function diff(a, b) { |
@@ -19,3 +19,3 @@ 'use strict'; | ||
// DIVIDE calculates the product of two numbers. | ||
// Copyright 2015 WebsiteHQ LLC | ||
// Copyright 2015 JC Fisher | ||
@@ -22,0 +22,0 @@ function divide() { |
@@ -18,2 +18,4 @@ 'use strict'; | ||
// Copyright 2015 JC Fisher | ||
function edate(start_date, months) { | ||
@@ -20,0 +22,0 @@ start_date = (0, _parsedate2.default)(start_date); |
@@ -18,3 +18,3 @@ 'use strict'; | ||
// Copyright 2015 WebsiteHQ LLC | ||
// Copyright 2015 JC Fisher | ||
@@ -21,0 +21,0 @@ function eomonth(start_date, months) { |
@@ -7,3 +7,3 @@ "use strict"; | ||
exports.default = eq; | ||
// Copyright 2015 WebsiteHQ LLC | ||
// Copyright 2015 JC Fisher | ||
@@ -10,0 +10,0 @@ // EQ compares two values and returns a boolean value. |
@@ -6,3 +6,3 @@ "use strict"; | ||
}); | ||
// Copyright 2015 WebsiteHQ LLC | ||
// Copyright 2015 JC Fisher | ||
@@ -9,0 +9,0 @@ // List of errors in the spreadsheet system |
@@ -17,4 +17,4 @@ 'use strict'; | ||
return a === b; | ||
} // Copyright 2015 WebsiteHQ LLC | ||
} // Copyright 2015 JC Fisher | ||
module.exports = exports['default']; |
@@ -7,3 +7,3 @@ "use strict"; | ||
exports.default = filter; | ||
// Copyright 2015 WebsiteHQ LLC | ||
// Copyright 2015 JC Fisher | ||
@@ -10,0 +10,0 @@ // FILTER limits a range based on arrays of boolean values. |
@@ -25,4 +25,4 @@ 'use strict'; | ||
return position === -1 ? _error2.default.value : position + 1; | ||
} // Copyright 2015 WebsiteHQ LLC | ||
} // Copyright 2015 JC Fisher | ||
module.exports = exports['default']; |
@@ -7,3 +7,3 @@ "use strict"; | ||
exports.default = flatten; | ||
// Copyright 2015 WebsiteHQ LLC | ||
// Copyright 2015 JC Fisher | ||
@@ -10,0 +10,0 @@ // FLATTEN converts a nested array into a flattened array. It only supports one |
@@ -18,2 +18,4 @@ 'use strict'; | ||
// Copyright 2015 JC Fisher | ||
function fv(rate, periods, payment) { | ||
@@ -20,0 +22,0 @@ var value = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : 0; |
@@ -17,3 +17,4 @@ 'use strict'; | ||
return o[p]; | ||
} | ||
} // Copyright 2015 JC Fisher | ||
module.exports = exports['default']; |
@@ -38,4 +38,4 @@ 'use strict'; | ||
} | ||
} // Copyright 2015 WebsiteHQ LLC | ||
} // Copyright 2015 JC Fisher | ||
module.exports = exports['default']; |
@@ -18,3 +18,3 @@ 'use strict'; | ||
// Copyright 2015 WebsiteHQ LLC | ||
// Copyright 2015 JC Fisher | ||
@@ -21,0 +21,0 @@ function gte(a, b) { |
@@ -7,3 +7,3 @@ 'use strict'; | ||
exports.default = guid; | ||
// Copyright 2015 WebsiteHQ LLC | ||
// Copyright 2015 JC Fisher | ||
@@ -10,0 +10,0 @@ // credit to http://stackoverflow.com/questions/105034/create-guid-uuid-in-javascript |
@@ -19,3 +19,3 @@ 'use strict'; | ||
// Find a needle in a table searching horizontally. | ||
// Copyright 2015 WebsiteHQ LLC | ||
// Copyright 2015 JC Fisher | ||
@@ -22,0 +22,0 @@ function hlookup(needle, table) { |
@@ -17,3 +17,4 @@ 'use strict'; | ||
return (0, _trunc2.default)((value - (0, _trunc2.default)(value)) * 24); | ||
} | ||
} // Copyright 2015 JC Fisher | ||
module.exports = exports['default']; |
@@ -17,4 +17,4 @@ 'use strict'; | ||
return (0, _isblank2.default)(value) ? value_if_blank : value; | ||
} // Copyright 2015 WebsiteHQ LLC | ||
} // Copyright 2015 JC Fisher | ||
module.exports = exports['default']; |
@@ -17,4 +17,4 @@ 'use strict'; | ||
return (0, _isempty2.default)(value) ? value_if_empty : value; | ||
} // Copyright 2015 WebsiteHQ LLC | ||
} // Copyright 2015 JC Fisher | ||
module.exports = exports['default']; |
@@ -19,4 +19,4 @@ 'use strict'; | ||
return (0, _iserror2.default)(value) ? value_if_error : value; | ||
} // Copyright 2015 WebsiteHQ LLC | ||
} // Copyright 2015 JC Fisher | ||
module.exports = exports['default']; |
@@ -17,4 +17,4 @@ 'use strict'; | ||
return value === _error2.default.na ? value_if_na : value; | ||
} // Copyright 2015 WebsiteHQ LLC | ||
} // Copyright 2015 JC Fisher | ||
module.exports = exports['default']; |
@@ -47,4 +47,4 @@ 'use strict'; | ||
return row[column_num - 1]; | ||
} // Copyright 2015 WebsiteHQ LLC | ||
} // Copyright 2015 JC Fisher | ||
module.exports = exports['default']; |
@@ -17,3 +17,3 @@ 'use strict'; | ||
// INDEX2COL computes the column given a cell index | ||
// Copyright 2015 WebsiteHQ LLC | ||
// Copyright 2015 JC Fisher | ||
@@ -20,0 +20,0 @@ function index2col(index) { |
@@ -13,4 +13,4 @@ 'use strict'; | ||
return Math.floor(index / _constants.MaxCols); | ||
} // Copyright 2015 WebsiteHQ LLC | ||
} // Copyright 2015 JC Fisher | ||
module.exports = exports['default']; |
@@ -7,2 +7,4 @@ "use strict"; | ||
exports.default = int; | ||
// Copyright 2015 JC Fisher | ||
function int(value) { | ||
@@ -9,0 +11,0 @@ return Math.floor(value); |
@@ -7,3 +7,3 @@ 'use strict'; | ||
exports.default = isarray; | ||
// Copyright 2015 WebsiteHQ LLC | ||
// Copyright 2015 JC Fisher | ||
@@ -10,0 +10,0 @@ // ISARRAY returns true when the value is an aray. |
@@ -7,3 +7,3 @@ "use strict"; | ||
exports.default = isbinary; | ||
// Copyright 2015 WebsiteHQ LLC | ||
// Copyright 2015 JC Fisher | ||
@@ -10,0 +10,0 @@ // ISBINARY returns true when the string is 1 to 10 characters in length and |
@@ -7,3 +7,3 @@ 'use strict'; | ||
exports.default = isblank; | ||
// Copyright 2015 WebsiteHQ LLC | ||
// Copyright 2015 JC Fisher | ||
@@ -10,0 +10,0 @@ // ISBLANK returns true when the value is undefined or null. |
@@ -7,3 +7,3 @@ "use strict"; | ||
exports.default = isboolean; | ||
// Copyright 2015 WebsiteHQ LLC | ||
// Copyright 2015 JC Fisher | ||
@@ -10,0 +10,0 @@ // returns true if true or false |
@@ -7,3 +7,3 @@ 'use strict'; | ||
exports.default = isdate; | ||
// Copyright 2015 WebsiteHQ LLC | ||
// Copyright 2015 JC Fisher | ||
@@ -10,0 +10,0 @@ // ISDATE returns true when the `value` is a JavaScript date object. |
@@ -7,3 +7,3 @@ "use strict"; | ||
exports.default = isemail; | ||
// Copyright 2015 WebsiteHQ LLC | ||
// Copyright 2015 JC Fisher | ||
@@ -10,0 +10,0 @@ // ISEMAIL returns true when the `value` matches the regex. |
@@ -26,5 +26,5 @@ 'use strict'; | ||
return (0, _isblank2.default)(value) || (0, _isarray2.default)(value) && value.length === 0 || (0, _istext2.default)(value) && value === ''; | ||
} // Copyright 2015 WebsiteHQ LLC | ||
} // Copyright 2015 JC Fisher | ||
; | ||
module.exports = exports['default']; |
@@ -18,4 +18,4 @@ 'use strict'; | ||
return value !== _error2.default.na && value.constructor.name === 'Error' || typeof value === 'number' && (Number.isNaN(value) || !Number.isFinite(value)); | ||
} // Copyright 2015 WebsiteHQ LLC | ||
} // Copyright 2015 JC Fisher | ||
module.exports = exports['default']; |
@@ -19,3 +19,3 @@ 'use strict'; | ||
// ISERROR returns true when the value is an error. | ||
// Copyright 2015 WebsiteHQ LLC | ||
// Copyright 2015 JC Fisher | ||
@@ -22,0 +22,0 @@ function iserror(value) { |
@@ -7,3 +7,3 @@ "use strict"; | ||
exports.default = iseven; | ||
// Copyright 2015 WebsiteHQ LLC | ||
// Copyright 2015 JC Fisher | ||
@@ -10,0 +10,0 @@ // ISEVEN returns true when the value is even. |
@@ -7,3 +7,3 @@ 'use strict'; | ||
exports.default = isfalsy; | ||
// Copyright 2015 WebsiteHQ LLC | ||
// Copyright 2015 JC Fisher | ||
@@ -10,0 +10,0 @@ // Returns true when the value is a falsy value. |
@@ -7,3 +7,3 @@ 'use strict'; | ||
exports.default = isfunction; | ||
// Copyright 2015 WebsiteHQ LLC | ||
// Copyright 2015 JC Fisher | ||
@@ -10,0 +10,0 @@ // ISFUNCTION returns true when `value` is a function. |
@@ -18,3 +18,4 @@ 'use strict'; | ||
return year % 4 === 0 && year % 100 !== 0 || year % 400 === 0; | ||
} | ||
} // Copyright 2015 JC Fisher | ||
module.exports = exports['default']; |
@@ -17,4 +17,4 @@ 'use strict'; | ||
return value === _error2.default.na; | ||
} // Copyright 2015 WebsiteHQ LLC | ||
} // Copyright 2015 JC Fisher | ||
module.exports = exports['default']; |
@@ -7,3 +7,3 @@ 'use strict'; | ||
exports.default = isnumber; | ||
// Copyright 2015 WebsiteHQ LLC | ||
// Copyright 2015 JC Fisher | ||
@@ -10,0 +10,0 @@ // Returns true when the value is a finite number. |
@@ -10,3 +10,3 @@ 'use strict'; | ||
exports.default = isobject; | ||
// Copyright 2015 WebsiteHQ LLC | ||
// Copyright 2015 JC Fisher | ||
@@ -13,0 +13,0 @@ // isobject returns true when `value` is an object or function. |
@@ -7,3 +7,3 @@ "use strict"; | ||
exports.default = isodd; | ||
// Copyright 2015 WebsiteHQ LLC | ||
// Copyright 2015 JC Fisher | ||
@@ -10,0 +10,0 @@ // ISODD returns true when the value is odd. |
@@ -16,2 +16,4 @@ 'use strict'; | ||
// Copyright 2015 JC Fisher | ||
function isoweeknum(date) { | ||
@@ -18,0 +20,0 @@ date = (0, _parsedate2.default)(date); |
@@ -18,4 +18,4 @@ 'use strict'; | ||
return value._isref === true; | ||
} // Copyright 2015 WebsiteHQ LLC | ||
} // Copyright 2015 JC Fisher | ||
module.exports = exports['default']; |
@@ -7,3 +7,3 @@ 'use strict'; | ||
exports.default = istext; | ||
// Copyright 2015 WebsiteHQ LLC | ||
// Copyright 2015 JC Fisher | ||
@@ -10,0 +10,0 @@ // ISTEXT returns true when the value is a string. |
@@ -18,5 +18,5 @@ 'use strict'; | ||
return !(0, _isfalsy2.default)(value); | ||
} // Copyright 2015 WebsiteHQ LLC | ||
} // Copyright 2015 JC Fisher | ||
; | ||
module.exports = exports['default']; |
@@ -7,3 +7,3 @@ 'use strict'; | ||
exports.default = isurl; | ||
// Copyright 2015 WebsiteHQ LLC | ||
// Copyright 2015 JC Fisher | ||
@@ -10,0 +10,0 @@ // ISURL returns true when the value matches the regex for a uniform resource locator. |
@@ -17,3 +17,3 @@ 'use strict'; | ||
return (0, _isnumber2.default)(value) && value % 1 === 0; | ||
} // Copyright 2015 WebsiteHQ LLC | ||
} // Copyright 2015 JC Fisher | ||
module.exports = exports['default']; |
@@ -28,3 +28,4 @@ 'use strict'; | ||
return list.join(delim); | ||
} | ||
} // Copyright 2015 JC Fisher | ||
module.exports = exports['default']; |
@@ -33,4 +33,4 @@ 'use strict'; | ||
return text.substring(0, number); | ||
} // Copyright 2015 WebsiteHQ LLC | ||
} // Copyright 2015 JC Fisher | ||
module.exports = exports['default']; |
@@ -29,5 +29,5 @@ 'use strict'; | ||
return _error2.default.value; | ||
} // Copyright 2015 WebsiteHQ LLC | ||
} // Copyright 2015 JC Fisher | ||
; | ||
module.exports = exports['default']; |
@@ -7,3 +7,3 @@ 'use strict'; | ||
exports.default = lookup; | ||
// Copyright 2015 WebsiteHQ LLC | ||
// Copyright 2015 JC Fisher | ||
@@ -10,0 +10,0 @@ // LOOKUP find a value in an array. |
@@ -19,3 +19,3 @@ 'use strict'; | ||
// LOWER converts `value` to lower case | ||
// Copyright 2015 WebsiteHQ LLC | ||
// Copyright 2015 JC Fisher | ||
@@ -22,0 +22,0 @@ function lower(value) { |
@@ -19,3 +19,3 @@ 'use strict'; | ||
// LT compares two values and returns true when a is less than b. | ||
// Copyright 2015 WebsiteHQ LLC | ||
// Copyright 2015 JC Fisher | ||
@@ -22,0 +22,0 @@ function lt(a, b) { |
@@ -19,3 +19,3 @@ 'use strict'; | ||
// LT compares two values and returns true when a is less than or equal to b. | ||
// Copyright 2015 WebsiteHQ LLC | ||
// Copyright 2015 JC Fisher | ||
@@ -22,0 +22,0 @@ function lte(a, b) { |
@@ -7,2 +7,4 @@ "use strict"; | ||
exports.default = map; | ||
// Copyright 2015 JC Fisher | ||
// map an array to a new array | ||
@@ -9,0 +11,0 @@ function map(arr, f) { |
@@ -19,3 +19,3 @@ 'use strict'; | ||
// MATCH returns an index in `array_reference` by searching for `lookup_reference`. | ||
// Copyright 2015 WebsiteHQ LLC | ||
// Copyright 2015 JC Fisher | ||
@@ -22,0 +22,0 @@ function match(lookup_reference, array_reference, matchType) { |
@@ -33,4 +33,4 @@ 'use strict'; | ||
}); | ||
} // Copyright 2015 WebsiteHQ LLC | ||
} // Copyright 2015 JC Fisher | ||
module.exports = exports['default']; |
@@ -27,4 +27,4 @@ 'use strict'; | ||
}); | ||
} // Copyright 2015 WebsiteHQ LLC | ||
} // Copyright 2015 JC Fisher | ||
module.exports = exports['default']; |
@@ -33,4 +33,4 @@ 'use strict'; | ||
}); | ||
} // Copyright 2015 WebsiteHQ LLC | ||
} // Copyright 2015 JC Fisher | ||
module.exports = exports['default']; |
@@ -16,2 +16,4 @@ 'use strict'; | ||
// Copyright 2015 JC Fisher | ||
function minute(value) { | ||
@@ -18,0 +20,0 @@ // calculate total seconds |
@@ -17,4 +17,4 @@ 'use strict'; | ||
return (0, _parsedate2.default)(d).getMonth() + 1; | ||
} // Copyright 2015 WebsiteHQ LLC | ||
} // Copyright 2015 JC Fisher | ||
module.exports = exports['default']; |
@@ -19,3 +19,3 @@ 'use strict'; | ||
// MULTIPLY calculates the product of two numbers. | ||
// Copyright 2015 WebsiteHQ LLC | ||
// Copyright 2015 JC Fisher | ||
@@ -22,0 +22,0 @@ function multiply() { |
@@ -47,4 +47,4 @@ 'use strict'; | ||
return 0; | ||
} // Copyright 2015 WebsiteHQ LLC | ||
} // Copyright 2015 JC Fisher | ||
module.exports = exports['default']; |
@@ -17,4 +17,4 @@ 'use strict'; | ||
return !(0, _eq2.default)(a, b); | ||
} // Copyright 2015 WebsiteHQ LLC | ||
} // Copyright 2015 JC Fisher | ||
module.exports = exports['default']; |
@@ -17,3 +17,3 @@ 'use strict'; | ||
return value !== true && value !== false && value !== 1 && value !== 0 ? _error2.default.value : !value; | ||
} // Copyright 2015 WebsiteHQ LLC | ||
} // Copyright 2015 JC Fisher | ||
module.exports = exports['default']; |
@@ -18,2 +18,4 @@ 'use strict'; | ||
// Copyright 2015 JC Fisher | ||
function now() { | ||
@@ -20,0 +22,0 @@ var d = new Date(); |
@@ -7,2 +7,4 @@ "use strict"; | ||
exports.default = nper; | ||
// Copyright 2015 JC Fisher | ||
function nper(rate, pmt, pv, fv, type) { | ||
@@ -9,0 +11,0 @@ var log, result; |
@@ -7,2 +7,4 @@ "use strict"; | ||
exports.default = npv; | ||
// Copyright 2015 JC Fisher | ||
function npv(rate) { | ||
@@ -9,0 +11,0 @@ rate = rate * 1; |
@@ -23,3 +23,4 @@ 'use strict'; | ||
}, []); | ||
} | ||
} // Copyright 2015 JC Fisher | ||
module.exports = exports['default']; |
@@ -27,2 +27,4 @@ 'use strict'; | ||
// Convert a text value into a number value. | ||
// Copyright 2015 JC Fisher | ||
function numbervalue(text, decimal_separator, group_separator) { | ||
@@ -29,0 +31,0 @@ decimal_separator = decimal_separator || '.'; |
@@ -41,4 +41,4 @@ 'use strict'; | ||
return nonNegativeDecimalNumber >= 536870912 ? nonNegativeDecimalNumber - 1073741824 : nonNegativeDecimalNumber; | ||
} // Copyright 2015 WebsiteHQ LLC | ||
} // Copyright 2015 JC Fisher | ||
module.exports = exports['default']; |
@@ -25,4 +25,4 @@ 'use strict'; | ||
}, false); | ||
} // Copyright 2015 WebsiteHQ LLC | ||
} // Copyright 2015 JC Fisher | ||
module.exports = exports['default']; |
@@ -31,4 +31,4 @@ 'use strict'; | ||
return _error2.default.value; | ||
} // Copyright 2015 WebsiteHQ LLC | ||
} // Copyright 2015 JC Fisher | ||
module.exports = exports['default']; |
@@ -17,3 +17,3 @@ 'use strict'; | ||
// PARSEDATE converts a value into a Date object. | ||
// Copyright 2015 WebsiteHQ LLC | ||
// Copyright 2015 JC Fisher | ||
@@ -20,0 +20,0 @@ function parsedate(val) { |
@@ -34,3 +34,4 @@ 'use strict'; | ||
}, {}); | ||
} | ||
} // Copyright 2015 JC Fisher | ||
module.exports = exports['default']; |
@@ -13,4 +13,4 @@ 'use strict'; | ||
return _constants.τ / 2; | ||
} // Copyright 2015 WebsiteHQ LLC | ||
} // Copyright 2015 JC Fisher | ||
module.exports = exports['default']; |
@@ -19,2 +19,4 @@ 'use strict'; | ||
// pluck a property from a list of objects | ||
// Copyright 2015 JC Fisher | ||
function pluck(prop, list) { | ||
@@ -21,0 +23,0 @@ if (!(0, _isarray2.default)(list)) { |
@@ -19,3 +19,3 @@ 'use strict'; | ||
// PMT returns a loan payment | ||
// Copyright 2015 WebsiteHQ LLC | ||
// Copyright 2015 JC Fisher | ||
@@ -22,0 +22,0 @@ function pmt(rate, periods, present) { |
@@ -19,3 +19,3 @@ 'use strict'; | ||
// POWER computes the power of a value and nth degree. | ||
// Copyright 2015 WebsiteHQ LLC | ||
// Copyright 2015 JC Fisher | ||
@@ -22,0 +22,0 @@ function power() { |
@@ -35,4 +35,4 @@ 'use strict'; | ||
}); | ||
} // Copyright 2015 WebsiteHQ LLC | ||
} // Copyright 2015 JC Fisher | ||
module.exports = exports['default']; |
@@ -18,2 +18,4 @@ 'use strict'; | ||
// Copyright 2015 JC Fisher | ||
function pv(rate, periods, payment) { | ||
@@ -20,0 +22,0 @@ var future = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : 0; |
@@ -7,2 +7,4 @@ "use strict"; | ||
exports.default = reduce; | ||
// Copyright 2015 JC Fisher | ||
// reduce an array to a value | ||
@@ -9,0 +11,0 @@ function reduce(arr, f) { |
@@ -43,3 +43,3 @@ 'use strict'; | ||
// REF accepts top and bottom and returns a reference object. It encapsulates a cell or a range. | ||
// Copyright 2015 WebsiteHQ LLC | ||
// Copyright 2015 JC Fisher | ||
@@ -46,0 +46,0 @@ function ref(top, bottom) { |
@@ -19,3 +19,3 @@ 'use strict'; | ||
// REPLACE returns a new string after replacing with `new_text`. | ||
// Copyright 2015 WebsiteHQ LLC | ||
// Copyright 2015 JC Fisher | ||
@@ -22,0 +22,0 @@ function replace(text, position, length, new_text) { |
@@ -7,3 +7,3 @@ 'use strict'; | ||
exports.default = rept; | ||
// Copyright 2015 WebsiteHQ LLC | ||
// Copyright 2015 JC Fisher | ||
@@ -10,0 +10,0 @@ // REPT creates string by repeating text a given number of times. |
@@ -34,4 +34,4 @@ 'use strict'; | ||
return text.substring(text.length - number); | ||
} // Copyright 2015 WebsiteHQ LLC | ||
} // Copyright 2015 JC Fisher | ||
module.exports = exports['default']; |
@@ -7,3 +7,3 @@ "use strict"; | ||
exports.default = round; | ||
// Copyright 2015 WebsiteHQ LLC | ||
// Copyright 2015 JC Fisher | ||
@@ -10,0 +10,0 @@ // CONVERT a number to a fixed precision. |
@@ -7,3 +7,3 @@ "use strict"; | ||
exports.default = roundup; | ||
// Copyright 2015 WebsiteHQ LLC | ||
// Copyright 2015 JC Fisher | ||
@@ -10,0 +10,0 @@ // ROUNDUP converts a number to a fixed precision by rounding up. |
@@ -33,4 +33,4 @@ 'use strict'; | ||
return _error2.default.value; | ||
} // Copyright 2015 WebsiteHQ LLC | ||
} // Copyright 2015 JC Fisher | ||
module.exports = exports['default']; |
@@ -16,2 +16,4 @@ 'use strict'; | ||
// Copyright 2015 JC Fisher | ||
function second(value) { | ||
@@ -18,0 +20,0 @@ |
@@ -7,3 +7,3 @@ 'use strict'; | ||
var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; // Copyright 2015 WebsiteHQ LLC | ||
var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; // Copyright 2015 JC Fisher | ||
@@ -10,0 +10,0 @@ |
@@ -28,4 +28,4 @@ 'use strict'; | ||
return diff + (diff > 59 ? 2 : 1); | ||
} // Copyright 2015 WebsiteHQ LLC | ||
} // Copyright 2015 JC Fisher | ||
module.exports = exports['default']; |
@@ -19,3 +19,3 @@ 'use strict'; | ||
// SIN calculates the sinine of a value. | ||
// Copyright 2015 WebsiteHQ LLC | ||
// Copyright 2015 JC Fisher | ||
@@ -22,0 +22,0 @@ function sin(value) { |
@@ -27,3 +27,3 @@ 'use strict'; | ||
// INT returns true when a needle is found in a list. | ||
// Copyright 2015 WebsiteHQ LLC | ||
// Copyright 2015 JC Fisher | ||
@@ -30,0 +30,0 @@ function some(needle, list) { |
@@ -63,4 +63,4 @@ 'use strict'; | ||
return _error2.default.na; | ||
} // Copyright 2015 WebsiteHQ LLC | ||
} // Copyright 2015 JC Fisher | ||
module.exports = exports['default']; |
@@ -7,3 +7,3 @@ "use strict"; | ||
exports.default = split; | ||
// Copyright 2015 WebsiteHQ LLC | ||
// Copyright 2015 JC Fisher | ||
@@ -10,0 +10,0 @@ // SPLIT `text` given a `delimiter`. |
@@ -7,3 +7,3 @@ 'use strict'; | ||
exports.default = substitute; | ||
// Copyright 2015 WebsiteHQ LLC | ||
// Copyright 2015 JC Fisher | ||
@@ -10,0 +10,0 @@ // SUBSTITUTE `old_text` with `new_text` a given number of occurrences in `text`. |
@@ -33,3 +33,3 @@ 'use strict'; | ||
}, content); | ||
} // Copyright 2015 WebsiteHQ LLC | ||
} // Copyright 2015 JC Fisher | ||
module.exports = exports['default']; |
@@ -19,3 +19,3 @@ 'use strict'; | ||
// SUBTRACT calculates the difference of two numbers. | ||
// Copyright 2015 WebsiteHQ LLC | ||
// Copyright 2015 JC Fisher | ||
@@ -22,0 +22,0 @@ function subtract() { |
@@ -19,3 +19,3 @@ 'use strict'; | ||
// SUM a given list of `numbers` | ||
// Copyright 2015 WebsiteHQ LLC | ||
// Copyright 2015 JC Fisher | ||
@@ -22,0 +22,0 @@ function sum() { |
@@ -7,2 +7,4 @@ 'use strict'; | ||
exports.default = surroundKeys; | ||
// Copyright 2015 JC Fisher | ||
// Creates a new object where all of the keys are surrounded by | ||
@@ -9,0 +11,0 @@ // start and end delimiters. |
@@ -19,3 +19,3 @@ 'use strict'; | ||
// TAN computes the tagent of a value. | ||
// Copyright 2015 WebsiteHQ LLC | ||
// Copyright 2015 JC Fisher | ||
@@ -22,0 +22,0 @@ function tan(value) { |
@@ -13,4 +13,4 @@ 'use strict'; | ||
return _constants.τ; | ||
} // Copyright 2015 WebsiteHQ LLC | ||
} // Copyright 2015 JC Fisher | ||
module.exports = exports['default']; |
@@ -1,2 +0,2 @@ | ||
// Copyright 2015 WebsiteHQ LLC | ||
// Copyright 2015 JC Fisher | ||
// based heavily on code from socialcalc | ||
@@ -3,0 +3,0 @@ 'use strict'; |
@@ -12,3 +12,4 @@ 'use strict'; | ||
return +((hour * 3600 + minute * 60 + second) / _constants.SecondsInDay).toFixed(15); | ||
} | ||
} // Copyright 2015 JC Fisher | ||
module.exports = exports['default']; |
@@ -21,3 +21,5 @@ "use strict"; | ||
return (_constants.SecondsInHour * date.getHours() + _constants.SecondsInMinute * date.getMinutes() + date.getSeconds()) / _constants.SecondsInDay; | ||
}; | ||
} // Copyright 2015 JC Fisher | ||
; | ||
module.exports = exports["default"]; |
@@ -17,3 +17,5 @@ 'use strict'; | ||
return (0, _datevalue2.default)(d.toLocaleDateString()); | ||
}; | ||
} // Copyright 2015 JC Fisher | ||
; | ||
module.exports = exports['default']; |
@@ -20,4 +20,4 @@ 'use strict'; | ||
return text.trim(); | ||
} // Copyright 2015 WebsiteHQ LLC | ||
} // Copyright 2015 JC Fisher | ||
module.exports = exports['default']; |
@@ -7,2 +7,4 @@ "use strict"; | ||
exports.default = trunc; | ||
// Copyright 2015 JC Fisher | ||
// remove decimal part of number | ||
@@ -9,0 +11,0 @@ function trunc(val) { |
@@ -7,3 +7,3 @@ "use strict"; | ||
exports.default = unique; | ||
// Copyright 2015 WebsiteHQ LLC | ||
// Copyright 2015 JC Fisher | ||
@@ -10,0 +10,0 @@ // UNIQUE reduces an `array` into an array without duplicate values. |
@@ -7,3 +7,3 @@ "use strict"; | ||
exports.default = upper; | ||
// Copyright 2015 WebsiteHQ LLC | ||
// Copyright 2015 JC Fisher | ||
@@ -10,0 +10,0 @@ // UPPER converts a string to upper case |
@@ -46,4 +46,4 @@ 'use strict'; | ||
return _error2.default.na; | ||
} // Copyright 2015 WebsiteHQ LLC | ||
} // Copyright 2015 JC Fisher | ||
module.exports = exports['default']; |
@@ -26,4 +26,4 @@ 'use strict'; | ||
}, 0) & 1); | ||
} // Copyright 2015 WebsiteHQ LLC | ||
} // Copyright 2015 JC Fisher | ||
module.exports = exports['default']; |
@@ -17,4 +17,4 @@ 'use strict'; | ||
return (0, _parsedate2.default)(d).getFullYear(); | ||
} // Copyright 2015 WebsiteHQ LLC | ||
} // Copyright 2015 JC Fisher | ||
module.exports = exports['default']; |
@@ -92,3 +92,5 @@ 'use strict'; | ||
} | ||
}; | ||
} // Copyright 2015 JC Fisher | ||
; | ||
module.exports = exports['default']; |
{ | ||
"name": "functionfoundry", | ||
"version": "0.12.5", | ||
"version": "0.12.6", | ||
"description": "Pure function JavaScript library", | ||
@@ -16,3 +16,3 @@ "main": "fn/_index.js", | ||
"type": "git", | ||
"url": "git+https://github.com/WebsiteHQ/functionfoundry.git" | ||
"url": "git+https://github.com/FunctionFoundry/functionfoundry.git" | ||
}, | ||
@@ -26,5 +26,5 @@ "keywords": [ | ||
"bugs": { | ||
"url": "https://github.com/WebsiteHQ/functionfoundry/issues" | ||
"url": "https://github.com/FunctionFoundry/functionfoundry/issues" | ||
}, | ||
"homepage": "https://github.com/WebsiteHQ/functionfoundry#readme", | ||
"homepage": "https://github.com/FunctionFoundry/functionfoundry#readme", | ||
"devDependencies": { | ||
@@ -31,0 +31,0 @@ "babel-cli": "^6.8.0", |
@@ -1,6 +0,6 @@ | ||
[](https://circleci.com/gh/WebsiteHQ) | ||
[](https://circleci.com/gh/FunctionFoundry) | ||
FunctionFoundry is JavaScript function library without side effects. | ||
It is for [formula](https://github.com/WebsiteHQ/formula). | ||
It is for [formula](https://github.com/FunctionFoundry/formula). | ||
@@ -7,0 +7,0 @@ ## Install |
241745
299
6674