Skip to content

Commit

Permalink
0.6.1: Minor updates
Browse files Browse the repository at this point in the history
  • Loading branch information
Download committed Jul 3, 2017
1 parent 23b9ff6 commit a818c4b
Show file tree
Hide file tree
Showing 4 changed files with 89 additions and 89 deletions.
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# mics <sup><sub>0.6.0</sub></sup>
# mics <sup><sub>0.6.1</sub></sup>
### Multiple Inheritance Class System
**Intuitive mixins for ES6 classes**

Expand Down Expand Up @@ -26,8 +26,8 @@ npm install --save mics
```

## Direct download
* [mics.umd.js](https://cdn.rawgit.com/download/mics/0.6.0/dist/mics.umd.js) (universal module works in browser and node)
* [mics.min.js](https://cdn.rawgit.com/download/mics/0.6.0/dist/mics.min.js) (minified version of universal module file)
* [mics.umd.js](https://cdn.rawgit.com/download/mics/0.6.1/dist/mics.umd.js) (universal module works in browser and node)
* [mics.min.js](https://cdn.rawgit.com/download/mics/0.6.1/dist/mics.min.js) (minified version of universal module file)


## Include in your app
Expand Down Expand Up @@ -55,7 +55,7 @@ define(['mics'], function(mics){

### Script tag
```html
<script src="https://cdn.rawgit.com/download/mics/0.6.0/dist/mics.min.js"></script>
<script src="https://cdn.rawgit.com/download/mics/0.6.1/dist/mics.min.js"></script>
<script>
var mix = mics.mix
var is = mics.is
Expand Down
166 changes: 83 additions & 83 deletions dist/mics.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -8639,115 +8639,115 @@ describe('is(x , type)', function () {
__webpack_require__.i(__WEBPACK_IMPORTED_MODULE_1_chai__["expect"])(__webpack_require__.i(__WEBPACK_IMPORTED_MODULE_4____["b" /* is */])(function (x) {}, 'string')).to.eq(false);
__webpack_require__.i(__WEBPACK_IMPORTED_MODULE_1_chai__["expect"])(__webpack_require__.i(__WEBPACK_IMPORTED_MODULE_4____["b" /* is */])(function (x, y) {}, 'string')).to.eq(false);
});
});

describe('like(type)', function () {
it('is a function', function () {
__webpack_require__.i(__WEBPACK_IMPORTED_MODULE_1_chai__["expect"])(__WEBPACK_IMPORTED_MODULE_4____["c" /* like */]).to.be.a('function');
});
it('tests whether `x` can be treated as `type` (has the same interface)', function () {
var Looker = __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_4____["a" /* mix */])(function (superclass) {
return function (_superclass26) {
_inherits(Looker, _superclass26);

function Looker() {
_classCallCheck(this, Looker);

return _possibleConstructorReturn(this, (Looker.__proto__ || Object.getPrototypeOf(Looker)).apply(this, arguments));
}
describe('like(type)', function () {
it('is a function', function () {
__webpack_require__.i(__WEBPACK_IMPORTED_MODULE_1_chai__["expect"])(__WEBPACK_IMPORTED_MODULE_4____["c" /* like */]).to.be.a('function');
});
it('tests whether `x` can be treated as `type` (has the same interface)', function () {
var Looker = __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_4____["a" /* mix */])(function (superclass) {
return function (_superclass26) {
_inherits(Looker, _superclass26);

_createClass(Looker, [{
key: 'look',
value: function look() {}
}]);
function Looker() {
_classCallCheck(this, Looker);

return Looker;
}(superclass);
});
__webpack_require__.i(__WEBPACK_IMPORTED_MODULE_1_chai__["expect"])(__webpack_require__.i(__WEBPACK_IMPORTED_MODULE_4____["c" /* like */])('Hi', Looker)).to.eq(false);
__webpack_require__.i(__WEBPACK_IMPORTED_MODULE_1_chai__["expect"])(__webpack_require__.i(__WEBPACK_IMPORTED_MODULE_4____["c" /* like */])(8, Looker)).to.eq(false);
__webpack_require__.i(__WEBPACK_IMPORTED_MODULE_1_chai__["expect"])(__webpack_require__.i(__WEBPACK_IMPORTED_MODULE_4____["c" /* like */])({}, Looker)).to.eq(false);
__webpack_require__.i(__WEBPACK_IMPORTED_MODULE_1_chai__["expect"])(__webpack_require__.i(__WEBPACK_IMPORTED_MODULE_4____["c" /* like */])(new Looker(), Looker)).to.eq(true);
__webpack_require__.i(__WEBPACK_IMPORTED_MODULE_1_chai__["expect"])(__webpack_require__.i(__WEBPACK_IMPORTED_MODULE_4____["c" /* like */])({
look: function look() {}
}, Looker)).to.eq(true);
__webpack_require__.i(__WEBPACK_IMPORTED_MODULE_1_chai__["expect"])(__webpack_require__.i(__WEBPACK_IMPORTED_MODULE_4____["c" /* like */])({
walk: function walk() {}
}, Looker)).to.eq(false);

var Base = function () {
function Base() {
_classCallCheck(this, Base);
return _possibleConstructorReturn(this, (Looker.__proto__ || Object.getPrototypeOf(Looker)).apply(this, arguments));
}

_createClass(Base, [{
_createClass(Looker, [{
key: 'look',
value: function look() {}
}]);

return Base;
}();

__webpack_require__.i(__WEBPACK_IMPORTED_MODULE_1_chai__["expect"])(__webpack_require__.i(__WEBPACK_IMPORTED_MODULE_4____["c" /* like */])(Base, Looker)).to.eq(true);
__webpack_require__.i(__WEBPACK_IMPORTED_MODULE_1_chai__["expect"])(__webpack_require__.i(__WEBPACK_IMPORTED_MODULE_4____["c" /* like */])(new Base(), Looker)).to.eq(true);
return Looker;
}(superclass);
});
__webpack_require__.i(__WEBPACK_IMPORTED_MODULE_1_chai__["expect"])(__webpack_require__.i(__WEBPACK_IMPORTED_MODULE_4____["c" /* like */])('Hi', Looker)).to.eq(false);
__webpack_require__.i(__WEBPACK_IMPORTED_MODULE_1_chai__["expect"])(__webpack_require__.i(__WEBPACK_IMPORTED_MODULE_4____["c" /* like */])(8, Looker)).to.eq(false);
__webpack_require__.i(__WEBPACK_IMPORTED_MODULE_1_chai__["expect"])(__webpack_require__.i(__WEBPACK_IMPORTED_MODULE_4____["c" /* like */])({}, Looker)).to.eq(false);
__webpack_require__.i(__WEBPACK_IMPORTED_MODULE_1_chai__["expect"])(__webpack_require__.i(__WEBPACK_IMPORTED_MODULE_4____["c" /* like */])(new Looker(), Looker)).to.eq(true);
__webpack_require__.i(__WEBPACK_IMPORTED_MODULE_1_chai__["expect"])(__webpack_require__.i(__WEBPACK_IMPORTED_MODULE_4____["c" /* like */])({
look: function look() {}
}, Looker)).to.eq(true);
__webpack_require__.i(__WEBPACK_IMPORTED_MODULE_1_chai__["expect"])(__webpack_require__.i(__WEBPACK_IMPORTED_MODULE_4____["c" /* like */])({
walk: function walk() {}
}, Looker)).to.eq(false);

var Base = function () {
function Base() {
_classCallCheck(this, Base);
}

var Derived = function (_Base) {
_inherits(Derived, _Base);
_createClass(Base, [{
key: 'look',
value: function look() {}
}]);

function Derived() {
_classCallCheck(this, Derived);
return Base;
}();

return _possibleConstructorReturn(this, (Derived.__proto__ || Object.getPrototypeOf(Derived)).apply(this, arguments));
}
__webpack_require__.i(__WEBPACK_IMPORTED_MODULE_1_chai__["expect"])(__webpack_require__.i(__WEBPACK_IMPORTED_MODULE_4____["c" /* like */])(Base, Looker)).to.eq(true);
__webpack_require__.i(__WEBPACK_IMPORTED_MODULE_1_chai__["expect"])(__webpack_require__.i(__WEBPACK_IMPORTED_MODULE_4____["c" /* like */])(new Base(), Looker)).to.eq(true);

return Derived;
}(Base);
var Derived = function (_Base) {
_inherits(Derived, _Base);

__webpack_require__.i(__WEBPACK_IMPORTED_MODULE_1_chai__["expect"])(__webpack_require__.i(__WEBPACK_IMPORTED_MODULE_4____["c" /* like */])(Derived, Looker)).to.eq(true);
__webpack_require__.i(__WEBPACK_IMPORTED_MODULE_1_chai__["expect"])(__webpack_require__.i(__WEBPACK_IMPORTED_MODULE_4____["c" /* like */])(new Derived(), Looker)).to.eq(true);
});
function Derived() {
_classCallCheck(this, Derived);

it('allows mixins to be used as interfaces', function (done) {
var expected = 'Hello, World!';
var Thenable = __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_4____["a" /* mix */])(function (superclass) {
return function (_superclass27) {
_inherits(Thenable, _superclass27);
return _possibleConstructorReturn(this, (Derived.__proto__ || Object.getPrototypeOf(Derived)).apply(this, arguments));
}

function Thenable() {
_classCallCheck(this, Thenable);
return Derived;
}(Base);

return _possibleConstructorReturn(this, (Thenable.__proto__ || Object.getPrototypeOf(Thenable)).apply(this, arguments));
}
__webpack_require__.i(__WEBPACK_IMPORTED_MODULE_1_chai__["expect"])(__webpack_require__.i(__WEBPACK_IMPORTED_MODULE_4____["c" /* like */])(Derived, Looker)).to.eq(true);
__webpack_require__.i(__WEBPACK_IMPORTED_MODULE_1_chai__["expect"])(__webpack_require__.i(__WEBPACK_IMPORTED_MODULE_4____["c" /* like */])(new Derived(), Looker)).to.eq(true);
});

_createClass(Thenable, [{
key: 'then',
value: function then(results) {}
}]);
it('allows mixins to be used as interfaces', function (done) {
var expected = 'Hello, World!';
var Thenable = __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_4____["a" /* mix */])(function (superclass) {
return function (_superclass27) {
_inherits(Thenable, _superclass27);

return Thenable;
}(superclass);
});
function Thenable() {
_classCallCheck(this, Thenable);

var MyPromise = function () {
function MyPromise() {
_classCallCheck(this, MyPromise);
return _possibleConstructorReturn(this, (Thenable.__proto__ || Object.getPrototypeOf(Thenable)).apply(this, arguments));
}

_createClass(MyPromise, [{
_createClass(Thenable, [{
key: 'then',
value: function then(resolve, reject) {
resolve(expected);
}
value: function then(results) {}
}]);

return MyPromise;
}();
return Thenable;
}(superclass);
});

var promise = new MyPromise();
__webpack_require__.i(__WEBPACK_IMPORTED_MODULE_1_chai__["expect"])(__webpack_require__.i(__WEBPACK_IMPORTED_MODULE_4____["c" /* like */])(promise, Thenable)).to.eq(true);
Promise.resolve(promise).then(function (result) {
__webpack_require__.i(__WEBPACK_IMPORTED_MODULE_1_chai__["expect"])(result).to.eq(expected);
done();
});
var MyPromise = function () {
function MyPromise() {
_classCallCheck(this, MyPromise);
}

_createClass(MyPromise, [{
key: 'then',
value: function then(resolve, reject) {
resolve(expected);
}
}]);

return MyPromise;
}();

var promise = new MyPromise();
__webpack_require__.i(__WEBPACK_IMPORTED_MODULE_1_chai__["expect"])(__webpack_require__.i(__WEBPACK_IMPORTED_MODULE_4____["c" /* like */])(promise, Thenable)).to.eq(true);
Promise.resolve(promise).then(function (result) {
__webpack_require__.i(__WEBPACK_IMPORTED_MODULE_1_chai__["expect"])(result).to.eq(expected);
done();
});
});
});
Expand Down
2 changes: 1 addition & 1 deletion dist/mics.spec.js.map

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "mics",
"version": "0.6.0",
"version": "0.6.1",
"description": "Multiple Inheritance Class System: Intuitive mixins for ES6 classes",
"main": "dist/mics.cjs.js",
"module": "dist/mics.es.js",
Expand Down

0 comments on commit a818c4b

Please sign in to comment.