0.1.2 • Published 3 years ago

@hexlet/linq v0.1.2

Weekly downloads
9
License
ISC
Repository
github
Last release
3 years ago

js-linq

github action status Code Climate

Install

npm install @hexlet/linq

Usage example

import HexletLinq from '@hexlet/linq';

const cars = [
  { brand: 'bmw', model: 'm5', year: 2014 },
  { brand: 'bmw', model: 'm4', year: 2013 },
  { brand: 'kia', model: 'sorento', year: 2014 },
  { brand: 'kia', model: 'rio', year: 2010 },
  { brand: 'kia', model: 'sportage', year: 2012 },
];
const coll = HexletLinq.from(cars);

const result = coll.orderBy(car => car.year, 'desc')
  .where(car => car.brand === 'kia')
  .select(car => car.model);

result.toArray();
// ['sorento', 'sportage', 'rio']

For more information, see the Full Documentation

Hexlet Ltd. logo

This repository is created and maintained by the team and the community of Hexlet, an educational project. Read more about Hexlet (in Russian).

0.1.2

3 years ago

0.1.1

3 years ago

0.1.0

4 years ago

0.0.4

5 years ago