Skip to content
A JS library written in TS to transform sequences of data from format to another
Branch: master
Clone or download
Type Name Latest commit message Commit time
Failed to load latest commit information.
docs build: change where type declarations are built Mar 13, 2019
src feat(without): add without support to fromfrom Apr 2, 2019
test feat(without): add without support to fromfrom Apr 2, 2019
.gitignore chore: add .npmrc to .gitignore Mar 21, 2019
.prettierrc.json docs: add documentation with api doc and playground Feb 2, 2019
.travis.yml ci: remove latest node from ci config Mar 12, 2019
LICENSE Initial commit 🎉 Jan 14, 2019 docs: add 'how does it work' section to readme Mar 21, 2019
package.json chore: bump version to 1.1.1 Mar 21, 2019
rollup.config.ts style: fix code style in rollup config Mar 12, 2019
tsconfig.json build: remove decorator emitting from tsconfig Mar 12, 2019


Greenkeeper badge Build Status Coveralls Dev Dependencies Sponsored

fromfrom is a LINQ inspired library to transform sequences of data.


npm install --save fromfrom


Find it here.


The library exports only a single function, from. from wraps the given source data into a Sequence. Sequence has a wide range of chainable methods to operate and transform the sequence. The sequence can then be converted into a JS type.

For example

import { from } from "fromfrom";

// Transform an array of users
const users = [
  { id: 1, name: "John", age: 31, active: true },
  { id: 2, name: "Jane", age: 32, active: false },
  { id: 3, name: "Luke", age: 33, active: false },
  { id: 4, name: "Mary", age: 34, active: true },

  .filter(user =>
  .sortByDescending(user => user.age)
// Returns
// [
//   { id: 4, name: "Mary", age: 34, active: true },
//   { id: 1, name: "John", age: 31, active: true }
// ]


  • Familiar method names - Even though it's LINQ inspired, uses familiar method names from JS.
  • Supports all main JS types - Works with arrays, objects, maps, sets, and objects that implement the iterable protocol.
  • No dependencies - Guarantees small size.
  • Type safe - Written in TypeScript. Type definitions included.
  • Deferred execution - The execution of the sequence is deferred until you begin consuming the sequence.
  • Fully tested - 100% test coverage.

How does it work

See "how does it work" section from the initial release blog post.


NPM scripts

  • npm t: Run test suite
  • npm start: Run npm run build in watch mode
  • npm run test:watch: Run test suite in interactive watch mode
  • npm run test:prod: Run linting and generate coverage
  • npm run build: Generate bundles and typings, create docs
  • npm run lint: Lints code
  • npm run commit: Commit using conventional commit style (husky will tell you to use it if you haven't 😉)


Made with ❤️ by @TomiTurtiainen.

This project is a grateful recipient of the Futurice Open Source sponsorship program. ❤️

Forked from TypeScript library starter

You can’t perform that action at this time.