Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

i18njs

Package Overview
Dependencies
Maintainers
1
Versions
24
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

i18njs - npm Package Compare versions

Comparing version 2.1.2 to 2.1.3

2

bower.json
{
"name": "i18njs",
"main": "i18njs.js",
"version": "2.1.2",
"version": "2.1.3",
"homepage": "https://github.com/yoannmoinet/i18njs",

@@ -6,0 +6,0 @@ "authors": [

@@ -1,3 +0,3 @@

<a name="2.1.2"></a>
## [2.1.2](https://github.com/yoannmoinet/i18njs/compare/v2.1.2...v2.1.2) (2015-10-06)
<a name="2.1.3"></a>
## [2.1.3](https://github.com/yoannmoinet/i18njs/compare/v2.1.3...v2.1.3) (2015-10-06)

@@ -7,2 +7,14 @@

<a name="2.1.3"></a>
## [2.1.3](https://github.com/yoannmoinet/i18njs/compare/v2.1.2...v2.1.3) (2015-10-06)
### Bug Fixes
* **concat:** roll-back concat-cli as still not fixed ([bd6fb41](https://github.com/yoannmoinet/i18njs/commit/bd6fb41))
* **defaults:** correctly extend sub-objects ([33cab2a](https://github.com/yoannmoinet/i18njs/commit/33cab2a))
* **defaults:** review priorities for defaults usage ([9ed716b](https://github.com/yoannmoinet/i18njs/commit/9ed716b))
<a name="2.1.2"></a>

@@ -123,6 +135,6 @@ ## [2.1.2](https://github.com/yoannmoinet/i18njs/compare/v2.1.1...v2.1.2) (2015-10-06)

* add Travis CI ([988fc16](https://github.com/yoannmoinet/i18njs/commit/988fc16))
* add changelog ([45a3ccd](https://github.com/yoannmoinet/i18njs/commit/45a3ccd))
* add defaults template values ([3601034](https://github.com/yoannmoinet/i18njs/commit/3601034))
* add linting ([b9de51a](https://github.com/yoannmoinet/i18njs/commit/b9de51a))
* add Travis CI ([988fc16](https://github.com/yoannmoinet/i18njs/commit/988fc16))
* **npm:** add scripts ([4b6b378](https://github.com/yoannmoinet/i18njs/commit/4b6b378))

@@ -129,0 +141,0 @@

@@ -123,3 +123,3 @@ (function(f){if(typeof exports==="object"&&typeof module!=="undefined"){module.exports=f()}else if(typeof define==="function"&&define.amd){define([],f)}else{var g;if(typeof window!=="undefined"){g=window}else if(typeof global!=="undefined"){g=global}else if(typeof self!=="undefined"){g=self}else{g=this}g.i18njs = f()}})(function(){var define,module,exports;

if (objB.hasOwnProperty(i)) {
if (objA.hasOwnProperty(i) && typeof objA[i] === 'object') {
if (objA.hasOwnProperty(i) && (typeof objA[i] === typeof objB[i])) {
objA[i] = extend(objB[i]);

@@ -223,5 +223,5 @@ } else {

var obj = parse(lng + '.' + key, defaults) ||
parse(key, defaults) ||
parse(lng + '.' + key, dico);
var obj = parse(lng + '.' + key, dico) ||
parse(lng + '.' + key, defaults) ||
parse(key, defaults);
options = options || {};

@@ -228,0 +228,0 @@

@@ -1,1 +0,1 @@

!function(t){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=t();else if("function"==typeof define&&define.amd)define([],t);else{var n;n="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this,n.i18njs=t()}}(function(){var t=/(.)^/,n=/\\|'|\r|\n|\u2028|\u2029/g,e={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#x27;","`":"&#x60;"},r={"'":"'","\\":"\\","\r":"r","\n":"n","\u2028":"u2028","\u2029":"u2029"},o=function(t){"use strict";var n=function(n){return t[n]},e="(?:"+Object.keys(t).join("|")+")",r=RegExp(e),o=RegExp(e,"g");return function(t){return t=null==t?"":""+t,r.test(t)?t.replace(o,n):t}},i=function(t){"use strict";return"\\"+r[t]},u=function(r,u){"use strict";var s=0,a="__p+='",f=RegExp([(u.escape||t).source,(u.interpolate||t).source,(u.evaluate||t).source].join("|")+"|$","g");r.replace(f,function(t,e,o,u,f){return a+=r.slice(s,f).replace(n,i),s=f+t.length,e?a+="'+\n((__t=("+e+"))==null?'':_.escape(__t))+\n'":o?a+="'+\n((__t=("+o+"))==null?'':__t)+\n'":u&&(a+="';\n"+u+"\n__p+='"),t}),a+="';\n",a="with(obj||{}){\n"+a+"}\n",a="var __t,__p='',__j=Array.prototype.join,print=function(){__p+=__j.call(arguments,'');};\n"+a+"return __p;\n";try{var c=new Function("obj","_",a)}catch(p){throw p.source=a,p}var l=function(t){return c.call(this,t,{escape:o(e)})};return l.source="function (data) {\n return "+c.toString()+".call(this, data, {\n escape:"+o.toString()+".call(this, { '&': '&amp;', '<': '&lt;', '>': '&gt;','\"': '&quot;', \"'\": '&#x27;','`': '&#x60;'})})}",l},s=function(t,n){"use strict";for(var e=t.split(".");n&&e.length;)n=n[e.shift()];return n},a=function(t,n){"use strict";for(var e in n)n.hasOwnProperty(e)&&(t.hasOwnProperty(e)&&"object"==typeof t[e]?t[e]=a(n[e]):t[e]=n[e]);return t},f=function(){"use strict";var t="en",n={},e={},r=/\{\{([\s\S]+?)\}\}/g,o=/\{\{=([\s\S]+?)\}\}/g,i=/\{\{-([\s\S]+?)\}\}/g;this.add=function(t,e,r){var o,i;n[t]=n[t]||{},void 0===r?(r=e,e=void 0,i=n[t]):(n[t][e]=n[t][e]||{},i=n[t][e]);for(o in r)r.hasOwnProperty(o)&&(i[o]=r[o])},this.has=function(e,r){r=r||t;var o=r+"."+e;return n[e]?!0:s(o,n)?!0:!1},this.listLangs=function(){var t=[];for(var e in n)t.push(e);return t},this.getCurrentLang=function(){return t},this.getDico=function(){return n},this.getDefaults=function(){return e},this.setLang=function(n){return t=n},this.setDefaults=function(t){e=a(e,t||{})},this.get=function(a,f,c,p){var l=p||t;void 0===p&&("string"==typeof f?(l=f,f=void 0):"string"==typeof c&&(l=c));var g=s(l+"."+a,e)||s(a,e)||s(l+"."+a,n);if(c=c||{},"string"==typeof g||"function"==typeof g){var h,_={evaluate:c.evaluate||r,interpolate:c.interpolate||o,escape:c.escape||i},d={},v=e[t]||e;for(h in v)v.hasOwnProperty(h)&&(d[h]=v[h]);for(h in f)f.hasOwnProperty(h)&&(d[h]=f[h]);return"function"!=typeof g&&"function"==typeof u&&(g=u(g,_)),g(d)}return"object"==typeof g?g:a}};return new f});
!function(t){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=t();else if("function"==typeof define&&define.amd)define([],t);else{var n;n="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this,n.i18njs=t()}}(function(){var t=/(.)^/,n=/\\|'|\r|\n|\u2028|\u2029/g,e={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#x27;","`":"&#x60;"},r={"'":"'","\\":"\\","\r":"r","\n":"n","\u2028":"u2028","\u2029":"u2029"},o=function(t){"use strict";var n=function(n){return t[n]},e="(?:"+Object.keys(t).join("|")+")",r=RegExp(e),o=RegExp(e,"g");return function(t){return t=null==t?"":""+t,r.test(t)?t.replace(o,n):t}},i=function(t){"use strict";return"\\"+r[t]},u=function(r,u){"use strict";var s=0,a="__p+='",f=RegExp([(u.escape||t).source,(u.interpolate||t).source,(u.evaluate||t).source].join("|")+"|$","g");r.replace(f,function(t,e,o,u,f){return a+=r.slice(s,f).replace(n,i),s=f+t.length,e?a+="'+\n((__t=("+e+"))==null?'':_.escape(__t))+\n'":o?a+="'+\n((__t=("+o+"))==null?'':__t)+\n'":u&&(a+="';\n"+u+"\n__p+='"),t}),a+="';\n",a="with(obj||{}){\n"+a+"}\n",a="var __t,__p='',__j=Array.prototype.join,print=function(){__p+=__j.call(arguments,'');};\n"+a+"return __p;\n";try{var c=new Function("obj","_",a)}catch(p){throw p.source=a,p}var l=function(t){return c.call(this,t,{escape:o(e)})};return l.source="function (data) {\n return "+c.toString()+".call(this, data, {\n escape:"+o.toString()+".call(this, { '&': '&amp;', '<': '&lt;', '>': '&gt;','\"': '&quot;', \"'\": '&#x27;','`': '&#x60;'})})}",l},s=function(t,n){"use strict";for(var e=t.split(".");n&&e.length;)n=n[e.shift()];return n},a=function(t,n){"use strict";for(var e in n)n.hasOwnProperty(e)&&(t.hasOwnProperty(e)&&typeof t[e]==typeof n[e]?t[e]=a(n[e]):t[e]=n[e]);return t},f=function(){"use strict";var t="en",n={},e={},r=/\{\{([\s\S]+?)\}\}/g,o=/\{\{=([\s\S]+?)\}\}/g,i=/\{\{-([\s\S]+?)\}\}/g;this.add=function(t,e,r){var o,i;n[t]=n[t]||{},void 0===r?(r=e,e=void 0,i=n[t]):(n[t][e]=n[t][e]||{},i=n[t][e]);for(o in r)r.hasOwnProperty(o)&&(i[o]=r[o])},this.has=function(e,r){r=r||t;var o=r+"."+e;return n[e]?!0:s(o,n)?!0:!1},this.listLangs=function(){var t=[];for(var e in n)t.push(e);return t},this.getCurrentLang=function(){return t},this.getDico=function(){return n},this.getDefaults=function(){return e},this.setLang=function(n){return t=n},this.setDefaults=function(t){e=a(e,t||{})},this.get=function(a,f,c,p){var l=p||t;void 0===p&&("string"==typeof f?(l=f,f=void 0):"string"==typeof c&&(l=c));var g=s(l+"."+a,n)||s(l+"."+a,e)||s(a,e);if(c=c||{},"string"==typeof g||"function"==typeof g){var h,_={evaluate:c.evaluate||r,interpolate:c.interpolate||o,escape:c.escape||i},d={},v=e[t]||e;for(h in v)v.hasOwnProperty(h)&&(d[h]=v[h]);for(h in f)f.hasOwnProperty(h)&&(d[h]=f[h]);return"function"!=typeof g&&"function"==typeof u&&(g=u(g,_)),g(d)}return"object"==typeof g?g:a}};return new f});
{
"name": "i18njs",
"version": "2.1.2",
"version": "2.1.3",
"description": "Simplistic I18N tool for universal/isomorphic Javascript.",

@@ -44,3 +44,3 @@ "main": "dist/i18njs.js",

"devDependencies": {
"concat-cli": "^1.0.*",
"concat-cli": "yoannmoinet/concat-cli",
"conventional-changelog": "0.4.3",

@@ -47,0 +47,0 @@ "eslint": "^0.24.1",

@@ -17,3 +17,3 @@ /*globals template*/

if (objB.hasOwnProperty(i)) {
if (objA.hasOwnProperty(i) && typeof objA[i] === 'object') {
if (objA.hasOwnProperty(i) && (typeof objA[i] === typeof objB[i])) {
objA[i] = extend(objB[i]);

@@ -117,5 +117,5 @@ } else {

var obj = parse(lng + '.' + key, defaults) ||
parse(key, defaults) ||
parse(lng + '.' + key, dico);
var obj = parse(lng + '.' + key, dico) ||
parse(lng + '.' + key, defaults) ||
parse(key, defaults);
options = options || {};

@@ -122,0 +122,0 @@

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc