Remove unused “jsclass” package

This commit is contained in:
David Greenspan
2014-07-04 10:04:03 -07:00
parent 4c8223c6f4
commit d52b5813ee
4 changed files with 0 additions and 91 deletions

View File

@@ -9,7 +9,6 @@ Package.on_use(function (api) {
api.use('deps');
api.use('underscore'); // only the subset in microscore.js
api.use('htmljs');
api.use('jsclass');
api.use('observe-sequence');
api.add_files([

View File

@@ -1 +0,0 @@
.build*

View File

@@ -1,74 +0,0 @@
JSClass = {};
// _assign is like _.extend or the upcoming Object.assign.
// Copy src's own, enumerable properties onto tgt and return
// tgt.
var _hasOwnProperty = Object.prototype.hasOwnProperty;
var _assign = function (tgt, src) {
for (var k in src) {
if (_hasOwnProperty.call(src, k))
tgt[k] = src[k];
}
return tgt;
};
JSClass._extends = function(cls, supr) {
_assign(cls, supr);
if (Object.create) {
cls.prototype = Object.create(supr.prototype);
} else {
var ctor = function () {};
ctor.prototype = supr.prototype;
cls.prototype = new ctor();
}
cls.prototype.constructor = cls;
cls.__super__ = supr.prototype;
return cls;
};
JSClass._extend = function (props) {
var supr = this !== JSClass ? this : null;
var constructor;
if (props && _hasOwnProperty.call(props, 'constructor')) {
constructor = props.constructor;
} else if (supr) {
constructor = function () { supr.apply(this, arguments); };
} else {
constructor = function () {};
}
if (supr)
JSClass._extends(constructor, supr);
if (props)
_assign(constructor.prototype, props);
return constructor;
};
/**
* JSClass.create([props], [superClass])
*
* Defines a new class and returns it.
*
* * `props` - optional dictionary of properties (typically methods)
* to assign to the prototype. The `constructor` method is special
* and becomes the class constructor.
*
* * `superClass` - optional superclass
*
* If a superclass is provided but no constructor, a default constructor
* is supplied that calls the super constructor.
*
* All classes created in this way have a `.extend(props)` method that
* creates a superclass.
*/
JSClass.create = function (props, superClass) {
if (typeof props === 'function') {
superClass = props;
props = null;
}
var constructor = JSClass._extend.call(superClass || JSClass, props);
constructor.extend = JSClass._extend;
return constructor;
};

View File

@@ -1,15 +0,0 @@
Package.describe({
summary: "JavaScript pattern for classes and inheritance",
internal: true
});
Package.on_use(function (api) {
api.export('JSClass');
api.add_files(['jsclass.js']);
});
Package.on_test(function (api) {
api.use('tinytest');
api.use('jsclass');
//api.add_files('jsclass_tests.js');
});