mathjs
Version:
Math.js is an extensive math library for JavaScript and Node.js. It features a flexible expression parser and offers an integrated solution to work with numbers, big numbers, complex numbers, units, and matrices.
15 lines (14 loc) • 326 B
JavaScript
module.exports = {
'name': 'filter',
'category': 'Utils',
'syntax': [
'filter(x, test)'
],
'description': 'Filter items in a matrix.',
'examples': [
'isPositive(x) = x > 0',
'filter([6, -2, -1, 4, 3], isPositive)',
'filter([6, -2, 0, 1, 0], x != 0)'
],
'seealso': ['sort', 'map', 'forEach']
};