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

vanilla-i18n

Package Overview
Dependencies
Maintainers
1
Versions
9
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

vanilla-i18n - npm Package Compare versions

Comparing version 1.0.7 to 1.0.8

2

dist/vanilla-i18n.js

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

!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define("lib",[],e):"object"==typeof exports?exports.lib=e():t.lib=e()}("undefined"!=typeof self?self:this,function(){return function(t){var e={};function n(r){if(e[r])return e[r].exports;var o=e[r]={i:r,l:!1,exports:{}};return t[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}return n.m=t,n.c=e,n.d=function(t,e,r){n.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:r})},n.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n.t=function(t,e){if(1&e&&(t=n(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var o in t)n.d(r,o,function(e){return t[e]}.bind(null,o));return r},n.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(e,"a",e),e},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.p="",n(n.s=0)}([function(t,e,n){"use strict";function r(t){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}n.r(e),n.d(e,"setDefaultLanguage",function(){return u}),n.d(e,"setTranslate",function(){return p});var o="pt",i={},u=function(t){o=t},c=function(t){return null!==t&&"object"===r(t)},f=function(t){return null!==t&&"string"==typeof t},l=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},a=function(t,e,n){var r;if(e){if(!isNaN(parseInt(e)))return e;if(t){for(var o,i=e.trim().split("."),u=0,f=i.length;u<f;u++)if((o=o?o[i[u]]:t[i[u]])&&!c(o))return o;r=o}}return r||n};Object.assign(String.prototype,{translate:function(){var t,e,n;arguments.length>0&&((arguments.length<=0?void 0:arguments[0])&&f(arguments.length<=0?void 0:arguments[0])&&(e=arguments.length<=0?void 0:arguments[0]),(arguments.length<=0?void 0:arguments[0])&&c(arguments.length<=0?void 0:arguments[0])&&(n=arguments.length<=0?void 0:arguments[0]),(arguments.length<=1?void 0:arguments[1])&&c(arguments.length<=1?void 0:arguments[1])&&(n=arguments.length<=1?void 0:arguments[1])),e||(e=o);var r=i[e]||{};l(r,this)&&(t=r[this]);var u=!t;if(u){var p=this,s=p.match(/(\[\d+])/g),d=p.match(/(\[\w+])/g);s&&(p=p.replace(/(\[\d+])/g,"[:num]")),d&&(p=p.replace(/(\[\w+])/g,"[:str]")),(t=a(r,this,""))&&(s&&s.forEach(function(e,n){t=(t=(t=t.replace("{$".concat(n+1,"+2}"),parseInt(e.match(/\d+/g),10)+2)).replace("{$".concat(n+1,"+1}"),parseInt(e.match(/\d+/g),10)+1)).replace("$".concat(n+1),e.match(/\d+/g))}),d&&d.forEach(function(e,n){var r=new RegExp("$".concat(n),"g");t=t.replace(r,e.match(/\w+/g))}))}return n&&(t=t.replace(/\{\s?([\w.]+)\s?\}/g,function(t,e){var r=e.trim();return n[r]||r})),t||this}});var p=function(t,e){e||(e=o),i[e]||(i[e]={}),Object.assign(i[e],t)}}])});
!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define("lib",[],e):"object"==typeof exports?exports.lib=e():t.lib=e()}("undefined"!=typeof self?self:this,(function(){return function(t){var e={};function n(r){if(e[r])return e[r].exports;var o=e[r]={i:r,l:!1,exports:{}};return t[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}return n.m=t,n.c=e,n.d=function(t,e,r){n.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:r})},n.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n.t=function(t,e){if(1&e&&(t=n(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var o in t)n.d(r,o,function(e){return t[e]}.bind(null,o));return r},n.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(e,"a",e),e},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.p="",n(n.s=0)}([function(t,e,n){"use strict";function r(t){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}n.r(e),n.d(e,"setDefaultLanguage",(function(){return u})),n.d(e,"setTranslate",(function(){return p}));var o="pt",i={},u=function(t){o=t},c=function(t){return null!==t&&"object"===r(t)},f=function(t){return null!==t&&"string"==typeof t},l=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},a=function(t,e,n){var r;if(e){if(!isNaN(parseInt(e)))return e;if(t){for(var o,i=e.trim().split("."),u=0,f=i.length;u<f;u++)if((o=o?o[i[u]]:t[i[u]])&&!c(o))return o;r=o}}return r||n};Object.assign(String.prototype,{translate:function(){var t,e,n;arguments.length>0&&((arguments.length<=0?void 0:arguments[0])&&f(arguments.length<=0?void 0:arguments[0])&&(e=arguments.length<=0?void 0:arguments[0]),(arguments.length<=0?void 0:arguments[0])&&c(arguments.length<=0?void 0:arguments[0])&&(n=arguments.length<=0?void 0:arguments[0]),(arguments.length<=1?void 0:arguments[1])&&c(arguments.length<=1?void 0:arguments[1])&&(n=arguments.length<=1?void 0:arguments[1])),e||(e=o);var r=i[e]||{};l(r,this)&&(t=r[this]);var u=!t;if(u){var p=this,s=p.match(/(\[\d+])/g),d=p.match(/(\[\w+])/g);s&&(p=p.replace(/(\[\d+])/g,"[:num]")),d&&(p=p.replace(/(\[\w+])/g,"[:str]")),(t=a(r,this,""))&&(s&&s.forEach((function(e,n){t=(t=(t=t.replace("{$".concat(n+1,"+2}"),parseInt(e.match(/\d+/g),10)+2)).replace("{$".concat(n+1,"+1}"),parseInt(e.match(/\d+/g),10)+1)).replace("$".concat(n+1),e.match(/\d+/g))})),d&&d.forEach((function(e,n){var r=new RegExp("$".concat(n),"g");t=t.replace(r,e.match(/\w+/g))})))}return n&&(t=t.replace(/\{\s?([\w.]+)\s?\}/g,(function(t,e){var r=e.trim();return n[r]||r}))),t||this}});var p=function(t,e){e||(e=o),i[e]||(i[e]={}),Object.assign(i[e],t)}}])}));
//# sourceMappingURL=vanilla-i18n.js.map
{
"name": "vanilla-i18n",
"version": "1.0.7",
"version": "1.0.8",
"description": "Translating text in a simple and easy way.",

@@ -30,17 +30,17 @@ "main": "dist/vanilla-i18n.js",

"devDependencies": {
"@babel/core": "^7.5.5",
"@babel/preset-env": "^7.5.5",
"babel-eslint": "^10.0.2",
"@babel/core": "^7.6.4",
"@babel/preset-env": "^7.6.3",
"babel-eslint": "^10.0.3",
"babel-loader": "^8.0.6",
"eslint": "^6.1.0",
"eslint-config-standard": "^13.0.1",
"eslint-loader": "^2.2.1",
"eslint": "^6.6.0",
"eslint-config-standard": "^14.1.0",
"eslint-loader": "^3.0.2",
"eslint-plugin-import": "^2.18.2",
"eslint-plugin-node": "^9.1.0",
"eslint-plugin-node": "^10.0.0",
"eslint-plugin-promise": "^4.2.1",
"eslint-plugin-standard": "^4.0.0",
"terser-webpack-plugin": "^1.4.1",
"webpack": "^4.39.1",
"webpack-cli": "^3.3.6"
"eslint-plugin-standard": "^4.0.1",
"terser-webpack-plugin": "^2.2.1",
"webpack": "^4.41.2",
"webpack-cli": "^3.3.9"
}
}
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