Comparing version 1.0.1 to 1.0.2
@@ -1,2 +0,2 @@ | ||
var Sijil=function(){"use strict";function e(e,t){function n(){this.constructor=e}for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r]);e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}var t=function(){function e(e,t,n){this.requireService=e,this.parser=t,this.bundles={},this.defaultLanguage=n.defaultLanguage,this.defaultLanguage||"undefined"==typeof window||(this.defaultLanguage=window.navigator.language.split("-")[0]),this.currentLanguage=this.defaultLanguage}return e.prototype.addToBundle=function(e,t){var n=t||this.currentLanguage||this.defaultLanguage||"en";this.bundles[n]||(this.bundles[n]={});var r={},a={};for(var i in e)r[i]=e[i];for(var i in a)r[i]=a[i];this.bundles[n]=r,this.currentLanguage||(this.currentLanguage=t)},e.prototype.loadBundle=function(e,t){var n=this;return this.requireService.load(e).then(function(e){n.addToBundle(e,t)})},e.prototype.loadBundles=function(e){var t=this;return Promise.all(e.map(function(e){return t.loadBundle(e.where,e.lang)}))},e.prototype.unloadBundle=function(e){delete this.bundles[e]},e.prototype.getLoadedLanguages=function(){return Object.keys(this.bundles)},e.prototype.translate=function(e,t,n){var r=n||this.currentLanguage,a=this.bundles[r]&&this.bundles[r][e]||this.defaultLanguage&&this.bundles[this.defaultLanguage]&&this.bundles[this.defaultLanguage][e]||e;return a!==e&&t?this.parser.compile(a,t,function(t){return console.error(t),e}):a},e}(),n=function(t){function n(e,n){var r=t.call(this,e)||this;return r.message=e,r.fragment=n,r}return e(n,t),n}(Error),r=function(){function e(){}return e.prototype.getParameter=function(e,t,n){return 1===t.split(/\s+/).length?"$"===t[0]?e[t.substr(1)]:n?t:void 0!==e[t]?e[t]:t:t.split(/\s+/).reduce(function(t,n){return t.push("$"===n[0]?e[n.substr(1)]:n),t},[]).join(" ")},e.prototype.compileFragment=function(e,t){e=e.replace(/{{|}}/g,"");var r,a;if(!((r=e.indexOf("?"))>0&&(a=e.lastIndexOf(":"))>1))return e=e.trim(),t[e];var i=e.substring(0,r).trim(),o=e.substring(r+1,a).trim(),u=e.substring(a+1).trim(),s=this.getParameter(t,o),l=this.getParameter(t,u),c=i.split(/\s+/);if(1===c.length){return t[c[0]]?s:l}if(3!==c.length)throw new n("Invalid condition for fragment : "+e,e);var g=this.getParameter(t,c[0],t instanceof Array),d=this.getParameter(t,c[2],t instanceof Array);switch(c[1]){case"==":return g==d?s:l;case">":return g>d?s:l;case">=":return g>=d?s:l;case"<":return g<d?s:l;case"<=":return g<=d?s:l;default:throw new n("Invalid conditional operator for fragment : "+e,e)}},e.prototype.compile=function(t,n,r){var a=t.split(e.delimRegexp),i=t.match(e.delimRegexp),o="";if(r||(r=e.defaultErrorCallback),i){for(var u=0;u<a.length;u++)if(o+=a[u],!(u>i.length-1))try{o+=this.compileFragment(i[u],n)}catch(e){o+=r(e)}}else o+=t;return o},e}();r.delimiters=["{{","}}"],r.delimRegexp=new RegExp(r.delimiters[0]+"[^}]+"+r.delimiters[1],"gm"),r.defaultErrorCallback=function(e){return console.error(e),e.fragment};var a=function(){function e(){}return e.prototype.load=function(e,t){return new Promise(function(n,r){var a=new XMLHttpRequest;a.open("GET",e,!t),a.responseType="json",a.onload=function(e){if(200===a.status){var t=a.response;n(t)}else console.log("Unsupported language.")},a.onerror=function(e){console.error(e)},a.send()})},e}(),i={defaultLanguage:window?window.navigator.language.split("-")[0]:void 0},o=new t(new a,new r,i);return o.factory=function(e,n,o){return new t(e||new a,n||new r,o||i)},o}(); | ||
var Sijil=function(){"use strict";function e(e,t){function n(){this.constructor=e}for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r]);e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}var t=function(){function e(e,t,n){this.requireService=e,this.parser=t,this.bundles={},this.defaultLanguage=n.defaultLanguage,this.defaultLanguage||"undefined"==typeof window||(this.defaultLanguage=window.navigator.language.split("-")[0]),this.currentLanguage=this.defaultLanguage}return e.prototype.addToBundle=function(e,t){var n=t||this.currentLanguage||this.defaultLanguage||"en";this.bundles[n]||(this.bundles[n]={}),this.bundles[n]=Object.assign({},this.bundles[n],e),this.currentLanguage||(this.currentLanguage=t)},e.prototype.loadBundle=function(e,t){var n=this;return this.requireService.load(e).then(function(e){n.addToBundle(e,t)})},e.prototype.loadBundles=function(e){var t=this;return Promise.all(e.map(function(e){return t.loadBundle(e.where,e.lang)}))},e.prototype.unloadBundle=function(e){delete this.bundles[e]},e.prototype.getLoadedLanguages=function(){return Object.keys(this.bundles)},e.prototype.translate=function(e,t,n){var r=n||this.currentLanguage,a=this.bundles[r]&&this.bundles[r][e]||this.defaultLanguage&&this.bundles[this.defaultLanguage]&&this.bundles[this.defaultLanguage][e]||e;return a!==e&&t?this.parser.compile(a,t,function(t){return console.error(t),e}):a},e}(),n=function(t){function n(e,n){var r=t.call(this,e)||this;return r.message=e,r.fragment=n,r}return e(n,t),n}(Error),r=function(){function e(){}return e.prototype.getParameter=function(e,t,n){return 1===t.split(/\s+/).length?"$"===t[0]?e[t.substr(1)]:n?t:void 0!==e[t]?e[t]:t:t.split(/\s+/).reduce(function(t,n){return t.push("$"===n[0]?e[n.substr(1)]:n),t},[]).join(" ")},e.prototype.compileFragment=function(e,t){e=e.replace(/{{|}}/g,"");var r,a;if(!((r=e.indexOf("?"))>0&&(a=e.lastIndexOf(":"))>1))return e=e.trim(),t[e];var i=e.substring(0,r).trim(),u=e.substring(r+1,a).trim(),o=e.substring(a+1).trim(),s=this.getParameter(t,u),l=this.getParameter(t,o),c=i.split(/\s+/);if(1===c.length){return t[c[0]]?s:l}if(3!==c.length)throw new n("Invalid condition for fragment : "+e,e);var g=this.getParameter(t,c[0],t instanceof Array),d=this.getParameter(t,c[2],t instanceof Array);switch(c[1]){case"==":return g==d?s:l;case">":return g>d?s:l;case">=":return g>=d?s:l;case"<":return g<d?s:l;case"<=":return g<=d?s:l;default:throw new n("Invalid conditional operator for fragment : "+e,e)}},e.prototype.compile=function(t,n,r){var a=t.split(e.delimRegexp),i=t.match(e.delimRegexp),u="";if(r||(r=e.defaultErrorCallback),i){for(var o=0;o<a.length;o++)if(u+=a[o],!(o>i.length-1))try{u+=this.compileFragment(i[o],n)}catch(e){u+=r(e)}}else u+=t;return u},e}();r.delimiters=["{{","}}"],r.delimRegexp=new RegExp(r.delimiters[0]+"[^}]+"+r.delimiters[1],"gm"),r.defaultErrorCallback=function(e){return console.error(e),e.fragment};var a=function(){function e(){}return e.prototype.load=function(e,t){return new Promise(function(n,r){var a=new XMLHttpRequest;a.open("GET",e,!t),a.responseType="json",a.onload=function(e){if(200===a.status){var t=a.response;n(t)}else console.log("Unsupported language.")},a.onerror=function(e){console.error(e)},a.send()})},e}(),i={defaultLanguage:window?window.navigator.language.split("-")[0]:void 0},u=new t(new a,new r,i);return u.factory=function(e,n,u){return new t(e||new a,n||new r,u||i)},u}(); | ||
//# sourceMappingURL=sijil.js.map |
@@ -1,2 +0,2 @@ | ||
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("@angular/core"),require("@angular/http"),require("rxjs/add/operator/toPromise")):"function"==typeof define&&define.amd?define(["exports","@angular/core","@angular/http","rxjs/add/operator/toPromise"],t):t(e.SijilModule=e.SijilModule||{},e.ng.core,e.ng.http)}(this,function(e,t,n){"use strict";function r(e,t){function n(){this.constructor=e}for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r]);e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}function i(e,t,n,r){var i,o=arguments.length,a=o<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,n,r);else for(var u=e.length-1;u>=0;u--)(i=e[u])&&(a=(o<3?i(a):o>3?i(t,n,a):i(t,n))||a);return o>3&&a&&Object.defineProperty(t,n,a),a}function o(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)}e.HttpRequireService=function(){function e(e){this.http=e}return e.prototype.load=function(e){return this.http.get(e).toPromise().then(function(e){return e.json()})},e}(),e.HttpRequireService=i([t.Injectable(),o("design:paramtypes",["function"==typeof(a=void 0!==n.Http&&n.Http)&&a||Object])],e.HttpRequireService);var a,u=function(){function e(){}return e}(),s=function(e){function t(t,n){var r=e.call(this,t)||this;return r.message=t,r.fragment=n,r}return r(t,e),t}(Error),l=function(){function e(){}return e}(),p=function(){function e(){}return e.prototype.getParameter=function(e,t,n){return 1===t.split(/\s+/).length?"$"===t[0]?e[t.substr(1)]:n?t:void 0!==e[t]?e[t]:t:t.split(/\s+/).reduce(function(t,n){return t.push("$"===n[0]?e[n.substr(1)]:n),t},[]).join(" ")},e.prototype.compileFragment=function(e,t){e=e.replace(/{{|}}/g,"");var n,r;if(!((n=e.indexOf("?"))>0&&(r=e.lastIndexOf(":"))>1))return e=e.trim(),t[e];var i=e.substring(0,n).trim(),o=e.substring(n+1,r).trim(),a=e.substring(r+1).trim(),u=this.getParameter(t,o),l=this.getParameter(t,a),p=i.split(/\s+/);if(1===p.length){return t[p[0]]?u:l}if(3!==p.length)throw new s("Invalid condition for fragment : "+e,e);var c=this.getParameter(t,p[0],t instanceof Array),f=this.getParameter(t,p[2],t instanceof Array);switch(p[1]){case"==":return c==f?u:l;case">":return c>f?u:l;case">=":return c>=f?u:l;case"<":return c<f?u:l;case"<=":return c<=f?u:l;default:throw new s("Invalid conditional operator for fragment : "+e,e)}},e.prototype.compile=function(t,n,r){var i=t.split(e.delimRegexp),o=t.match(e.delimRegexp),a="";if(r||(r=e.defaultErrorCallback),o){for(var u=0;u<i.length;u++)if(a+=i[u],!(u>o.length-1))try{a+=this.compileFragment(o[u],n)}catch(e){a+=r(e)}}else a+=t;return a},e}();p.delimiters=["{{","}}"],p.delimRegexp=new RegExp(p.delimiters[0]+"[^}]+"+p.delimiters[1],"gm"),p.defaultErrorCallback=function(e){return console.error(e),e.fragment};var c=function(){function e(e,t,n){this.requireService=e,this.parser=t,this.bundles={},this.defaultLanguage=n.defaultLanguage,this.defaultLanguage||"undefined"==typeof window||(this.defaultLanguage=window.navigator.language.split("-")[0]),this.currentLanguage=this.defaultLanguage}return e.prototype.addToBundle=function(e,t){var n=t||this.currentLanguage||this.defaultLanguage||"en";this.bundles[n]||(this.bundles[n]={});var r={},i={};for(var o in e)r[o]=e[o];for(var o in i)r[o]=i[o];this.bundles[n]=r,this.currentLanguage||(this.currentLanguage=t)},e.prototype.loadBundle=function(e,t){var n=this;return this.requireService.load(e).then(function(e){n.addToBundle(e,t)})},e.prototype.loadBundles=function(e){var t=this;return Promise.all(e.map(function(e){return t.loadBundle(e.where,e.lang)}))},e.prototype.unloadBundle=function(e){delete this.bundles[e]},e.prototype.getLoadedLanguages=function(){return Object.keys(this.bundles)},e.prototype.translate=function(e,t,n){var r=n||this.currentLanguage,i=this.bundles[r]&&this.bundles[r][e]||this.defaultLanguage&&this.bundles[this.defaultLanguage]&&this.bundles[this.defaultLanguage][e]||e;return i!==e&&t?this.parser.compile(i,t,function(t){return console.error(t),e}):i},e}(),f=function(){function e(){}return e}(),d={defaultLanguage:window?window.navigator.language.split("-")[0]:void 0},g=function(){function e(e){this.bundlesService=e}return e.prototype.refreshTranslation=function(){var e=this.bundlesService.translate(this.value,this.parameters,this.fixedLanguage);this.displayedValue!==e&&(this.displayedValue=e,this.wrapperRef.nativeElement.innerHTML=this.displayedValue)},e.prototype.ngAfterViewInit=function(){this.value=this.wrapperRef.nativeElement.innerHTML.trim(),this.loaded=!0,this.refreshTranslation()},e.prototype.ngDoCheck=function(){this.loaded&&this.refreshTranslation()},e}();i([t.ViewChild("wrapper"),o("design:type","function"==typeof(h=void 0!==t.ElementRef&&t.ElementRef)&&h||Object)],g.prototype,"wrapperRef"),i([t.Input("s5l-params"),o("design:type",Object)],g.prototype,"parameters"),i([t.Input("s5l-lang"),o("design:type",String)],g.prototype,"fixedLanguage"),g=i([t.Component({selector:"s5l",template:"\n <span #wrapper>\n <ng-content></ng-content>\n </span>",changeDetection:t.ChangeDetectionStrategy.OnPush}),o("design:paramtypes",["function"==typeof(v=void 0!==c&&c)&&v||Object])],g);var h,v,m=function(){function e(e){this.bundlesService=e}return e.prototype.transform=function(e,t,n){return this.bundlesService.translate(e,t,n)},e}();m=i([t.Pipe({name:"translate",pure:!1}),o("design:paramtypes",["function"==typeof(y=void 0!==c&&c)&&y||Object])],m);var y;e.SijilModule=b=function(){function t(){}return t.forRoot=function(t,n,r){return{ngModule:b,providers:[{provide:c,useClass:c,deps:[u,l,f]},{provide:u,useClass:t||e.HttpRequireService},{provide:l,useClass:n||p},{provide:f,useValue:r||d}]}},t.forChild=function(){return{ngModule:b,providers:[]}},t}(),e.SijilModule=b=i([t.NgModule({imports:[n.HttpModule],declarations:[g,m],providers:[],exports:[g,m]})],e.SijilModule);var b;e.RequireService=u,e.FragmentsParser=p,e.ParserError=s,e.Parser=l,e.BundlesService=c,e.defaultSijilOpts=d,e.SijilOpts=f,Object.defineProperty(e,"__esModule",{value:!0})}); | ||
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("@angular/core"),require("@angular/http"),require("rxjs/add/operator/toPromise")):"function"==typeof define&&define.amd?define(["exports","@angular/core","@angular/http","rxjs/add/operator/toPromise"],t):t(e.SijilModule=e.SijilModule||{},e.ng.core,e.ng.http)}(this,function(e,t,n){"use strict";function r(e,t){function n(){this.constructor=e}for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r]);e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}function i(e,t,n,r){var i,a=arguments.length,o=a<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,n,r);else for(var u=e.length-1;u>=0;u--)(i=e[u])&&(o=(a<3?i(o):a>3?i(t,n,o):i(t,n))||o);return a>3&&o&&Object.defineProperty(t,n,o),o}function a(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)}e.HttpRequireService=function(){function e(e){this.http=e}return e.prototype.load=function(e){return this.http.get(e).toPromise().then(function(e){return e.json()})},e}(),e.HttpRequireService=i([t.Injectable(),a("design:paramtypes",["function"==typeof(o=void 0!==n.Http&&n.Http)&&o||Object])],e.HttpRequireService);var o,u=function(){function e(){}return e}(),s=function(e){function t(t,n){var r=e.call(this,t)||this;return r.message=t,r.fragment=n,r}return r(t,e),t}(Error),l=function(){function e(){}return e}(),p=function(){function e(){}return e.prototype.getParameter=function(e,t,n){return 1===t.split(/\s+/).length?"$"===t[0]?e[t.substr(1)]:n?t:void 0!==e[t]?e[t]:t:t.split(/\s+/).reduce(function(t,n){return t.push("$"===n[0]?e[n.substr(1)]:n),t},[]).join(" ")},e.prototype.compileFragment=function(e,t){e=e.replace(/{{|}}/g,"");var n,r;if(!((n=e.indexOf("?"))>0&&(r=e.lastIndexOf(":"))>1))return e=e.trim(),t[e];var i=e.substring(0,n).trim(),a=e.substring(n+1,r).trim(),o=e.substring(r+1).trim(),u=this.getParameter(t,a),l=this.getParameter(t,o),p=i.split(/\s+/);if(1===p.length){return t[p[0]]?u:l}if(3!==p.length)throw new s("Invalid condition for fragment : "+e,e);var c=this.getParameter(t,p[0],t instanceof Array),d=this.getParameter(t,p[2],t instanceof Array);switch(p[1]){case"==":return c==d?u:l;case">":return c>d?u:l;case">=":return c>=d?u:l;case"<":return c<d?u:l;case"<=":return c<=d?u:l;default:throw new s("Invalid conditional operator for fragment : "+e,e)}},e.prototype.compile=function(t,n,r){var i=t.split(e.delimRegexp),a=t.match(e.delimRegexp),o="";if(r||(r=e.defaultErrorCallback),a){for(var u=0;u<i.length;u++)if(o+=i[u],!(u>a.length-1))try{o+=this.compileFragment(a[u],n)}catch(e){o+=r(e)}}else o+=t;return o},e}();p.delimiters=["{{","}}"],p.delimRegexp=new RegExp(p.delimiters[0]+"[^}]+"+p.delimiters[1],"gm"),p.defaultErrorCallback=function(e){return console.error(e),e.fragment};var c=function(){function e(e,t,n){this.requireService=e,this.parser=t,this.bundles={},this.defaultLanguage=n.defaultLanguage,this.defaultLanguage||"undefined"==typeof window||(this.defaultLanguage=window.navigator.language.split("-")[0]),this.currentLanguage=this.defaultLanguage}return e.prototype.addToBundle=function(e,t){var n=t||this.currentLanguage||this.defaultLanguage||"en";this.bundles[n]||(this.bundles[n]={}),this.bundles[n]=Object.assign({},this.bundles[n],e),this.currentLanguage||(this.currentLanguage=t)},e.prototype.loadBundle=function(e,t){var n=this;return this.requireService.load(e).then(function(e){n.addToBundle(e,t)})},e.prototype.loadBundles=function(e){var t=this;return Promise.all(e.map(function(e){return t.loadBundle(e.where,e.lang)}))},e.prototype.unloadBundle=function(e){delete this.bundles[e]},e.prototype.getLoadedLanguages=function(){return Object.keys(this.bundles)},e.prototype.translate=function(e,t,n){var r=n||this.currentLanguage,i=this.bundles[r]&&this.bundles[r][e]||this.defaultLanguage&&this.bundles[this.defaultLanguage]&&this.bundles[this.defaultLanguage][e]||e;return i!==e&&t?this.parser.compile(i,t,function(t){return console.error(t),e}):i},e}(),d=function(){function e(){}return e}(),f={defaultLanguage:window?window.navigator.language.split("-")[0]:void 0},g=function(){function e(e){this.bundlesService=e}return e.prototype.refreshTranslation=function(){var e=this.bundlesService.translate(this.value,this.parameters,this.fixedLanguage);this.displayedValue!==e&&(this.displayedValue=e,this.wrapperRef.nativeElement.innerHTML=this.displayedValue)},e.prototype.ngAfterViewInit=function(){this.value=this.wrapperRef.nativeElement.innerHTML.trim(),this.loaded=!0,this.refreshTranslation()},e.prototype.ngDoCheck=function(){this.loaded&&this.refreshTranslation()},e}();i([t.ViewChild("wrapper"),a("design:type","function"==typeof(h=void 0!==t.ElementRef&&t.ElementRef)&&h||Object)],g.prototype,"wrapperRef"),i([t.Input("s5l-params"),a("design:type",Object)],g.prototype,"parameters"),i([t.Input("s5l-lang"),a("design:type",String)],g.prototype,"fixedLanguage"),g=i([t.Component({selector:"s5l",template:"\n <span #wrapper>\n <ng-content></ng-content>\n </span>",changeDetection:t.ChangeDetectionStrategy.OnPush}),a("design:paramtypes",["function"==typeof(m=void 0!==c&&c)&&m||Object])],g);var h,m;e.TranslatePipe=function(){function e(e){this.bundlesService=e}return e.prototype.transform=function(e,t,n){return this.bundlesService.translate(e,t,n)},e}(),e.TranslatePipe=i([t.Pipe({name:"translate",pure:!1}),a("design:paramtypes",["function"==typeof(v=void 0!==c&&c)&&v||Object])],e.TranslatePipe);var v;e.SijilModule=y=function(){function t(){}return t.forRoot=function(t,n,r){return{ngModule:y,providers:[{provide:c,useClass:c,deps:[u,l,d]},{provide:u,useClass:t||e.HttpRequireService},{provide:l,useClass:n||p},{provide:d,useValue:r||f}]}},t.forChild=function(){return{ngModule:y,providers:[]}},t}(),e.SijilModule=y=i([t.NgModule({imports:[n.HttpModule],declarations:[g,e.TranslatePipe],providers:[],exports:[g,e.TranslatePipe]})],e.SijilModule);var y;e.RequireService=u,e.FragmentsParser=p,e.ParserError=s,e.Parser=l,e.BundlesService=c,e.defaultSijilOpts=f,e.SijilOpts=d,Object.defineProperty(e,"__esModule",{value:!0})}); | ||
//# sourceMappingURL=sijil.module.umd.js.map |
export { SijilModule } from './sijil.module'; | ||
export * from './services/index'; | ||
export * from './pipes/translate.pipe'; |
export { SijilModule } from './sijil.module'; | ||
export * from './services/index'; | ||
export * from './pipes/translate.pipe'; | ||
//# sourceMappingURL=index.js.map |
@@ -1,1 +0,1 @@ | ||
[{"__symbolic":"module","version":3,"metadata":{},"exports":[{"from":"./sijil.module","export":["SijilModule"]},{"from":"./services/index"}]},{"__symbolic":"module","version":1,"metadata":{},"exports":[{"from":"./sijil.module","export":["SijilModule"]},{"from":"./services/index"}]}] | ||
[{"__symbolic":"module","version":3,"metadata":{},"exports":[{"from":"./sijil.module","export":["SijilModule"]},{"from":"./services/index"},{"from":"./pipes/translate.pipe"}]},{"__symbolic":"module","version":1,"metadata":{},"exports":[{"from":"./sijil.module","export":["SijilModule"]},{"from":"./services/index"},{"from":"./pipes/translate.pipe"}]}] |
@@ -16,11 +16,3 @@ var BundlesService = (function () { | ||
this.bundles[targetLanguage] = {}; | ||
var newBundle = {}; | ||
var oldBundle = {}; | ||
for (var key in bundle) { | ||
newBundle[key] = bundle[key]; | ||
} | ||
for (var key in oldBundle) { | ||
newBundle[key] = oldBundle[key]; | ||
} | ||
this.bundles[targetLanguage] = newBundle; | ||
this.bundles[targetLanguage] = Object.assign({}, this.bundles[targetLanguage], bundle); | ||
if (!this.currentLanguage) | ||
@@ -27,0 +19,0 @@ this.currentLanguage = lang; |
{ | ||
"name": "sijil", | ||
"version": "1.0.1", | ||
"version": "1.0.2", | ||
"description": "[SI]mple [J]son [I]nternationalization [L]ibrary", | ||
@@ -5,0 +5,0 @@ "keywords": [ |
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
139583
504