evangelist
Advanced tools
Comparing version 0.12.1 to 0.12.2
"use strict"; | ||
var __importDefault = (this && this.__importDefault) || function (mod) { | ||
return (mod && mod.__esModule) ? mod : { "default": mod }; | ||
}; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
var tslib_1 = require("tslib"); | ||
var compose_1 = tslib_1.__importDefault(require("../compose")); | ||
var compose_1 = __importDefault(require("../compose")); | ||
describe('compose', function () { | ||
@@ -6,0 +8,0 @@ test('basic', function () { |
"use strict"; | ||
var __importDefault = (this && this.__importDefault) || function (mod) { | ||
return (mod && mod.__esModule) ? mod : { "default": mod }; | ||
}; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
var tslib_1 = require("tslib"); | ||
var curry_1 = tslib_1.__importDefault(require("../curry")); | ||
var curry_1 = __importDefault(require("../curry")); | ||
describe('curry', function () { | ||
@@ -6,0 +8,0 @@ test('basic', function () { |
"use strict"; | ||
var __importDefault = (this && this.__importDefault) || function (mod) { | ||
return (mod && mod.__esModule) ? mod : { "default": mod }; | ||
}; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
var tslib_1 = require("tslib"); | ||
var curryRight_1 = tslib_1.__importDefault(require("../curryRight")); | ||
var curryRight_1 = __importDefault(require("../curryRight")); | ||
describe('curryRight', function () { | ||
@@ -6,0 +8,0 @@ test('basic', function () { |
"use strict"; | ||
var __importDefault = (this && this.__importDefault) || function (mod) { | ||
return (mod && mod.__esModule) ? mod : { "default": mod }; | ||
}; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
var tslib_1 = require("tslib"); | ||
var decorate_1 = tslib_1.__importDefault(require("../decorate")); | ||
var decorate_1 = __importDefault(require("../decorate")); | ||
describe('decorate', function () { | ||
@@ -6,0 +8,0 @@ test('basic', function () { |
"use strict"; | ||
var __assign = (this && this.__assign) || function () { | ||
__assign = Object.assign || function(t) { | ||
for (var s, i = 1, n = arguments.length; i < n; i++) { | ||
s = arguments[i]; | ||
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) | ||
t[p] = s[p]; | ||
} | ||
return t; | ||
}; | ||
return __assign.apply(this, arguments); | ||
}; | ||
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { | ||
return new (P || (P = Promise))(function (resolve, reject) { | ||
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } | ||
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } | ||
function step(result) { result.done ? resolve(result.value) : new P(function (resolve) { resolve(result.value); }).then(fulfilled, rejected); } | ||
step((generator = generator.apply(thisArg, _arguments || [])).next()); | ||
}); | ||
}; | ||
var __generator = (this && this.__generator) || function (thisArg, body) { | ||
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g; | ||
return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g; | ||
function verb(n) { return function (v) { return step([n, v]); }; } | ||
function step(op) { | ||
if (f) throw new TypeError("Generator is already executing."); | ||
while (_) try { | ||
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t; | ||
if (y = 0, t) op = [op[0] & 2, t.value]; | ||
switch (op[0]) { | ||
case 0: case 1: t = op; break; | ||
case 4: _.label++; return { value: op[1], done: false }; | ||
case 5: _.label++; y = op[1]; op = [0]; continue; | ||
case 7: op = _.ops.pop(); _.trys.pop(); continue; | ||
default: | ||
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; } | ||
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; } | ||
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; } | ||
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; } | ||
if (t[2]) _.ops.pop(); | ||
_.trys.pop(); continue; | ||
} | ||
op = body.call(thisArg, _); | ||
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; } | ||
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true }; | ||
} | ||
}; | ||
var __importDefault = (this && this.__importDefault) || function (mod) { | ||
return (mod && mod.__esModule) ? mod : { "default": mod }; | ||
}; | ||
var _this = this; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
var tslib_1 = require("tslib"); | ||
var dispatcher_1 = tslib_1.__importDefault(require("../dispatcher")); | ||
var dispatcher_1 = __importDefault(require("../dispatcher")); | ||
describe('dispatcher', function () { | ||
test('basic', function () { return tslib_1.__awaiter(_this, void 0, void 0, function () { | ||
test('basic', function () { return __awaiter(_this, void 0, void 0, function () { | ||
var initialState, actionAdd5, actionDiv2, result; | ||
return tslib_1.__generator(this, function (_a) { | ||
return __generator(this, function (_a) { | ||
switch (_a.label) { | ||
case 0: | ||
initialState = { quarter: 1, year: 2018, sum: 1 }; | ||
actionAdd5 = function (state, next) { return next(tslib_1.__assign({}, state, { sum: state.sum + 5 })); }; | ||
actionDiv2 = function (state, next) { return next(tslib_1.__assign({}, state, { sum: state.sum / 2 })); }; | ||
actionAdd5 = function (state, next) { return next(__assign({}, state, { sum: state.sum + 5 })); }; | ||
actionDiv2 = function (state, next) { return next(__assign({}, state, { sum: state.sum / 2 })); }; | ||
return [4, dispatcher_1.default(initialState, [actionAdd5, actionDiv2])]; | ||
@@ -23,10 +71,10 @@ case 1: | ||
}); }); | ||
test('with subscriber', function () { return tslib_1.__awaiter(_this, void 0, void 0, function () { | ||
test('with subscriber', function () { return __awaiter(_this, void 0, void 0, function () { | ||
var initialState, actionAdd5, actionDiv2, logs, logger, result; | ||
return tslib_1.__generator(this, function (_a) { | ||
return __generator(this, function (_a) { | ||
switch (_a.label) { | ||
case 0: | ||
initialState = { quarter: 1, year: 2018, sum: 1 }; | ||
actionAdd5 = function (state, next) { return next(tslib_1.__assign({}, state, { sum: state.sum + 5 })); }; | ||
actionDiv2 = function (state, next) { return next(tslib_1.__assign({}, state, { sum: state.sum / 2 })); }; | ||
actionAdd5 = function (state, next) { return next(__assign({}, state, { sum: state.sum + 5 })); }; | ||
actionDiv2 = function (state, next) { return next(__assign({}, state, { sum: state.sum / 2 })); }; | ||
logs = []; | ||
@@ -33,0 +81,0 @@ logger = function (x) { return logs.push(x); }; |
"use strict"; | ||
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { | ||
return new (P || (P = Promise))(function (resolve, reject) { | ||
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } | ||
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } | ||
function step(result) { result.done ? resolve(result.value) : new P(function (resolve) { resolve(result.value); }).then(fulfilled, rejected); } | ||
step((generator = generator.apply(thisArg, _arguments || [])).next()); | ||
}); | ||
}; | ||
var __generator = (this && this.__generator) || function (thisArg, body) { | ||
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g; | ||
return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g; | ||
function verb(n) { return function (v) { return step([n, v]); }; } | ||
function step(op) { | ||
if (f) throw new TypeError("Generator is already executing."); | ||
while (_) try { | ||
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t; | ||
if (y = 0, t) op = [op[0] & 2, t.value]; | ||
switch (op[0]) { | ||
case 0: case 1: t = op; break; | ||
case 4: _.label++; return { value: op[1], done: false }; | ||
case 5: _.label++; y = op[1]; op = [0]; continue; | ||
case 7: op = _.ops.pop(); _.trys.pop(); continue; | ||
default: | ||
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; } | ||
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; } | ||
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; } | ||
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; } | ||
if (t[2]) _.ops.pop(); | ||
_.trys.pop(); continue; | ||
} | ||
op = body.call(thisArg, _); | ||
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; } | ||
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true }; | ||
} | ||
}; | ||
var __importDefault = (this && this.__importDefault) || function (mod) { | ||
return (mod && mod.__esModule) ? mod : { "default": mod }; | ||
}; | ||
var _this = this; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
var tslib_1 = require("tslib"); | ||
var emitter_1 = tslib_1.__importDefault(require("../emitter")); | ||
var emitter_1 = __importDefault(require("../emitter")); | ||
describe('emitter', function () { | ||
test('basic', function () { return tslib_1.__awaiter(_this, void 0, void 0, function () { | ||
test('basic', function () { return __awaiter(_this, void 0, void 0, function () { | ||
var sideEffectCounter, subscriberOne, subscriberTwo, events; | ||
return tslib_1.__generator(this, function (_a) { | ||
return __generator(this, function (_a) { | ||
switch (_a.label) { | ||
@@ -26,5 +63,5 @@ case 0: | ||
}); }); | ||
test('with parameters', function () { return tslib_1.__awaiter(_this, void 0, void 0, function () { | ||
test('with parameters', function () { return __awaiter(_this, void 0, void 0, function () { | ||
var sideEffectCounter, subscriberOne, subscriberTwo, events, result; | ||
return tslib_1.__generator(this, function (_a) { | ||
return __generator(this, function (_a) { | ||
switch (_a.label) { | ||
@@ -46,5 +83,5 @@ case 0: | ||
}); }); | ||
test('with wildcard events', function () { return tslib_1.__awaiter(_this, void 0, void 0, function () { | ||
test('with wildcard events', function () { return __awaiter(_this, void 0, void 0, function () { | ||
var sideEffectCounter, subscriberOne, subscriberTwo, events; | ||
return tslib_1.__generator(this, function (_a) { | ||
return __generator(this, function (_a) { | ||
switch (_a.label) { | ||
@@ -67,5 +104,5 @@ case 0: | ||
}); }); | ||
test('with subsriber', function () { return tslib_1.__awaiter(_this, void 0, void 0, function () { | ||
test('with subsriber', function () { return __awaiter(_this, void 0, void 0, function () { | ||
var sideEffectCounter, subscriberOne, subscriberTwo, events, logs, logger, result; | ||
return tslib_1.__generator(this, function (_a) { | ||
return __generator(this, function (_a) { | ||
switch (_a.label) { | ||
@@ -72,0 +109,0 @@ case 0: |
"use strict"; | ||
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { | ||
return new (P || (P = Promise))(function (resolve, reject) { | ||
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } | ||
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } | ||
function step(result) { result.done ? resolve(result.value) : new P(function (resolve) { resolve(result.value); }).then(fulfilled, rejected); } | ||
step((generator = generator.apply(thisArg, _arguments || [])).next()); | ||
}); | ||
}; | ||
var __generator = (this && this.__generator) || function (thisArg, body) { | ||
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g; | ||
return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g; | ||
function verb(n) { return function (v) { return step([n, v]); }; } | ||
function step(op) { | ||
if (f) throw new TypeError("Generator is already executing."); | ||
while (_) try { | ||
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t; | ||
if (y = 0, t) op = [op[0] & 2, t.value]; | ||
switch (op[0]) { | ||
case 0: case 1: t = op; break; | ||
case 4: _.label++; return { value: op[1], done: false }; | ||
case 5: _.label++; y = op[1]; op = [0]; continue; | ||
case 7: op = _.ops.pop(); _.trys.pop(); continue; | ||
default: | ||
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; } | ||
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; } | ||
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; } | ||
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; } | ||
if (t[2]) _.ops.pop(); | ||
_.trys.pop(); continue; | ||
} | ||
op = body.call(thisArg, _); | ||
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; } | ||
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true }; | ||
} | ||
}; | ||
var __importDefault = (this && this.__importDefault) || function (mod) { | ||
return (mod && mod.__esModule) ? mod : { "default": mod }; | ||
}; | ||
var _this = this; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
var tslib_1 = require("tslib"); | ||
var iterate_1 = tslib_1.__importDefault(require("../iterate")); | ||
var compose_1 = tslib_1.__importDefault(require("../compose")); | ||
var iterate_1 = __importDefault(require("../iterate")); | ||
var compose_1 = __importDefault(require("../compose")); | ||
describe('iterate', function () { | ||
test('basic', function () { return tslib_1.__awaiter(_this, void 0, void 0, function () { | ||
test('basic', function () { return __awaiter(_this, void 0, void 0, function () { | ||
var gen1, total, func1, result; | ||
return tslib_1.__generator(this, function (_a) { | ||
return __generator(this, function (_a) { | ||
switch (_a.label) { | ||
case 0: | ||
gen1 = function gen() { | ||
return tslib_1.__generator(this, function (_a) { | ||
return __generator(this, function (_a) { | ||
switch (_a.label) { | ||
@@ -39,5 +76,5 @@ case 0: return [4, 1]; | ||
}); }); | ||
test('async', function () { return tslib_1.__awaiter(_this, void 0, void 0, function () { | ||
test('async', function () { return __awaiter(_this, void 0, void 0, function () { | ||
var delay, gen1, total, func1, result; | ||
return tslib_1.__generator(this, function (_a) { | ||
return __generator(this, function (_a) { | ||
switch (_a.label) { | ||
@@ -49,3 +86,3 @@ case 0: | ||
gen1 = function gen() { | ||
return tslib_1.__generator(this, function (_a) { | ||
return __generator(this, function (_a) { | ||
switch (_a.label) { | ||
@@ -67,5 +104,5 @@ case 0: return [4, 1]; | ||
func1 = function func(x) { | ||
return tslib_1.__awaiter(this, void 0, void 0, function () { | ||
return __awaiter(this, void 0, void 0, function () { | ||
var _a; | ||
return tslib_1.__generator(this, function (_b) { | ||
return __generator(this, function (_b) { | ||
switch (_b.label) { | ||
@@ -90,10 +127,10 @@ case 0: | ||
}); }); | ||
test('with compose', function () { return tslib_1.__awaiter(_this, void 0, void 0, function () { | ||
test('with compose', function () { return __awaiter(_this, void 0, void 0, function () { | ||
var gen1, total, getValue, add5, sumWithTotal, result; | ||
var _this = this; | ||
return tslib_1.__generator(this, function (_a) { | ||
return __generator(this, function (_a) { | ||
switch (_a.label) { | ||
case 0: | ||
gen1 = function gen() { | ||
return tslib_1.__generator(this, function (_a) { | ||
return __generator(this, function (_a) { | ||
switch (_a.label) { | ||
@@ -115,3 +152,3 @@ case 0: return [4, { value: 1 }]; | ||
getValue = function (x) { return Promise.resolve(x.value); }; | ||
add5 = function (value) { return tslib_1.__awaiter(_this, void 0, void 0, function () { return tslib_1.__generator(this, function (_a) { | ||
add5 = function (value) { return __awaiter(_this, void 0, void 0, function () { return __generator(this, function (_a) { | ||
switch (_a.label) { | ||
@@ -122,5 +159,5 @@ case 0: return [4, value]; | ||
}); }); }; | ||
sumWithTotal = function (value) { return tslib_1.__awaiter(_this, void 0, void 0, function () { | ||
sumWithTotal = function (value) { return __awaiter(_this, void 0, void 0, function () { | ||
var _a; | ||
return tslib_1.__generator(this, function (_b) { | ||
return __generator(this, function (_b) { | ||
switch (_b.label) { | ||
@@ -127,0 +164,0 @@ case 0: |
"use strict"; | ||
var __read = (this && this.__read) || function (o, n) { | ||
var m = typeof Symbol === "function" && o[Symbol.iterator]; | ||
if (!m) return o; | ||
var i = m.call(o), r, ar = [], e; | ||
try { | ||
while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value); | ||
} | ||
catch (error) { e = { error: error }; } | ||
finally { | ||
try { | ||
if (r && !r.done && (m = i["return"])) m.call(i); | ||
} | ||
finally { if (e) throw e.error; } | ||
} | ||
return ar; | ||
}; | ||
var __spread = (this && this.__spread) || function () { | ||
for (var ar = [], i = 0; i < arguments.length; i++) ar = ar.concat(__read(arguments[i])); | ||
return ar; | ||
}; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
var tslib_1 = require("tslib"); | ||
function compose() { | ||
@@ -15,3 +34,3 @@ var funcs = []; | ||
} | ||
return currentFunction(previousFunction.apply(void 0, tslib_1.__spread(args))); | ||
return currentFunction(previousFunction.apply(void 0, __spread(args))); | ||
}; | ||
@@ -18,0 +37,0 @@ }); |
23
curry.js
"use strict"; | ||
var __read = (this && this.__read) || function (o, n) { | ||
var m = typeof Symbol === "function" && o[Symbol.iterator]; | ||
if (!m) return o; | ||
var i = m.call(o), r, ar = [], e; | ||
try { | ||
while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value); | ||
} | ||
catch (error) { e = { error: error }; } | ||
finally { | ||
try { | ||
if (r && !r.done && (m = i["return"])) m.call(i); | ||
} | ||
finally { if (e) throw e.error; } | ||
} | ||
return ar; | ||
}; | ||
var __spread = (this && this.__spread) || function () { | ||
for (var ar = [], i = 0; i < arguments.length; i++) ar = ar.concat(__read(arguments[i])); | ||
return ar; | ||
}; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
var tslib_1 = require("tslib"); | ||
function curry(func) { | ||
@@ -14,3 +33,3 @@ var args = []; | ||
} | ||
return func.apply(void 0, tslib_1.__spread(args, args2)); | ||
return func.apply(void 0, __spread(args, args2)); | ||
}; | ||
@@ -17,0 +36,0 @@ } |
"use strict"; | ||
var __read = (this && this.__read) || function (o, n) { | ||
var m = typeof Symbol === "function" && o[Symbol.iterator]; | ||
if (!m) return o; | ||
var i = m.call(o), r, ar = [], e; | ||
try { | ||
while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value); | ||
} | ||
catch (error) { e = { error: error }; } | ||
finally { | ||
try { | ||
if (r && !r.done && (m = i["return"])) m.call(i); | ||
} | ||
finally { if (e) throw e.error; } | ||
} | ||
return ar; | ||
}; | ||
var __spread = (this && this.__spread) || function () { | ||
for (var ar = [], i = 0; i < arguments.length; i++) ar = ar.concat(__read(arguments[i])); | ||
return ar; | ||
}; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
var tslib_1 = require("tslib"); | ||
function curryRight(func) { | ||
@@ -14,3 +33,3 @@ var args = []; | ||
} | ||
return func.apply(void 0, tslib_1.__spread(args2, args)); | ||
return func.apply(void 0, __spread(args2, args)); | ||
}; | ||
@@ -17,0 +36,0 @@ } |
"use strict"; | ||
var __read = (this && this.__read) || function (o, n) { | ||
var m = typeof Symbol === "function" && o[Symbol.iterator]; | ||
if (!m) return o; | ||
var i = m.call(o), r, ar = [], e; | ||
try { | ||
while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value); | ||
} | ||
catch (error) { e = { error: error }; } | ||
finally { | ||
try { | ||
if (r && !r.done && (m = i["return"])) m.call(i); | ||
} | ||
finally { if (e) throw e.error; } | ||
} | ||
return ar; | ||
}; | ||
var __spread = (this && this.__spread) || function () { | ||
for (var ar = [], i = 0; i < arguments.length; i++) ar = ar.concat(__read(arguments[i])); | ||
return ar; | ||
}; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
var tslib_1 = require("tslib"); | ||
function decorate(target, decorator) { | ||
@@ -10,3 +29,3 @@ return function func() { | ||
} | ||
return decorator.apply(void 0, tslib_1.__spread(args, [target])); | ||
return decorator.apply(void 0, __spread(args, [target])); | ||
}; | ||
@@ -13,0 +32,0 @@ } |
"use strict"; | ||
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { | ||
return new (P || (P = Promise))(function (resolve, reject) { | ||
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } | ||
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } | ||
function step(result) { result.done ? resolve(result.value) : new P(function (resolve) { resolve(result.value); }).then(fulfilled, rejected); } | ||
step((generator = generator.apply(thisArg, _arguments || [])).next()); | ||
}); | ||
}; | ||
var __generator = (this && this.__generator) || function (thisArg, body) { | ||
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g; | ||
return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g; | ||
function verb(n) { return function (v) { return step([n, v]); }; } | ||
function step(op) { | ||
if (f) throw new TypeError("Generator is already executing."); | ||
while (_) try { | ||
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t; | ||
if (y = 0, t) op = [op[0] & 2, t.value]; | ||
switch (op[0]) { | ||
case 0: case 1: t = op; break; | ||
case 4: _.label++; return { value: op[1], done: false }; | ||
case 5: _.label++; y = op[1]; op = [0]; continue; | ||
case 7: op = _.ops.pop(); _.trys.pop(); continue; | ||
default: | ||
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; } | ||
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; } | ||
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; } | ||
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; } | ||
if (t[2]) _.ops.pop(); | ||
_.trys.pop(); continue; | ||
} | ||
op = body.call(thisArg, _); | ||
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; } | ||
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true }; | ||
} | ||
}; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
var tslib_1 = require("tslib"); | ||
function dispatcher(state, mutators, subscribers) { | ||
return tslib_1.__awaiter(this, void 0, void 0, function () { | ||
return __awaiter(this, void 0, void 0, function () { | ||
var hasSubscribers, index, next; | ||
var _this = this; | ||
return tslib_1.__generator(this, function (_a) { | ||
return __generator(this, function (_a) { | ||
hasSubscribers = (subscribers !== undefined); | ||
index = 0; | ||
next = function (newState) { return tslib_1.__awaiter(_this, void 0, void 0, function () { | ||
next = function (newState) { return __awaiter(_this, void 0, void 0, function () { | ||
var layer; | ||
var _this = this; | ||
return tslib_1.__generator(this, function (_a) { | ||
return __generator(this, function (_a) { | ||
layer = mutators[index]; | ||
@@ -20,4 +54,4 @@ if (layer === undefined) { | ||
index += 1; | ||
return [2, layer(newState, function (currentState) { return tslib_1.__awaiter(_this, void 0, void 0, function () { | ||
return tslib_1.__generator(this, function (_a) { | ||
return [2, layer(newState, function (currentState) { return __awaiter(_this, void 0, void 0, function () { | ||
return __generator(this, function (_a) { | ||
if (hasSubscribers) { | ||
@@ -24,0 +58,0 @@ subscribers.forEach(function (subscriber) { |
"use strict"; | ||
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { | ||
return new (P || (P = Promise))(function (resolve, reject) { | ||
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } | ||
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } | ||
function step(result) { result.done ? resolve(result.value) : new P(function (resolve) { resolve(result.value); }).then(fulfilled, rejected); } | ||
step((generator = generator.apply(thisArg, _arguments || [])).next()); | ||
}); | ||
}; | ||
var __generator = (this && this.__generator) || function (thisArg, body) { | ||
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g; | ||
return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g; | ||
function verb(n) { return function (v) { return step([n, v]); }; } | ||
function step(op) { | ||
if (f) throw new TypeError("Generator is already executing."); | ||
while (_) try { | ||
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t; | ||
if (y = 0, t) op = [op[0] & 2, t.value]; | ||
switch (op[0]) { | ||
case 0: case 1: t = op; break; | ||
case 4: _.label++; return { value: op[1], done: false }; | ||
case 5: _.label++; y = op[1]; op = [0]; continue; | ||
case 7: op = _.ops.pop(); _.trys.pop(); continue; | ||
default: | ||
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; } | ||
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; } | ||
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; } | ||
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; } | ||
if (t[2]) _.ops.pop(); | ||
_.trys.pop(); continue; | ||
} | ||
op = body.call(thisArg, _); | ||
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; } | ||
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true }; | ||
} | ||
}; | ||
var __read = (this && this.__read) || function (o, n) { | ||
var m = typeof Symbol === "function" && o[Symbol.iterator]; | ||
if (!m) return o; | ||
var i = m.call(o), r, ar = [], e; | ||
try { | ||
while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value); | ||
} | ||
catch (error) { e = { error: error }; } | ||
finally { | ||
try { | ||
if (r && !r.done && (m = i["return"])) m.call(i); | ||
} | ||
finally { if (e) throw e.error; } | ||
} | ||
return ar; | ||
}; | ||
var __spread = (this && this.__spread) || function () { | ||
for (var ar = [], i = 0; i < arguments.length; i++) ar = ar.concat(__read(arguments[i])); | ||
return ar; | ||
}; | ||
var __values = (this && this.__values) || function (o) { | ||
var m = typeof Symbol === "function" && o[Symbol.iterator], i = 0; | ||
if (m) return m.call(o); | ||
return { | ||
next: function () { | ||
if (o && i >= o.length) o = void 0; | ||
return { value: o && o[i++], done: !o }; | ||
} | ||
}; | ||
}; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
var tslib_1 = require("tslib"); | ||
function emitter(events, eventName, args, subscribers) { | ||
return tslib_1.__awaiter(this, void 0, void 0, function () { | ||
return __awaiter(this, void 0, void 0, function () { | ||
var isEventWildcard, argsPass, _loop_1, _a, _b, eventKey, e_1_1; | ||
var e_1, _c; | ||
return tslib_1.__generator(this, function (_d) { | ||
return __generator(this, function (_d) { | ||
switch (_d.label) { | ||
@@ -16,3 +80,3 @@ case 0: | ||
var e_2, _c; | ||
return tslib_1.__generator(this, function (_d) { | ||
return __generator(this, function (_d) { | ||
switch (_d.label) { | ||
@@ -24,3 +88,3 @@ case 0: | ||
_loop_2 = function (eventSubscriber) { | ||
return tslib_1.__generator(this, function (_a) { | ||
return __generator(this, function (_a) { | ||
switch (_a.label) { | ||
@@ -33,3 +97,3 @@ case 0: | ||
} | ||
return [4, eventSubscriber.apply(void 0, tslib_1.__spread(argsPass))]; | ||
return [4, eventSubscriber.apply(void 0, __spread(argsPass))]; | ||
case 1: | ||
@@ -44,3 +108,3 @@ _a.sent(); | ||
_d.trys.push([1, 6, 7, 8]); | ||
_a = (e_2 = void 0, tslib_1.__values(events[eventKey])), _b = _a.next(); | ||
_a = (e_2 = void 0, __values(events[eventKey])), _b = _a.next(); | ||
_d.label = 2; | ||
@@ -75,3 +139,3 @@ case 2: | ||
_d.trys.push([1, 6, 7, 8]); | ||
_a = tslib_1.__values(Object.keys(events)), _b = _a.next(); | ||
_a = __values(Object.keys(events)), _b = _a.next(); | ||
_d.label = 2; | ||
@@ -78,0 +142,0 @@ case 2: |
18
index.js
"use strict"; | ||
var __importDefault = (this && this.__importDefault) || function (mod) { | ||
return (mod && mod.__esModule) ? mod : { "default": mod }; | ||
}; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
var tslib_1 = require("tslib"); | ||
var compose_1 = tslib_1.__importDefault(require("./compose")); | ||
var compose_1 = __importDefault(require("./compose")); | ||
exports.compose = compose_1.default; | ||
var curry_1 = tslib_1.__importDefault(require("./curry")); | ||
var curry_1 = __importDefault(require("./curry")); | ||
exports.curry = curry_1.default; | ||
var curryRight_1 = tslib_1.__importDefault(require("./curryRight")); | ||
var curryRight_1 = __importDefault(require("./curryRight")); | ||
exports.curryRight = curryRight_1.default; | ||
var decorate_1 = tslib_1.__importDefault(require("./decorate")); | ||
var decorate_1 = __importDefault(require("./decorate")); | ||
exports.decorate = decorate_1.default; | ||
var dispatcher_1 = tslib_1.__importDefault(require("./dispatcher")); | ||
var dispatcher_1 = __importDefault(require("./dispatcher")); | ||
exports.dispatcher = dispatcher_1.default; | ||
var emitter_1 = tslib_1.__importDefault(require("./emitter")); | ||
var emitter_1 = __importDefault(require("./emitter")); | ||
exports.emitter = emitter_1.default; | ||
var iterate_1 = tslib_1.__importDefault(require("./iterate")); | ||
var iterate_1 = __importDefault(require("./iterate")); | ||
exports.iterate = iterate_1.default; | ||
//# sourceMappingURL=index.js.map |
@@ -1,2 +0,2 @@ | ||
(function(g,f){typeof exports==='object'&&typeof module!=='undefined'?f(exports,require('tslib')):typeof define==='function'&&define.amd?define(['exports','tslib'],f):(g=g||self,f(g.evangelist={},g.tslib_1));}(this,function(exports, tslib_1){'use strict';function compose() { | ||
(function(g,f){typeof exports==='object'&&typeof module!=='undefined'?f(exports):typeof define==='function'&&define.amd?define(['exports'],f):(g=g||self,f(g.evangelist={}));}(this,function(exports){'use strict';function compose() { | ||
var funcs = []; | ||
@@ -49,13 +49,63 @@ for (var _i = 0; _i < arguments.length; _i++) { | ||
}; | ||
}/*! ***************************************************************************** | ||
Copyright (c) Microsoft Corporation. All rights reserved. | ||
Licensed under the Apache License, Version 2.0 (the "License"); you may not use | ||
this file except in compliance with the License. You may obtain a copy of the | ||
License at http://www.apache.org/licenses/LICENSE-2.0 | ||
THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY | ||
KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED | ||
WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE, | ||
MERCHANTABLITY OR NON-INFRINGEMENT. | ||
See the Apache Version 2.0 License for specific language governing permissions | ||
and limitations under the License. | ||
***************************************************************************** */ | ||
function __awaiter(thisArg, _arguments, P, generator) { | ||
return new (P || (P = Promise))(function (resolve, reject) { | ||
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } | ||
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } | ||
function step(result) { result.done ? resolve(result.value) : new P(function (resolve) { resolve(result.value); }).then(fulfilled, rejected); } | ||
step((generator = generator.apply(thisArg, _arguments || [])).next()); | ||
}); | ||
} | ||
function __generator(thisArg, body) { | ||
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g; | ||
return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g; | ||
function verb(n) { return function (v) { return step([n, v]); }; } | ||
function step(op) { | ||
if (f) throw new TypeError("Generator is already executing."); | ||
while (_) try { | ||
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t; | ||
if (y = 0, t) op = [op[0] & 2, t.value]; | ||
switch (op[0]) { | ||
case 0: case 1: t = op; break; | ||
case 4: _.label++; return { value: op[1], done: false }; | ||
case 5: _.label++; y = op[1]; op = [0]; continue; | ||
case 7: op = _.ops.pop(); _.trys.pop(); continue; | ||
default: | ||
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; } | ||
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; } | ||
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; } | ||
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; } | ||
if (t[2]) _.ops.pop(); | ||
_.trys.pop(); continue; | ||
} | ||
op = body.call(thisArg, _); | ||
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; } | ||
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true }; | ||
} | ||
}function dispatcher(state, mutators, subscribers) { | ||
return tslib_1.__awaiter(this, void 0, Promise, function () { | ||
return __awaiter(this, void 0, Promise, function () { | ||
var hasSubscribers, index, next; | ||
var _this = this; | ||
return tslib_1.__generator(this, function (_a) { | ||
return __generator(this, function (_a) { | ||
hasSubscribers = (subscribers !== undefined); | ||
index = 0; | ||
next = function (newState) { return tslib_1.__awaiter(_this, void 0, void 0, function () { | ||
next = function (newState) { return __awaiter(_this, void 0, void 0, function () { | ||
var layer; | ||
var _this = this; | ||
return tslib_1.__generator(this, function (_a) { | ||
return __generator(this, function (_a) { | ||
layer = mutators[index]; | ||
@@ -66,4 +116,4 @@ if (layer === undefined) { | ||
index += 1; | ||
return [2 /*return*/, layer(newState, function (currentState) { return tslib_1.__awaiter(_this, void 0, void 0, function () { | ||
return tslib_1.__generator(this, function (_a) { | ||
return [2 /*return*/, layer(newState, function (currentState) { return __awaiter(_this, void 0, void 0, function () { | ||
return __generator(this, function (_a) { | ||
if (hasSubscribers) { | ||
@@ -84,5 +134,5 @@ // @ts-ignore | ||
}function emitter(events, eventName, args, subscribers) { | ||
return tslib_1.__awaiter(this, void 0, Promise, function () { | ||
return __awaiter(this, void 0, Promise, function () { | ||
var isEventWildcard, argsPass, _loop_1, _i, _a, eventKey; | ||
return tslib_1.__generator(this, function (_b) { | ||
return __generator(this, function (_b) { | ||
switch (_b.label) { | ||
@@ -94,3 +144,3 @@ case 0: | ||
var _loop_2, _i, _a, eventSubscriber; | ||
return tslib_1.__generator(this, function (_b) { | ||
return __generator(this, function (_b) { | ||
switch (_b.label) { | ||
@@ -102,3 +152,3 @@ case 0: | ||
_loop_2 = function (eventSubscriber) { | ||
return tslib_1.__generator(this, function (_a) { | ||
return __generator(this, function (_a) { | ||
switch (_a.label) { | ||
@@ -153,5 +203,5 @@ case 0: | ||
}function iterate(iterable, func) { | ||
return tslib_1.__awaiter(this, void 0, Promise, function () { | ||
return __awaiter(this, void 0, Promise, function () { | ||
var _i, _a, value; | ||
return tslib_1.__generator(this, function (_b) { | ||
return __generator(this, function (_b) { | ||
switch (_b.label) { | ||
@@ -158,0 +208,0 @@ case 0: |
"use strict"; | ||
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { | ||
return new (P || (P = Promise))(function (resolve, reject) { | ||
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } | ||
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } | ||
function step(result) { result.done ? resolve(result.value) : new P(function (resolve) { resolve(result.value); }).then(fulfilled, rejected); } | ||
step((generator = generator.apply(thisArg, _arguments || [])).next()); | ||
}); | ||
}; | ||
var __generator = (this && this.__generator) || function (thisArg, body) { | ||
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g; | ||
return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g; | ||
function verb(n) { return function (v) { return step([n, v]); }; } | ||
function step(op) { | ||
if (f) throw new TypeError("Generator is already executing."); | ||
while (_) try { | ||
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t; | ||
if (y = 0, t) op = [op[0] & 2, t.value]; | ||
switch (op[0]) { | ||
case 0: case 1: t = op; break; | ||
case 4: _.label++; return { value: op[1], done: false }; | ||
case 5: _.label++; y = op[1]; op = [0]; continue; | ||
case 7: op = _.ops.pop(); _.trys.pop(); continue; | ||
default: | ||
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; } | ||
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; } | ||
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; } | ||
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; } | ||
if (t[2]) _.ops.pop(); | ||
_.trys.pop(); continue; | ||
} | ||
op = body.call(thisArg, _); | ||
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; } | ||
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true }; | ||
} | ||
}; | ||
var __values = (this && this.__values) || function (o) { | ||
var m = typeof Symbol === "function" && o[Symbol.iterator], i = 0; | ||
if (m) return m.call(o); | ||
return { | ||
next: function () { | ||
if (o && i >= o.length) o = void 0; | ||
return { value: o && o[i++], done: !o }; | ||
} | ||
}; | ||
}; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
var tslib_1 = require("tslib"); | ||
function iterate(iterable, func) { | ||
return tslib_1.__awaiter(this, void 0, void 0, function () { | ||
return __awaiter(this, void 0, void 0, function () { | ||
var _a, _b, value, e_1_1; | ||
var e_1, _c; | ||
return tslib_1.__generator(this, function (_d) { | ||
return __generator(this, function (_d) { | ||
switch (_d.label) { | ||
@@ -14,3 +58,3 @@ case 0: | ||
case 1: | ||
_a = tslib_1.__values.apply(void 0, [_d.sent()]), _b = _a.next(); | ||
_a = __values.apply(void 0, [_d.sent()]), _b = _a.next(); | ||
_d.label = 2; | ||
@@ -17,0 +61,0 @@ case 2: |
@@ -19,3 +19,3 @@ { | ||
], | ||
"version": "0.12.1", | ||
"version": "0.12.2", | ||
"homepage": "https://github.com/eserozvataf/evangelist#readme", | ||
@@ -41,3 +41,3 @@ "author": "Eser Ozvataf <eser@ozvataf.com>", | ||
"engines": { | ||
"node": ">=8.10.0" | ||
"node": ">=10.13.0" | ||
}, | ||
@@ -52,8 +52,6 @@ "scripts": { | ||
}, | ||
"dependencies": { | ||
"tslib": "^1.10.0" | ||
}, | ||
"dependencies": {}, | ||
"devDependencies": { | ||
"@types/jest": "^24.0.15", | ||
"@types/node": "^12.6.8", | ||
"@types/jest": "^24.0.16", | ||
"@types/node": "^12.6.9", | ||
"@typescript-eslint/parser": "^1.13.0", | ||
@@ -66,3 +64,3 @@ "codecov": "^3.5.0", | ||
"jest": "^24.8.0", | ||
"rollup": "^1.17.0", | ||
"rollup": "^1.18.0", | ||
"rollup-plugin-commonjs": "^10.0.1", | ||
@@ -69,0 +67,0 @@ "rollup-plugin-node-resolve": "^5.2.0", |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
98526
0
1209
- Removedtslib@^1.10.0
- Removedtslib@1.14.1(transitive)