Skip to content

Commit 58739d3

Browse files
Adding files
1 parent 8d6a3ab commit 58739d3

File tree

4 files changed

+56
-0
lines changed

4 files changed

+56
-0
lines changed

src/headers/intro.js

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
;(function (root, factory) {
2+
var objectTypes = {
3+
'boolean': false,
4+
'function': true,
5+
'object': true,
6+
'number': false,
7+
'string': false,
8+
'undefined': false
9+
};
10+
11+
var root = (objectTypes[typeof window] && window) || this,
12+
freeExports = objectTypes[typeof exports] && exports && !exports.nodeType && exports,
13+
freeModule = objectTypes[typeof module] && module && !module.nodeType && module,
14+
moduleExports = freeModule && freeModule.exports === freeExports && freeExports,
15+
freeGlobal = objectTypes[typeof global] && global;
16+
17+
if (freeGlobal && (freeGlobal.global === freeGlobal || freeGlobal.window === freeGlobal)) {
18+
root = freeGlobal;
19+
}
20+
21+
// Because of build optimizers
22+
if (typeof define === 'function' && define.amd) {
23+
define(['rx', 'angular', 'exports'], function (Rx, angular, exports) {
24+
root.Rx = factory(root, exports, Rx, angular);
25+
return root.Rx;
26+
});
27+
} else if (typeof module == 'object' && module && module.exports == freeExports) {
28+
module.exports = factory(root, module.exports, require('rx'), require('angular'));
29+
} else {
30+
root.Rx = factory(root, {}, root.Rx, root.angular);
31+
}
32+
}(this, function (global, exp, Rx, angular, undefined) {

src/headers/license.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
// Copyright (c) Microsoft Open Technologies, Inc. All rights reserved. See License.txt in the project root for license information.

src/headers/outro.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
return Rx;
2+
}));

src/internal/trycatch.js

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
var errorObj = {e: {}};
2+
3+
function tryCatcherGen(tryCatchTarget) {
4+
return function tryCatcher() {
5+
try {
6+
return tryCatchTarget.apply(this, arguments);
7+
} catch (e) {
8+
errorObj.e = e;
9+
return errorObj;
10+
}
11+
};
12+
}
13+
14+
function tryCatch(fn) {
15+
if (!isFunction(fn)) { throw new TypeError('fn must be a function'); }
16+
return tryCatcherGen(fn);
17+
}
18+
19+
function thrower(e) {
20+
throw e;
21+
}

0 commit comments

Comments
 (0)