Comparing version 0.0.41 to 0.1.1
@@ -1,2 +0,2 @@ | ||
var t=function(){return(t=Object.assign||function(t){for(var n,r=1,i=arguments.length;r<i;r++)for(var o in n=arguments[r])Object.prototype.hasOwnProperty.call(n,o)&&(t[o]=n[o]);return t}).apply(this,arguments)},n=function(t){throw new Error(t)},r={zero:function(t){return 0===t},one:function(t){return 1===t}},i=["zero","one","other"],o=function(){function o(){this.reset(),this._h={t:this.t.bind(this),c:this.c.bind(this)}}return o.prototype.reset=function(){this._e={},this._c=t({},r),this._f={}},o.prototype.localeName=function(t){return t&&(this._l=t),this._l},o.prototype.use=function(t){t.call(null,this)},o.prototype.add=function(r){var i=r.locale,o=r.entries,e=this._l;return e&&i&&i!==e&&n('Dictionary locale "'+i+'" is different than selected locale "'+e+'"'),this._e=t(t({},this._e),o),this},o.prototype.addConditions=function(t){var r=this;return Object.keys(t).forEach((function(o){if(!i.includes(o)){var e=t[o];"function"!=typeof e&&n('Invalid condition function: "'+o+'"'),r._c[o]=e}})),this},o.prototype.addFormatters=function(n){return this._f=t(t({},this._f),n),this},o.prototype.r=function(n,r,i){return void 0===i&&(i={}),void 0===r?n:"function"==typeof r?r(i,t(t({},this._f),this._h)):r},o.prototype.t=function(t,n){var r=this._e[t];return this.r(t,r,n)},o.prototype.c=function(t,r,i){var o=this._e[t];if("object"!=typeof o)return n('Invalid conditional group key: "'+t+'"');for(var e="other",c=Object.keys(o),s=c.length,h=0;h<s;h+=1){var u=c[h],f=this._c[u];if("other"!==u&&f&&!0===f(r)){e=u;break}}var a=o[e];return this.r(t+"."+e,a,i)},o}(),e=new o,c=e.t.bind(e),s=e.c.bind(e);export{o as Lisan,s as c,e as lisan,c as t}; | ||
var t=function(){return(t=Object.assign||function(t){for(var n,o=1,e=arguments.length;o<e;o++)for(var r in n=arguments[o])Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r]);return t}).apply(this,arguments)},n=function(t){throw new Error(t)},o={zero:function(t){return 0===t},one:function(t){return 1===t}},e=["zero","one","other"],r=function(){function r(){this.reset(),this._h={t:this.t.bind(this),c:this.c.bind(this)}}return r.prototype.reset=function(){this._e={},this._c=t({},o),this._f={}},r.prototype.setLocaleName=function(t){t&&(this._l=t)},r.prototype.getLocaleName=function(){return this._l},r.prototype.use=function(t){t.call(null,this)},r.prototype.add=function(o){var e=o.locale,r=o.entries,i=this._l;return i&&e&&e!==i&&n('Dictionary locale "'+e+'" is different than selected locale "'+i+'"'),this._e=t(t({},this._e),r),this},r.prototype.addConditions=function(t){var o=this;return Object.keys(t).forEach((function(r){if(!e.includes(r)){var i=t[r];"function"!=typeof i&&n('Invalid condition function: "'+r+'"'),o._c[r]=i}})),this},r.prototype.addFormatters=function(n){return this._f=t(t({},this._f),n),this},r.prototype.t=function(t,n){var o=this._e[t];return this.r(t,o,n)},r.prototype.c=function(t,o,e){var r=this._e[t];if("object"!=typeof r)return n('Invalid conditional group key: "'+t+'"');for(var i="other",c=Object.keys(r),s=c.length,h=0;h<s;h+=1){var u=c[h],f=this._c[u];if("other"!==u&&f&&!0===f(o)){i=u;break}}var a=r[i];return this.r(t+"."+i,a,e)},r.prototype.r=function(n,o,e){return void 0===e&&(e={}),void 0===o?n:"function"==typeof o?o(e,t(t({},this._f),this._h)):o},r}(),i=new r,c=i.t.bind(i),s=i.c.bind(i);export{r as Lisan,s as c,i as lisan,c as t}; | ||
//# sourceMappingURL=index.esm.js.map |
@@ -1,2 +0,2 @@ | ||
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var t=function(){return(t=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var o in e=arguments[n])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)},e=function(t){throw new Error(t)},n={zero:function(t){return 0===t},one:function(t){return 1===t}},r=["zero","one","other"],o=function(){function o(){this.reset(),this._h={t:this.t.bind(this),c:this.c.bind(this)}}return o.prototype.reset=function(){this._e={},this._c=t({},n),this._f={}},o.prototype.localeName=function(t){return t&&(this._l=t),this._l},o.prototype.use=function(t){t.call(null,this)},o.prototype.add=function(n){var r=n.locale,o=n.entries,i=this._l;return i&&r&&r!==i&&e('Dictionary locale "'+r+'" is different than selected locale "'+i+'"'),this._e=t(t({},this._e),o),this},o.prototype.addConditions=function(t){var n=this;return Object.keys(t).forEach((function(o){if(!r.includes(o)){var i=t[o];"function"!=typeof i&&e('Invalid condition function: "'+o+'"'),n._c[o]=i}})),this},o.prototype.addFormatters=function(e){return this._f=t(t({},this._f),e),this},o.prototype.r=function(e,n,r){return void 0===r&&(r={}),void 0===n?e:"function"==typeof n?n(r,t(t({},this._f),this._h)):n},o.prototype.t=function(t,e){var n=this._e[t];return this.r(t,n,e)},o.prototype.c=function(t,n,r){var o=this._e[t];if("object"!=typeof o)return e('Invalid conditional group key: "'+t+'"');for(var i="other",s=Object.keys(o),c=s.length,h=0;h<c;h+=1){var u=s[h],f=this._c[u];if("other"!==u&&f&&!0===f(n)){i=u;break}}var a=o[i];return this.r(t+"."+i,a,r)},o}(),i=new o,s=i.t.bind(i),c=i.c.bind(i);exports.Lisan=o,exports.c=c,exports.lisan=i,exports.t=s; | ||
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var t=function(){return(t=Object.assign||function(t){for(var e,n=1,o=arguments.length;n<o;n++)for(var r in e=arguments[n])Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t}).apply(this,arguments)},e=function(t){throw new Error(t)},n={zero:function(t){return 0===t},one:function(t){return 1===t}},o=["zero","one","other"],r=function(){function r(){this.reset(),this._h={t:this.t.bind(this),c:this.c.bind(this)}}return r.prototype.reset=function(){this._e={},this._c=t({},n),this._f={}},r.prototype.setLocaleName=function(t){t&&(this._l=t)},r.prototype.getLocaleName=function(){return this._l},r.prototype.use=function(t){t.call(null,this)},r.prototype.add=function(n){var o=n.locale,r=n.entries,i=this._l;return i&&o&&o!==i&&e('Dictionary locale "'+o+'" is different than selected locale "'+i+'"'),this._e=t(t({},this._e),r),this},r.prototype.addConditions=function(t){var n=this;return Object.keys(t).forEach((function(r){if(!o.includes(r)){var i=t[r];"function"!=typeof i&&e('Invalid condition function: "'+r+'"'),n._c[r]=i}})),this},r.prototype.addFormatters=function(e){return this._f=t(t({},this._f),e),this},r.prototype.t=function(t,e){var n=this._e[t];return this.r(t,n,e)},r.prototype.c=function(t,n,o){var r=this._e[t];if("object"!=typeof r)return e('Invalid conditional group key: "'+t+'"');for(var i="other",s=Object.keys(r),c=s.length,u=0;u<c;u+=1){var h=s[u],f=this._c[h];if("other"!==h&&f&&!0===f(n)){i=h;break}}var a=r[i];return this.r(t+"."+i,a,o)},r.prototype.r=function(e,n,o){return void 0===o&&(o={}),void 0===n?e:"function"==typeof n?n(o,t(t({},this._f),this._h)):n},r}(),i=new r,s=i.t.bind(i),c=i.c.bind(i);exports.Lisan=r,exports.c=c,exports.lisan=i,exports.t=s; | ||
//# sourceMappingURL=index.js.map |
@@ -1,2 +0,2 @@ | ||
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports):"function"==typeof define&&define.amd?define(["exports"],e):e((t=t||self).lisanJS={})}(this,(function(t){"use strict";var e=function(){return(e=Object.assign||function(t){for(var e,n=1,i=arguments.length;n<i;n++)for(var o in e=arguments[n])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)},n=function(t){throw new Error(t)},i={zero:function(t){return 0===t},one:function(t){return 1===t}},o=["zero","one","other"],r=function(){function t(){this.reset(),this._h={t:this.t.bind(this),c:this.c.bind(this)}}return t.prototype.reset=function(){this._e={},this._c=e({},i),this._f={}},t.prototype.localeName=function(t){return t&&(this._l=t),this._l},t.prototype.use=function(t){t.call(null,this)},t.prototype.add=function(t){var i=t.locale,o=t.entries,r=this._l;return r&&i&&i!==r&&n('Dictionary locale "'+i+'" is different than selected locale "'+r+'"'),this._e=e(e({},this._e),o),this},t.prototype.addConditions=function(t){var e=this;return Object.keys(t).forEach((function(i){if(!o.includes(i)){var r=t[i];"function"!=typeof r&&n('Invalid condition function: "'+i+'"'),e._c[i]=r}})),this},t.prototype.addFormatters=function(t){return this._f=e(e({},this._f),t),this},t.prototype.r=function(t,n,i){return void 0===i&&(i={}),void 0===n?t:"function"==typeof n?n(i,e(e({},this._f),this._h)):n},t.prototype.t=function(t,e){var n=this._e[t];return this.r(t,n,e)},t.prototype.c=function(t,e,i){var o=this._e[t];if("object"!=typeof o)return n('Invalid conditional group key: "'+t+'"');for(var r="other",s=Object.keys(o),c=s.length,f=0;f<c;f+=1){var u=s[f],h=this._c[u];if("other"!==u&&h&&!0===h(e)){r=u;break}}var a=o[r];return this.r(t+"."+r,a,i)},t}(),s=new r,c=s.t.bind(s),f=s.c.bind(s);t.Lisan=r,t.c=f,t.lisan=s,t.t=c,Object.defineProperty(t,"__esModule",{value:!0})})); | ||
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports):"function"==typeof define&&define.amd?define(["exports"],e):e((t=t||self).lisanJS={})}(this,(function(t){"use strict";var e=function(){return(e=Object.assign||function(t){for(var e,n=1,o=arguments.length;n<o;n++)for(var i in e=arguments[n])Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t}).apply(this,arguments)},n=function(t){throw new Error(t)},o={zero:function(t){return 0===t},one:function(t){return 1===t}},i=["zero","one","other"],r=function(){function t(){this.reset(),this._h={t:this.t.bind(this),c:this.c.bind(this)}}return t.prototype.reset=function(){this._e={},this._c=e({},o),this._f={}},t.prototype.setLocaleName=function(t){t&&(this._l=t)},t.prototype.getLocaleName=function(){return this._l},t.prototype.use=function(t){t.call(null,this)},t.prototype.add=function(t){var o=t.locale,i=t.entries,r=this._l;return r&&o&&o!==r&&n('Dictionary locale "'+o+'" is different than selected locale "'+r+'"'),this._e=e(e({},this._e),i),this},t.prototype.addConditions=function(t){var e=this;return Object.keys(t).forEach((function(o){if(!i.includes(o)){var r=t[o];"function"!=typeof r&&n('Invalid condition function: "'+o+'"'),e._c[o]=r}})),this},t.prototype.addFormatters=function(t){return this._f=e(e({},this._f),t),this},t.prototype.t=function(t,e){var n=this._e[t];return this.r(t,n,e)},t.prototype.c=function(t,e,o){var i=this._e[t];if("object"!=typeof i)return n('Invalid conditional group key: "'+t+'"');for(var r="other",s=Object.keys(i),c=s.length,f=0;f<c;f+=1){var u=s[f],h=this._c[u];if("other"!==u&&h&&!0===h(e)){r=u;break}}var a=i[r];return this.r(t+"."+r,a,o)},t.prototype.r=function(t,n,o){return void 0===o&&(o={}),void 0===n?t:"function"==typeof n?n(o,e(e({},this._f),this._h)):n},t}(),s=new r,c=s.t.bind(s),f=s.c.bind(s);t.Lisan=r,t.c=f,t.lisan=s,t.t=c,Object.defineProperty(t,"__esModule",{value:!0})})); | ||
//# sourceMappingURL=index.umd.js.map |
@@ -10,3 +10,4 @@ import * as TSLisan from 'lisan-types'; | ||
reset(): void; | ||
localeName(localeName?: string): string | undefined; | ||
setLocaleName(localeName: string): void; | ||
getLocaleName(): string | undefined; | ||
use(fn: TSLisan.Plugin<Lisan>): void; | ||
@@ -16,3 +17,2 @@ add({ locale, entries }: TSLisan.Dictionary): this; | ||
addFormatters(formatters: TSLisan.FormatFunctions): this; | ||
private r; | ||
/** | ||
@@ -36,3 +36,4 @@ * Translate function is going to find the provided key | ||
c(conditionalGroupKey: string, value: any, placeholders?: TSLisan.Placeholders): string; | ||
private r; | ||
} | ||
export default Lisan; |
{ | ||
"name": "lisan", | ||
"version": "0.0.41", | ||
"version": "0.1.1", | ||
"description": "Lisan - A Blazing fast i18n library", | ||
@@ -39,5 +39,5 @@ "keywords": [ | ||
"dependencies": { | ||
"lisan-types": "^0.0.41" | ||
"lisan-types": "^0.1.1" | ||
}, | ||
"gitHead": "8c53dbf1f75f358a067196e2b28c488d38b80052" | ||
"gitHead": "24ed6a959aa7d2ec40b1a815dbae0ffa23ee7c03" | ||
} |
@@ -16,4 +16,5 @@ <p align="center"> | ||
<a href="https://lisanjs.com/docs/what-is-lisan#installation">Installation</a> · | ||
<a href="https://lisanjs.com/docs/docs/full-api-reference">API</a> · | ||
<a href="https://lisanjs.com/docs/docs/pluralization">Guides & Tips</a> | ||
<a href="https://lisanjs.com/docs/full-api-reference">API</a> · | ||
<a href="https://lisanjs.com/docs/pluralization">Guides & Tips</a> · | ||
<a href="https://github.com/lisanjs/examples">Examples</a> | ||
</p> | ||
@@ -20,0 +21,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
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
35019
71
144
+ Addedlisan-types@0.1.1(transitive)
- Removedlisan-types@0.0.41(transitive)
Updatedlisan-types@^0.1.1