ngx-translate-multi-http-loader
Advanced tools
Comparing version 2.0.2 to 2.1.0
(function (global, factory) { | ||
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('rxjs'), require('rxjs/operators')) : | ||
typeof define === 'function' && define.amd ? define('ngx-translate-multi-http-loader', ['exports', 'rxjs', 'rxjs/operators'], factory) : | ||
(factory((global['ngx-translate-multi-http-loader'] = {}),null,global.Rx.Observable.prototype)); | ||
}(this, (function (exports,rxjs,operators) { 'use strict'; | ||
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('rxjs'), require('rxjs/operators'), require('deepmerge')) : | ||
typeof define === 'function' && define.amd ? define('ngx-translate-multi-http-loader', ['exports', 'rxjs', 'rxjs/operators', 'deepmerge'], factory) : | ||
(factory((global['ngx-translate-multi-http-loader'] = {}),null,global.Rx.Observable.prototype,null)); | ||
}(this, (function (exports,rxjs,operators,merge) { 'use strict'; | ||
merge = merge && merge.hasOwnProperty('default') ? merge['default'] : merge; | ||
/** | ||
@@ -29,3 +31,3 @@ * @fileoverview added by tsickle | ||
}); | ||
return rxjs.forkJoin(requests).pipe(operators.map(function (response) { return response.reduce(function (a, b) { return Object.assign(a, b); }); })); | ||
return rxjs.forkJoin(requests).pipe(operators.map(function (response) { return merge.all(response); })); | ||
}; | ||
@@ -32,0 +34,0 @@ return MultiTranslateHttpLoader; |
@@ -1,2 +0,2 @@ | ||
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports,require("rxjs"),require("rxjs/operators")):"function"==typeof define&&define.amd?define("ngx-translate-multi-http-loader",["exports","rxjs","rxjs/operators"],e):e(t["ngx-translate-multi-http-loader"]={},null,t.Rx.Observable.prototype)}(this,function(t,n,o){"use strict";var e=function(){function t(t,e){this.http=t,this.resources=e}return t.prototype.getTranslation=function(e){var r=this,t=this.resources.map(function(t){return r.http.get(t.prefix+e+t.suffix)});return n.forkJoin(t).pipe(o.map(function(t){return t.reduce(function(t,e){return Object.assign(t,e)})}))},t}();t.MultiTranslateHttpLoader=e,Object.defineProperty(t,"__esModule",{value:!0})}); | ||
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("rxjs"),require("rxjs/operators"),require("deepmerge")):"function"==typeof define&&define.amd?define("ngx-translate-multi-http-loader",["exports","rxjs","rxjs/operators","deepmerge"],t):t(e["ngx-translate-multi-http-loader"]={},null,e.Rx.Observable.prototype,null)}(this,function(e,n,o,i){"use strict";i=i&&i.hasOwnProperty("default")?i["default"]:i;var t=function(){function e(e,t){this.http=e,this.resources=t}return e.prototype.getTranslation=function(t){var r=this,e=this.resources.map(function(e){return r.http.get(e.prefix+t+e.suffix)});return n.forkJoin(e).pipe(o.map(function(e){return i.all(e)}))},e}();e.MultiTranslateHttpLoader=t,Object.defineProperty(e,"__esModule",{value:!0})}); | ||
//# sourceMappingURL=ngx-translate-multi-http-loader.umd.min.js.map |
@@ -7,2 +7,3 @@ /** | ||
import { map } from "rxjs/operators"; | ||
import merge from 'deepmerge'; | ||
/** | ||
@@ -35,3 +36,3 @@ * @record | ||
}); | ||
return forkJoin(requests).pipe(map(response => response.reduce((a, b) => Object.assign(a, b)))); | ||
return forkJoin(requests).pipe(map(response => merge.all(response))); | ||
} | ||
@@ -38,0 +39,0 @@ } |
@@ -7,2 +7,3 @@ /** | ||
import { map } from "rxjs/operators"; | ||
import merge from 'deepmerge'; | ||
/** | ||
@@ -36,3 +37,3 @@ * @record | ||
}); | ||
return forkJoin(requests).pipe(map(function (response) { return response.reduce(function (a, b) { return Object.assign(a, b); }); })); | ||
return forkJoin(requests).pipe(map(function (response) { return merge.all(response); })); | ||
}; | ||
@@ -39,0 +40,0 @@ return MultiTranslateHttpLoader; |
import { forkJoin } from 'rxjs'; | ||
import { map } from 'rxjs/operators'; | ||
import merge from 'deepmerge'; | ||
@@ -25,3 +26,3 @@ /** | ||
}); | ||
return forkJoin(requests).pipe(map(response => response.reduce((a, b) => Object.assign(a, b)))); | ||
return forkJoin(requests).pipe(map(response => merge.all(response))); | ||
} | ||
@@ -28,0 +29,0 @@ } |
import { forkJoin } from 'rxjs'; | ||
import { map } from 'rxjs/operators'; | ||
import merge from 'deepmerge'; | ||
@@ -26,3 +27,3 @@ /** | ||
}); | ||
return forkJoin(requests).pipe(map(function (response) { return response.reduce(function (a, b) { return Object.assign(a, b); }); })); | ||
return forkJoin(requests).pipe(map(function (response) { return merge.all(response); })); | ||
}; | ||
@@ -29,0 +30,0 @@ return MultiTranslateHttpLoader; |
@@ -1,1 +0,1 @@ | ||
{"__symbolic":"module","version":4,"metadata":{"ITranslationResource":{"__symbolic":"interface"},"MultiTranslateHttpLoader":{"__symbolic":"class","members":{"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"reference","module":"@angular/common/http","name":"HttpClient","line":13,"character":18},{"__symbolic":"reference","name":"Array","arguments":[{"__symbolic":"reference","name":"any"}]}]}],"getTranslation":[{"__symbolic":"method"}]}}},"origins":{"ITranslationResource":"./lib/multi-http-loader","MultiTranslateHttpLoader":"./lib/multi-http-loader"},"importAs":"ngx-translate-multi-http-loader"} | ||
{"__symbolic":"module","version":4,"metadata":{"ITranslationResource":{"__symbolic":"interface"},"MultiTranslateHttpLoader":{"__symbolic":"class","members":{"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"reference","module":"@angular/common/http","name":"HttpClient","line":14,"character":18},{"__symbolic":"reference","name":"Array","arguments":[{"__symbolic":"reference","name":"any"}]}]}],"getTranslation":[{"__symbolic":"method"}]}}},"origins":{"ITranslationResource":"./lib/multi-http-loader","MultiTranslateHttpLoader":"./lib/multi-http-loader"},"importAs":"ngx-translate-multi-http-loader"} |
@@ -1,1 +0,1 @@ | ||
{"name":"ngx-translate-multi-http-loader","description":"A loader for ngx-translate that loads translations from multiple files using http","author":"Dennis Keil","keywords":["angular","angular 2","i18n","translate","ngx-translate"],"license":"MIT","homepage":"https://github.com/denniske/ngx-translate-multi-http-loader","repository":{"type":"git","url":"git+https://github.com/denniske/ngx-translate-multi-http-loader.git"},"bugs":{"url":"https://github.com/denniske/ngx-translate-multi-http-loader/issues"},"peerDependencies":{"@ngx-translate/core":">=10.0.0","@angular/common":">=6.0.0","rxjs":">=6.0.0"},"devDependencies":{"semantic-release":"8.2.3"},"scripts":{"semantic-release":"semantic-release pre && npm publish && semantic-release post"},"main":"bundles/ngx-translate-multi-http-loader.umd.js","module":"fesm5/ngx-translate-multi-http-loader.js","es2015":"fesm2015/ngx-translate-multi-http-loader.js","esm5":"esm5/ngx-translate-multi-http-loader.js","esm2015":"esm2015/ngx-translate-multi-http-loader.js","fesm5":"fesm5/ngx-translate-multi-http-loader.js","fesm2015":"fesm2015/ngx-translate-multi-http-loader.js","typings":"ngx-translate-multi-http-loader.d.ts","metadata":"ngx-translate-multi-http-loader.metadata.json","sideEffects":false,"dependencies":{"tslib":"^1.9.0"},"version":"2.0.2"} | ||
{"name":"ngx-translate-multi-http-loader","description":"A loader for ngx-translate that loads translations from multiple files using http","author":"Dennis Keil","keywords":["angular","angular 2","i18n","translate","ngx-translate"],"license":"MIT","homepage":"https://github.com/denniske/ngx-translate-multi-http-loader","repository":{"type":"git","url":"git+https://github.com/denniske/ngx-translate-multi-http-loader.git"},"bugs":{"url":"https://github.com/denniske/ngx-translate-multi-http-loader/issues"},"peerDependencies":{"@ngx-translate/core":">=10.0.0","@angular/common":">=6.0.0","rxjs":">=6.0.0"},"devDependencies":{"semantic-release":"8.2.3"},"scripts":{"semantic-release":"semantic-release pre && npm publish && semantic-release post"},"main":"bundles/ngx-translate-multi-http-loader.umd.js","module":"fesm5/ngx-translate-multi-http-loader.js","es2015":"fesm2015/ngx-translate-multi-http-loader.js","esm5":"esm5/ngx-translate-multi-http-loader.js","esm2015":"esm2015/ngx-translate-multi-http-loader.js","fesm5":"fesm5/ngx-translate-multi-http-loader.js","fesm2015":"fesm2015/ngx-translate-multi-http-loader.js","typings":"ngx-translate-multi-http-loader.d.ts","metadata":"ngx-translate-multi-http-loader.metadata.json","sideEffects":false,"dependencies":{"tslib":"^1.9.0"},"version":"2.1.0"} |
@@ -85,1 +85,3 @@ # @ngx-translate/multi-http-loader [![Build Status](https://travis-ci.org/denniske/ngx-translate-multi-http-loader.svg?branch=master)](https://travis-ci.org/denniske/ngx-translate-multi-http-loader) [![npm version](https://badge.fury.io/js/ngx-translate-multi-http-loader.svg)](https://badge.fury.io/js/ngx-translate-multi-http-loader) | ||
For now this loader only support the json format. | ||
The loader will merge all translation files from the server using [deepmerge](https://github.com/KyleAMathews/deepmerge). |
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
24649
255
87