xeo

1.1.0 • Public • Published

a tiny no-dependency library inspired by j.

quickstart

$ npm install --save xeo
const xeo = require('xeo/xeo')
let data = [1993, 1987, 2016, 2004, 2001, 2012, 2014, 1998]
let over15 = xeo.exec(data, '=>2016 +15', true)
console.log(over15)
//  5

...or use in the browser


exec(array, fns[, fold])

let arr = [[2, 4, 6], [8, 10, 12], [3, 5, 7, 9]]
let chunked = xeo.exec(arr, '/1')
console.log(chunked)
//  [[[2], [4], [6]], [[8], [10], [12]], [[3], [5], [7], [9]]]
let sumDoubles = xeo.exec([2, 3, 4], '*2', true)
console.log(sumDoubles)
//  18
let arr = [['foo', 'bar', 'baz'], ['baz', 'qux', 'quux']]
let unoBaz = [...xeo.exec(arr, '-baz', true), 'baz']
console.log(unoBaz)
//  ["foo", "bar", "qux", "quux", "baz"]

full documentation


docs styled with pug and less

Readme

Keywords

Package Sidebar

Install

npm i xeo

Weekly Downloads

0

Version

1.1.0

License

MIT

Last publish

Collaborators

  • rjk