formula: add indexOf (#431)

This commit is contained in:
jean-emmanuel 2018-11-15 07:39:38 +01:00
parent 09ef265a69
commit ded65869db
3 changed files with 4 additions and 0 deletions

View file

@ -77,6 +77,7 @@ module.exports = {
})
math.import({
unpack: function(a) { return Array.isArray(a) ? a.toString() : a },
indexOf: function(a, x) { return a.indexOf(x) },
pad: function(x, padding) {
var str = String(x),
[int, dec] = str.split('.')