Add files
This commit is contained in:
commit
bb80829159
18195 changed files with 2122994 additions and 0 deletions
46
509bba0_unpacked_with_node_modules/~/react-class/autoBind.js
generated
vendored
Executable file
46
509bba0_unpacked_with_node_modules/~/react-class/autoBind.js
generated
vendored
Executable file
|
@ -0,0 +1,46 @@
|
|||
"use strict";
|
||||
|
||||
var skipMethods = {
|
||||
'constructor': 1,
|
||||
'render': 1,
|
||||
'shouldComponentUpdate': 1,
|
||||
'componentWillMount': 1,
|
||||
'componentDidMount': 1,
|
||||
'componentWillReceiveProps': 1,
|
||||
'componentWillUpdate': 1,
|
||||
'componentDidUpdate': 1,
|
||||
'componentWillUnmount': 1
|
||||
}
|
||||
|
||||
function autoBind(object, filter){
|
||||
var proto = object.constructor.prototype
|
||||
|
||||
var filterFn = typeof filter == 'function' ?
|
||||
filter:
|
||||
filter && typeof filter == 'object' ?
|
||||
function(key) {
|
||||
return !filter[key] && skipMethods[key] !== 1 && typeof proto[key] === 'function'
|
||||
}:
|
||||
function(key) {
|
||||
return skipMethods[key] !== 1 && typeof proto[key] === 'function'
|
||||
}
|
||||
|
||||
var names = Object.getOwnPropertyNames(proto).filter(filterFn)
|
||||
|
||||
names.push('setState')
|
||||
names.forEach(function(key){
|
||||
object[key] = object[key].bind(object)
|
||||
})
|
||||
|
||||
return object
|
||||
}
|
||||
|
||||
exports.default = autoBind
|
||||
module.exports = exports['default']
|
||||
|
||||
|
||||
//////////////////
|
||||
// WEBPACK FOOTER
|
||||
// ./~/react-class/autoBind.js
|
||||
// module id = 2693
|
||||
// module chunks = 4
|
40
509bba0_unpacked_with_node_modules/~/react-class/lib/index.js
generated
vendored
Executable file
40
509bba0_unpacked_with_node_modules/~/react-class/lib/index.js
generated
vendored
Executable file
|
@ -0,0 +1,40 @@
|
|||
"use strict";
|
||||
|
||||
Object.defineProperty(exports, "__esModule", {
|
||||
value: true
|
||||
});
|
||||
|
||||
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
||||
|
||||
function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
|
||||
|
||||
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
|
||||
|
||||
var React = require('react');
|
||||
var autoBind = require('../autoBind');
|
||||
|
||||
var ReactClass = function (_React$Component) {
|
||||
_inherits(ReactClass, _React$Component);
|
||||
|
||||
function ReactClass(props) {
|
||||
_classCallCheck(this, ReactClass);
|
||||
|
||||
var _this = _possibleConstructorReturn(this, Object.getPrototypeOf(ReactClass).call(this, props));
|
||||
|
||||
autoBind(_this);
|
||||
return _this;
|
||||
}
|
||||
|
||||
return ReactClass;
|
||||
}(React.Component);
|
||||
|
||||
exports.default = ReactClass;
|
||||
exports.autoBind = autoBind;
|
||||
exports.Component = ReactClass;
|
||||
|
||||
|
||||
//////////////////
|
||||
// WEBPACK FOOTER
|
||||
// ./~/react-class/lib/index.js
|
||||
// module id = 2694
|
||||
// module chunks = 4
|
Loading…
Add table
Add a link
Reference in a new issue