• This repository has been archived on 21/Apr/2018
  • Stars
    star
    157
  • Rank 238,399 (Top 5 %)
  • Language
    JavaScript
  • License
    Other
  • Created over 11 years ago
  • Updated over 6 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Interactive Extensions for JavaScript

Build Status

The Interactive Extensions for JavaScript...

...is a set of libraries to compose pull-based collections and LINQ-style query operators in JavaScript

The Interactive Extensions for JavaScript (IxJS) is an implementation of Language Integrated Query (LINQ) to Objects in native JavaScript with a core set of operators on par with the .NET implementation. This implementation uses the same techniques for lazy evaluation of chained functions, for example map/select and filter/where. This allows you as the user to write rich expressive queries against a number of data sources without taking a performance hit.

We provide two files, a core implementation of LINQ to Objects in l2o.js and the Interactive Extensions in ix.js. The Interactive Extensions is a set of functions that were found to be useful for the Reactive Extensions (Rx) and were ported from the push model of Rx to a pull model.

Getting started is easy. Just reference the IxJS files:

<script src="l2o.js"></script>
<script src="ix.js"></script>

Next, we could generate data, filter it and then display the results

// Generate the data
var data = Ix.Enumerable.range(0, 10);

// Query the data
var query = data
	.map( function (x) {
		return x * x;
	})
	.filter( function (x) {
		return x % 3 === 0;
	});

// Now execute the query
query.forEach( function (x, idx) {
	console.log(x, idx);
});

Note the execution of the query doesn't take place until forEach is called.

This project is a mirror of the CodePlex repository.

About the Interactive Extensions Extensions

This set of libraries include:

  • l2o.js - Core LINQ to Objects library
  • ix.js - Interactive Extensions for JavaScript

API Documentation

You can find the documentation here as well as examples here.

Installation and Usage

There are multiple ways of getting started with the Interactive Extensions. The files are available on cdnjs and jsDelivr.

In a Browser:

<script src="l2o.js"></script>
<script src="ix.js"></script>

Installing with Bower

bower install Ix

Installing with Jam

jam install ix

Installing via NPM:

npm install ix
npm install -g ix

Using in Node.js:

var Ix = require('ix');

var source = Ix.Enumerable.fromArray([1,2,3]);

source.forEach(function (x) {
	console.log('Next: ' + x);	
});

// => Next 1 
// => Next 2 
// => Next 3

Installing all of IxJS via NuGet:

Install-Package IxJS-All

Or install via NuGet individual packages:

Install-Package IxJS-L2O
Install-Package IxJS-Main

Using IxJS with an AMD loader such as Require.js

require({
    'paths': {
        'ix': 'path/to/ix.js'
    }
},
['ix'], function(Ix) {
    var obs = Ix.Enumerable.returnValue(42);
    obs.forEach(function (x) { 
    	console.log('Next: ' + x); 
	});
});

// => Next 42 

Compatibility

IxJS has been thoroughly tested against all major browsers and supports IE6+, Chrome 4+, FireFox 1+, and Node.js v0.4+.

License

Copyright (c) Microsoft Open Technologies, Inc. All rights reserved. Microsoft Open Technologies would like to thank its contributors, a list of whom are at http://rx.codeplex.com/wikipage?title=Contributors.

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

More Repositories

1

RxJS

The Reactive Extensions for JavaScript
JavaScript
19,482
star
2

rx.angular.js

AngularJS Bindings for RxJS
JavaScript
827
star
3

RxJS-DOM

HTML DOM Bindings for the Reactive Extensions for JavaScript
JavaScript
437
star
4

RxJSKoans

RxJS Koans
JavaScript
372
star
5

rx-node

RxJS Bindings for Node.js and io.js
JavaScript
219
star
6

rxjs-jquery

Reactive Extensions bindings for jQuery
JavaScript
213
star
7

IL2JS

IL to JavaScript Compiler
C#
143
star
8

LevelDB

LevelDB for Windows and .NET
C++
116
star
9

RxPy

The Reactive Extensions for Python
Python
102
star
10

rxjs-node

Reactive Extensions bindings for node.js
JavaScript
70
star
11

FutureJS

Presentation from FutureJS
JavaScript
44
star
12

Reactor

Foundations for a distributed implementation of Rx.
C#
39
star
13

Rx.ObjC

Reactive Extensions for ObjC
Objective-C
29
star
14

rx.disposables

Standalone library for disposables from RxJS
JavaScript
27
star
15

RxJS-CLI

Reactive Extensions for JavaScript (RxJS) Command Line Interface
JavaScript
23
star
16

RxJS-WinJS

The Reactive Extensions for JavaScript bindings for Windows 8 and WinJS
JavaScript
22
star
17

BuildStuffWorkshop

Workshop for BuildStuff.LT 2014
15
star
18

NDC-Oslo-2014

NDC Oslo 2014 Presentation on Democratizing event processing at all scales and platforms with Reactive Extensions (Rx)
JavaScript
14
star
19

rxjs-winjs-sample

Using RxJS for Windows 8
JavaScript
14
star
20

RxToBand

Reactive Extensions (Rx) support for the Microsoft Band
C#
13
star
21

StrangeLoop2013

StrangeLoop 2013 Rx Presentation
JavaScript
12
star
22

RxJS-Combinators

A functional combinator library
JavaScript
11
star
23

rx.schedulers

Standalone implementation of the RxJS schedulers
JavaScript
11
star
24

RxJS-Contrib

The Reactive Extensions for JavaScript Contrib Project
JavaScript
11
star
25

rx.priorityqueue

Standalone Priority Queue from the RxJS library
JavaScript
10
star
26

RxJS-Dojo

Reactive Extensions bindings for the Dojo Toolkit
JavaScript
10
star
27

RxJS-ExtJS

Ext JS Bindings for the Reactive Extensions for JavaScript (RxJS)
JavaScript
9
star
28

Rx-Edge

Reactive Extensions for Edge.js
JavaScript
5
star
29

RxJS-MooTools

MooTools Bindings for the Reactive Extensions for JavaScript (RxJS)
JavaScript
4
star
30

IxJS-ES6

An ES6 version of the Interactive Extensions for JavaScript (IxJS)
JavaScript
3
star
31

RxJS6

2
star
32

Rx-Summit-2013

Reactive Extensions Summit 2013
2
star
33

blog-posts

Blog posts for posting about Rx
1
star
34

RxJSx

An experimental version of the Reactive Extensions
JavaScript
1
star