febs-browser 1.2.13 → 1.3.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/index.ie8.base.js DELETED
@@ -1,197 +0,0 @@
1
- // require('es5-shim');
2
- // require('es5-shim/es5-sham');
3
- var Window = "undefined" != typeof window ? window : ("undefined" != typeof global ? global : ("undefined" != typeof self ? self : undefined));
4
-
5
- if (!Window.__line) {
6
- Window.__line = undefined;
7
- Window.__column = undefined;
8
- }
9
-
10
- // require('console-polyfill');
11
- require('./common/promise-finally-polyfill');
12
- // require('babel-polyfill');
13
- // require('../third-party/bluebird.min.js');
14
- // require('../third-party/bignumber.min.js');
15
-
16
- //
17
- // promise.
18
- Window.Promise = require('./third-party/bluebird.min.js')
19
-
20
- //
21
- // getPrototypeOf
22
- if (typeof Object.getPrototypeOf !== 'function') {
23
- Object.getPrototypeOf =
24
- ''.__proto__ === String.prototype
25
- ? function(object) {
26
- return object.__proto__
27
- }
28
- : function(object) {
29
- // May break if the constructor has been tampered with
30
- return object.constructor.prototype
31
- }
32
- }
33
-
34
- //
35
- // bind.
36
- if (!Function.prototype.bind) {
37
- Function.prototype.bind = function(oThis) {
38
- if (typeof this !== 'function') {
39
- throw new TypeError(
40
- 'Function.prototype.bind - what is trying to be bound is not callable'
41
- )
42
- }
43
- var aArgs = Array.prototype.slice.call(arguments, 1),
44
- fToBind = this,
45
- fNOP = function() {},
46
- fBound = function() {
47
- return fToBind.apply(
48
- this instanceof fNOP && oThis ? this : oThis,
49
- aArgs.concat(Array.prototype.slice.call(arguments))
50
- )
51
- }
52
- fNOP.prototype = this.prototype
53
- fBound.prototype = new fNOP()
54
- return fBound
55
- }
56
- }
57
-
58
- //
59
- // Number.isNaN
60
- if (typeof Number.isNaN !== 'function') {
61
- Number.isNaN = function(num) {
62
- if (typeof num !== 'number') return false;
63
- if (isNaN(num)) return true;
64
- return false;
65
- }
66
- }
67
-
68
- //
69
- // Number.isInteger
70
- if (typeof Number.isInteger !== 'function') {
71
- Number.isInteger = function(num) {
72
- if (typeof num !== 'number') return false;
73
- if (Math.ceil(num) === num) return true;
74
- return false;
75
- }
76
- }
77
-
78
- //
79
- // document.getElementsByClassName
80
- if (Window && !Window.document.getElementsByClassName) {
81
- Window.document.getElementsByClassName = function (className, element) {
82
- var children = (element || Window.document).getElementsByTagName('*');
83
- var elements = new Array();
84
- for (var i = 0; i < children.length; i++) {
85
- var child = children[i];
86
- var classNames = child.className.split(' ');
87
- for (var j = 0; j < classNames.length; j++) {
88
- if (classNames[j] == className) {
89
- elements.push(child);
90
- break;
91
- }
92
- }
93
- }
94
- return elements;
95
- };
96
- }
97
-
98
-
99
- //
100
- // define the animationFrame.
101
- var animationFrame = require('./libs/animationFrame');
102
- var _date = require('./libs/date');
103
- var _utils = require('./libs/utils');
104
- var _string = require('./libs/string');
105
- var _crypt = require('./libs/crypt');
106
- var _cryptMd5 = require('./libs/crypt.md5');
107
- var _cryptSha1 = require('./libs/crypt.sha1');
108
- var _net = require('./libs/net');
109
- var _dom = require('./libs/dom');
110
- var _exception = require('./common/exception');
111
-
112
- //
113
- // define the __debug.
114
- if (!Window['__debug']) {
115
- Window.__debug = false;
116
- }
117
-
118
- //
119
- // define the animationFrame.
120
- if (!Window['requestAnimationFrame'])
121
- Window.requestAnimationFrame = animationFrame.requestAnimationFrame;
122
- if (!Window['cancelAnimationFrame'])
123
- Window.cancelAnimationFrame = animationFrame.cancelAnimationFrame;
124
-
125
-
126
- var febs = {};
127
- febs.__debug = Window.__debug;
128
-
129
- febs.date = _date;
130
- febs.utils = _utils;
131
- febs.string = _string;
132
- febs.crypt = febs.utils.mergeMap(_crypt, _cryptMd5, _cryptSha1);
133
- febs.net = _net
134
- febs['$'] = _dom.CreateDom;
135
- febs.dom = _dom.Dom;
136
- febs.exception = _exception;
137
-
138
- if (!Window['febs'])
139
- Window['febs'] = febs;
140
- else {
141
- Window['febs'].string = Window['febs'].string? febs.utils.mergeMap(Window['febs'].string, febs.string) : febs.string;
142
- Window['febs'].crypt = Window['febs'].crypt? febs.utils.mergeMap(Window['febs'].crypt, febs.crypt) : febs.crypt;
143
- Window['febs'].utils = Window['febs'].utils? febs.utils.mergeMap(Window['febs'].utils, febs.utils) : febs.utils;
144
- Window['febs'].net = Window['febs'].net? febs.utils.mergeMap(Window['febs'].net, febs.net) : febs.net;
145
- Window['febs'].dom = Window['febs'].dom? febs.utils.mergeMap(Window['febs'].dom, febs.dom) : febs.dom;
146
- Window['febs'].exception = Window['febs'].exception? febs.utils.mergeMap(Window['febs'].exception, febs.exception) : febs.exception;
147
- }
148
-
149
- if (!Window['$'])
150
- Window['$'] = febs['$'];
151
- if (!Window['jQuery'])
152
- Window['jQuery'] = febs['$'];
153
-
154
- //
155
- // debug.
156
- //
157
- // if (!console.debug) {
158
- if (Window.console) {
159
- Window.console.debug = function() {
160
- if (Window.__debug) {
161
- var logfoo;
162
- if (Window.console.warn)
163
- logfoo = Window.console.warn;
164
- else
165
- logfoo = Window.console.log;
166
-
167
- for (var i = 0; i < arguments.length; i++) {
168
- logfoo(arguments[i]);
169
- }
170
- }
171
- }
172
- }
173
- // }
174
-
175
-
176
- const __debug = febs.__debug;
177
-
178
- const date = febs.date;
179
- const utils = febs.utils;
180
- const string = febs.string;
181
- const crypt = febs.crypt;
182
- const net = febs.net;
183
- const $ = febs['$'];
184
- const dom = febs.dom;
185
- const exception = febs.exception;
186
-
187
- export {
188
- __debug,
189
- date,
190
- utils,
191
- string,
192
- crypt,
193
- net,
194
- $,
195
- dom,
196
- exception
197
- };
package/index.ie8.js DELETED
@@ -1,26 +0,0 @@
1
- var febs = require('./index.ie8.base');
2
- var _utilsBig = require('./common/utils.bigint');
3
-
4
- const __debug = febs.__debug;
5
- const BigNumber = _utilsBig.BigNumber;
6
- const date = febs.date;
7
- const utils = febs.utils.mergeMap(febs.utils, _utilsBig);
8
- const string = febs.string;
9
- const crypt = febs.crypt;
10
- const net = febs.net;
11
- const $ = febs['$'];
12
- const dom = febs.dom;
13
- const exception = febs.exception;
14
-
15
- export {
16
- __debug,
17
- BigNumber,
18
- date,
19
- utils,
20
- string,
21
- crypt,
22
- net,
23
- $,
24
- dom,
25
- exception
26
- };
@@ -1,25 +0,0 @@
1
- var febs = require('./index.ie8.base');
2
- var _utilsBig = require('./common/utils.bigint.native');
3
-
4
- const __debug = febs.__debug;
5
- const BigNumber = _BigNumber;
6
- const date = febs.date;
7
- const utils = febs.utils.mergeMap(febs.utils, _utilsBig);
8
- const string = febs.string;
9
- const crypt = febs.crypt;
10
- const net = febs.net;
11
- const $ = febs['$'];
12
- const dom = febs.dom;
13
- const exception = febs.exception;
14
-
15
- export {
16
- __debug,
17
- date,
18
- utils,
19
- string,
20
- crypt,
21
- net,
22
- $,
23
- dom,
24
- exception
25
- };