Socket
Socket
Sign inDemoInstall

react-i18next

Package Overview
Dependencies
Maintainers
2
Versions
313
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-i18next - npm Package Compare versions

Comparing version 4.1.0 to 4.1.1

3

CHANGELOG.md

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

### 4.1.1
- Fix react-i18next to work with TypeScript [PR261](https://github.com/i18next/react-i18next/pull/261)
### 4.1.0

@@ -2,0 +5,0 @@ - eslint cleanup

10

dist/amd/react-i18next.js

@@ -237,5 +237,5 @@ define('reactI18next', ['exports', 'react', 'prop-types'], function (exports, React, PropTypes) { 'use strict';

if (!wait && _this.i18n.options.wait || _this.i18n.options.react && _this.i18n.options.react.wait) wait = _this.i18n.options.wait || _this.i18n.options.react.wait;
if (!wait && _this.i18n.options && (_this.i18n.options.wait || _this.i18n.options.react && _this.i18n.options.react.wait)) wait = true;
_this.nsMode = options.nsMode || _this.i18n.options.react && _this.i18n.options.react.nsMode || 'default';
_this.nsMode = options.nsMode || _this.i18n.options && _this.i18n.options.react && _this.i18n.options.react.nsMode || 'default';

@@ -291,2 +291,8 @@ _this.state = {

_this2.i18n.on('initialized', initialized);
// In case of race condition, that 'initialized' never comes - do immediately
// check ready state + if i18n is initialized.
setTimeout(function () {
return !_this2.state.ready && _this2.i18n.isInitialized && ready();
});
}

@@ -293,0 +299,0 @@ });

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

define("reactI18next",["exports","react","prop-types"],function(e,t,n){"use strict";function r(e){return e.displayName||e.name||"Component"}function o(e){var o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=o.withRef,a=void 0!==i&&i,s=o.bindI18n,p=void 0===s?"languageChanged loaded":s,c=o.bindStore,l=void 0===c?"added removed":c,d=o.translateFuncName,w=void 0===d?"t":d,O=o.wait,j=void 0!==O&&O;return function(i){var s=function(t){function n(t,r){y(this,n);var i=b(this,(n.__proto__||Object.getPrototypeOf(n)).call(this,t,r));return i.i18n=r.i18n||t.i18n,e=e||i.i18n.options.defaultNS,"string"==typeof e&&(e=[e]),(!j&&i.i18n.options.wait||i.i18n.options.react&&i.i18n.options.react.wait)&&(j=i.i18n.options.wait||i.i18n.options.react.wait),i.nsMode=o.nsMode||i.i18n.options.react&&i.i18n.options.react.nsMode||"default",i.state={i18nLoadedAt:null,ready:!1},i.onI18nChanged=i.onI18nChanged.bind(i),i.getWrappedInstance=i.getWrappedInstance.bind(i),i}return g(n,t),h(n,[{key:"getChildContext",value:function(){return m({},w,this[w])}},{key:"componentWillMount",value:function(){this[w]=this.i18n.getFixedT(null,"fallback"===this.nsMode?e:e[0])}},{key:"componentDidMount",value:function(){var t=this,n=function(){p&&t.i18n&&t.i18n.on(p,t.onI18nChanged),l&&t.i18n.store&&t.i18n.store.on(l,t.onI18nChanged)};this.mounted=!0,this.i18n.loadNamespaces(e,function(){var e=function(){t.mounted&&t.setState({ready:!0}),j&&t.mounted&&n()};if(t.i18n.isInitialized)e();else{var r=function n(){setTimeout(function(){t.i18n.off("initialized",n)},1e3),e()};t.i18n.on("initialized",r)}}),j||n()}},{key:"componentWillUnmount",value:function(){var e=this;if(this.mounted=!1,this.onI18nChanged){if(p){p.split(" ").forEach(function(t){return e.i18n.off(t,e.onI18nChanged)})}if(l){l.split(" ").forEach(function(t){return e.i18n.store&&e.i18n.store.off(t,e.onI18nChanged)})}}}},{key:"onI18nChanged",value:function(){this.mounted&&this.setState({i18nLoadedAt:new Date})}},{key:"getWrappedInstance",value:function(){return a||console.error("To access the wrapped instance, you need to specify { withRef: true } as the second argument of the translate() call."),this.refs.wrappedInstance}},{key:"render",value:function(){var e,t=this.state,n=t.i18nLoadedAt,r=t.ready,o=(e={i18nLoadedAt:n},m(e,w,this[w]),m(e,"i18n",this.i18n),e);return a&&(o.ref="wrappedInstance"),!r&&j?null:u.createElement(i,v({},this.props,o))}}]),n}(t.Component);return s.WrappedComponent=i,s.contextTypes={i18n:n.object},s.childContextTypes=m({},w,n.func.isRequired),s.displayName="Translate("+r(i)+")",s.namespaces=e,f(s,i)}}function i(e,t){for(var n=0,r=e.length;n<r;n++)if("object"===d(e[n])){var o=!0,i=!1,a=void 0;try{for(var s,u=Object.entries(e[n])[Symbol.iterator]();!(o=(s=u.next()).done);o=!0){var p=w(s.value,2),c=p[0],l=p[1];t(l,n,c)}}catch(e){i=!0,a=e}finally{try{!o&&u.return&&u.return()}finally{if(i)throw a}}}else t(e[n],n)}function a(e){var t=[];return i(e,function(e){e&&e.namespaces&&e.namespaces.forEach(function(e){-1===t.indexOf(e)&&t.push(e)})}),t}function s(e){var t=e.components,n=e.i18n,r=a(t);return new Promise(function(e){n.loadNamespaces(r,e)})}var u="default"in t?t.default:t;n="default"in n?n.default:n;var p={childContextTypes:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,mixins:!0,propTypes:!0,type:!0},c={name:!0,length:!0,prototype:!0,caller:!0,arguments:!0,arity:!0},l="function"==typeof Object.getOwnPropertySymbols,f=function(e,t,n){if("string"!=typeof t){var r=Object.getOwnPropertyNames(t);l&&(r=r.concat(Object.getOwnPropertySymbols(t)));for(var o=0;o<r.length;++o)if(!(p[r[o]]||c[r[o]]||n&&n[r[o]]))try{e[r[o]]=t[r[o]]}catch(e){}}return e},d="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},y=function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")},h=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),m=function(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e},v=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},g=function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)},b=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t},w=function(){function e(e,t){var n=[],r=!0,o=!1,i=void 0;try{for(var a,s=e[Symbol.iterator]();!(r=(a=s.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(e){o=!0,i=e}finally{try{!r&&s.return&&s.return()}finally{if(o)throw i}}return n}return function(t,n){if(Array.isArray(t))return t;if(Symbol.iterator in Object(t))return e(t,n);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),O=function(e){function t(e,n){y(this,t);var r=b(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e,n));return r.i18n=n.i18n,r.t=n.t,r}return g(t,e),h(t,[{key:"render",value:function(){var e=this,t=this.props.parent||"span",n=this.props.regexp||this.i18n.services.interpolator.regexp,r=this.props,o=r.className,i=r.style,a=this.props.useDangerouslySetInnerHTML||!1,s=this.props.dangerouslySetInnerHTMLPartElement||"span",p=v({},this.props.options,{interpolation:{prefix:"#$?",suffix:"?$#"}}),c=this.t(this.props.i18nKey,p);if(!c||"string"!=typeof c)return u.createElement("noscript",null);var l=[],f=function(t,n){if(t.indexOf(e.i18n.options.interpolation.formatSeparator)<0)return void 0===n[t]&&e.i18n.services.logger.warn("interpolator: missed to pass in variable "+t+" for interpolating "+c),n[t];var r=t.split(e.i18n.options.interpolation.formatSeparator),o=r.shift().trim(),i=r.join(e.i18n.options.interpolation.formatSeparator).trim();return void 0===n[o]&&e.i18n.services.logger.warn("interpolator: missed to pass in variable "+o+" for interpolating "+c),e.i18n.options.interpolation.format(n[o],i,e.i18n.language)};c.split(n).reduce(function(t,n,r){var o=void 0;if(r%2==0){if(0===n.length)return t;o=a?u.createElement(s,{dangerouslySetInnerHTML:{__html:n}}):n}else o=f(n,e.props);return t.push(o),t},l);var d={};return o&&(d.className=o),i&&(d.style=i),u.createElement.apply(this,[t,d].concat(l))}}]),t}(t.Component);O.propTypes={className:n.string},O.defaultProps={className:""},O.contextTypes={i18n:n.object.isRequired,t:n.func.isRequired};var j=function(e){function n(e,t){y(this,n);var r=b(this,(n.__proto__||Object.getPrototypeOf(n)).call(this,e,t));return r.i18n=e.i18n,r}return g(n,e),h(n,[{key:"getChildContext",value:function(){return{i18n:this.i18n}}},{key:"componentWillReceiveProps",value:function(e){if(this.props.i18n!==e.i18n)throw new Error("[react-i18next][I18nextProvider]does not support changing the i18n object.")}},{key:"render",value:function(){var e=this.props.children;return t.Children.only(e)}}]),n}(t.Component);j.propTypes={i18n:n.object.isRequired,children:n.element.isRequired},j.childContextTypes={i18n:n.object.isRequired},e.loadNamespaces=s,e.translate=o,e.Interpolate=O,e.I18nextProvider=j,Object.defineProperty(e,"__esModule",{value:!0})});
define("reactI18next",["exports","react","prop-types"],function(e,t,n){"use strict";function r(e){return e.displayName||e.name||"Component"}function o(e){var o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=o.withRef,a=void 0!==i&&i,s=o.bindI18n,p=void 0===s?"languageChanged loaded":s,c=o.bindStore,l=void 0===c?"added removed":c,d=o.translateFuncName,w=void 0===d?"t":d,O=o.wait,j=void 0!==O&&O;return function(i){var s=function(t){function n(t,r){y(this,n);var i=b(this,(n.__proto__||Object.getPrototypeOf(n)).call(this,t,r));return i.i18n=r.i18n||t.i18n,e=e||i.i18n.options.defaultNS,"string"==typeof e&&(e=[e]),!j&&i.i18n.options&&(i.i18n.options.wait||i.i18n.options.react&&i.i18n.options.react.wait)&&(j=!0),i.nsMode=o.nsMode||i.i18n.options&&i.i18n.options.react&&i.i18n.options.react.nsMode||"default",i.state={i18nLoadedAt:null,ready:!1},i.onI18nChanged=i.onI18nChanged.bind(i),i.getWrappedInstance=i.getWrappedInstance.bind(i),i}return g(n,t),h(n,[{key:"getChildContext",value:function(){return m({},w,this[w])}},{key:"componentWillMount",value:function(){this[w]=this.i18n.getFixedT(null,"fallback"===this.nsMode?e:e[0])}},{key:"componentDidMount",value:function(){var t=this,n=function(){p&&t.i18n&&t.i18n.on(p,t.onI18nChanged),l&&t.i18n.store&&t.i18n.store.on(l,t.onI18nChanged)};this.mounted=!0,this.i18n.loadNamespaces(e,function(){var e=function(){t.mounted&&t.setState({ready:!0}),j&&t.mounted&&n()};if(t.i18n.isInitialized)e();else{var r=function n(){setTimeout(function(){t.i18n.off("initialized",n)},1e3),e()};t.i18n.on("initialized",r),setTimeout(function(){return!t.state.ready&&t.i18n.isInitialized&&e()})}}),j||n()}},{key:"componentWillUnmount",value:function(){var e=this;if(this.mounted=!1,this.onI18nChanged){if(p){p.split(" ").forEach(function(t){return e.i18n.off(t,e.onI18nChanged)})}if(l){l.split(" ").forEach(function(t){return e.i18n.store&&e.i18n.store.off(t,e.onI18nChanged)})}}}},{key:"onI18nChanged",value:function(){this.mounted&&this.setState({i18nLoadedAt:new Date})}},{key:"getWrappedInstance",value:function(){return a||console.error("To access the wrapped instance, you need to specify { withRef: true } as the second argument of the translate() call."),this.refs.wrappedInstance}},{key:"render",value:function(){var e,t=this.state,n=t.i18nLoadedAt,r=t.ready,o=(e={i18nLoadedAt:n},m(e,w,this[w]),m(e,"i18n",this.i18n),e);return a&&(o.ref="wrappedInstance"),!r&&j?null:u.createElement(i,v({},this.props,o))}}]),n}(t.Component);return s.WrappedComponent=i,s.contextTypes={i18n:n.object},s.childContextTypes=m({},w,n.func.isRequired),s.displayName="Translate("+r(i)+")",s.namespaces=e,f(s,i)}}function i(e,t){for(var n=0,r=e.length;n<r;n++)if("object"===d(e[n])){var o=!0,i=!1,a=void 0;try{for(var s,u=Object.entries(e[n])[Symbol.iterator]();!(o=(s=u.next()).done);o=!0){var p=w(s.value,2),c=p[0],l=p[1];t(l,n,c)}}catch(e){i=!0,a=e}finally{try{!o&&u.return&&u.return()}finally{if(i)throw a}}}else t(e[n],n)}function a(e){var t=[];return i(e,function(e){e&&e.namespaces&&e.namespaces.forEach(function(e){-1===t.indexOf(e)&&t.push(e)})}),t}function s(e){var t=e.components,n=e.i18n,r=a(t);return new Promise(function(e){n.loadNamespaces(r,e)})}var u="default"in t?t.default:t;n="default"in n?n.default:n;var p={childContextTypes:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,mixins:!0,propTypes:!0,type:!0},c={name:!0,length:!0,prototype:!0,caller:!0,arguments:!0,arity:!0},l="function"==typeof Object.getOwnPropertySymbols,f=function(e,t,n){if("string"!=typeof t){var r=Object.getOwnPropertyNames(t);l&&(r=r.concat(Object.getOwnPropertySymbols(t)));for(var o=0;o<r.length;++o)if(!(p[r[o]]||c[r[o]]||n&&n[r[o]]))try{e[r[o]]=t[r[o]]}catch(e){}}return e},d="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},y=function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")},h=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),m=function(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e},v=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},g=function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)},b=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t},w=function(){function e(e,t){var n=[],r=!0,o=!1,i=void 0;try{for(var a,s=e[Symbol.iterator]();!(r=(a=s.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(e){o=!0,i=e}finally{try{!r&&s.return&&s.return()}finally{if(o)throw i}}return n}return function(t,n){if(Array.isArray(t))return t;if(Symbol.iterator in Object(t))return e(t,n);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),O=function(e){function t(e,n){y(this,t);var r=b(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e,n));return r.i18n=n.i18n,r.t=n.t,r}return g(t,e),h(t,[{key:"render",value:function(){var e=this,t=this.props.parent||"span",n=this.props.regexp||this.i18n.services.interpolator.regexp,r=this.props,o=r.className,i=r.style,a=this.props.useDangerouslySetInnerHTML||!1,s=this.props.dangerouslySetInnerHTMLPartElement||"span",p=v({},this.props.options,{interpolation:{prefix:"#$?",suffix:"?$#"}}),c=this.t(this.props.i18nKey,p);if(!c||"string"!=typeof c)return u.createElement("noscript",null);var l=[],f=function(t,n){if(t.indexOf(e.i18n.options.interpolation.formatSeparator)<0)return void 0===n[t]&&e.i18n.services.logger.warn("interpolator: missed to pass in variable "+t+" for interpolating "+c),n[t];var r=t.split(e.i18n.options.interpolation.formatSeparator),o=r.shift().trim(),i=r.join(e.i18n.options.interpolation.formatSeparator).trim();return void 0===n[o]&&e.i18n.services.logger.warn("interpolator: missed to pass in variable "+o+" for interpolating "+c),e.i18n.options.interpolation.format(n[o],i,e.i18n.language)};c.split(n).reduce(function(t,n,r){var o=void 0;if(r%2==0){if(0===n.length)return t;o=a?u.createElement(s,{dangerouslySetInnerHTML:{__html:n}}):n}else o=f(n,e.props);return t.push(o),t},l);var d={};return o&&(d.className=o),i&&(d.style=i),u.createElement.apply(this,[t,d].concat(l))}}]),t}(t.Component);O.propTypes={className:n.string},O.defaultProps={className:""},O.contextTypes={i18n:n.object.isRequired,t:n.func.isRequired};var j=function(e){function n(e,t){y(this,n);var r=b(this,(n.__proto__||Object.getPrototypeOf(n)).call(this,e,t));return r.i18n=e.i18n,r}return g(n,e),h(n,[{key:"getChildContext",value:function(){return{i18n:this.i18n}}},{key:"componentWillReceiveProps",value:function(e){if(this.props.i18n!==e.i18n)throw new Error("[react-i18next][I18nextProvider]does not support changing the i18n object.")}},{key:"render",value:function(){var e=this.props.children;return t.Children.only(e)}}]),n}(t.Component);j.propTypes={i18n:n.object.isRequired,children:n.element.isRequired},j.childContextTypes={i18n:n.object.isRequired},e.loadNamespaces=s,e.translate=o,e.Interpolate=O,e.I18nextProvider=j,Object.defineProperty(e,"__esModule",{value:!0})});

@@ -66,5 +66,5 @@ 'use strict';

if (!wait && _this.i18n.options.wait || _this.i18n.options.react && _this.i18n.options.react.wait) wait = _this.i18n.options.wait || _this.i18n.options.react.wait;
if (!wait && _this.i18n.options && (_this.i18n.options.wait || _this.i18n.options.react && _this.i18n.options.react.wait)) wait = true;
_this.nsMode = options.nsMode || _this.i18n.options.react && _this.i18n.options.react.nsMode || 'default';
_this.nsMode = options.nsMode || _this.i18n.options && _this.i18n.options.react && _this.i18n.options.react.nsMode || 'default';

@@ -120,2 +120,8 @@ _this.state = {

_this2.i18n.on('initialized', initialized);
// In case of race condition, that 'initialized' never comes - do immediately
// check ready state + if i18n is initialized.
setTimeout(function () {
return !_this2.state.ready && _this2.i18n.isInitialized && ready();
});
}

@@ -122,0 +128,0 @@ });

@@ -48,5 +48,5 @@ var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };

if (!wait && _this.i18n.options.wait || _this.i18n.options.react && _this.i18n.options.react.wait) wait = _this.i18n.options.wait || _this.i18n.options.react.wait;
if (!wait && _this.i18n.options && (_this.i18n.options.wait || _this.i18n.options.react && _this.i18n.options.react.wait)) wait = true;
_this.nsMode = options.nsMode || _this.i18n.options.react && _this.i18n.options.react.nsMode || 'default';
_this.nsMode = options.nsMode || _this.i18n.options && _this.i18n.options.react && _this.i18n.options.react.nsMode || 'default';

@@ -102,2 +102,8 @@ _this.state = {

_this2.i18n.on('initialized', initialized);
// In case of race condition, that 'initialized' never comes - do immediately
// check ready state + if i18n is initialized.
setTimeout(function () {
return !_this2.state.ready && _this2.i18n.isInitialized && ready();
});
}

@@ -104,0 +110,0 @@ });

@@ -241,5 +241,5 @@ (function (global, factory) {

if (!wait && _this.i18n.options.wait || _this.i18n.options.react && _this.i18n.options.react.wait) wait = _this.i18n.options.wait || _this.i18n.options.react.wait;
if (!wait && _this.i18n.options && (_this.i18n.options.wait || _this.i18n.options.react && _this.i18n.options.react.wait)) wait = true;
_this.nsMode = options.nsMode || _this.i18n.options.react && _this.i18n.options.react.nsMode || 'default';
_this.nsMode = options.nsMode || _this.i18n.options && _this.i18n.options.react && _this.i18n.options.react.nsMode || 'default';

@@ -295,2 +295,8 @@ _this.state = {

_this2.i18n.on('initialized', initialized);
// In case of race condition, that 'initialized' never comes - do immediately
// check ready state + if i18n is initialized.
setTimeout(function () {
return !_this2.state.ready && _this2.i18n.isInitialized && ready();
});
}

@@ -297,0 +303,0 @@ });

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

!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("react"),require("prop-types")):"function"==typeof define&&define.amd?define("reactI18next",["exports","react","prop-types"],t):t(e.reactI18next=e.reactI18next||{},e.React,e.PropTypes)}(this,function(e,t,n){"use strict";function r(e){return e.displayName||e.name||"Component"}function o(e){var o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=o.withRef,a=void 0!==i&&i,s=o.bindI18n,u=void 0===s?"languageChanged loaded":s,c=o.bindStore,l=void 0===c?"added removed":c,d=o.translateFuncName,w=void 0===d?"t":d,x=o.wait,O=void 0!==x&&x;return function(i){var s=function(t){function n(t,r){y(this,n);var i=g(this,(n.__proto__||Object.getPrototypeOf(n)).call(this,t,r));return i.i18n=r.i18n||t.i18n,e=e||i.i18n.options.defaultNS,"string"==typeof e&&(e=[e]),(!O&&i.i18n.options.wait||i.i18n.options.react&&i.i18n.options.react.wait)&&(O=i.i18n.options.wait||i.i18n.options.react.wait),i.nsMode=o.nsMode||i.i18n.options.react&&i.i18n.options.react.nsMode||"default",i.state={i18nLoadedAt:null,ready:!1},i.onI18nChanged=i.onI18nChanged.bind(i),i.getWrappedInstance=i.getWrappedInstance.bind(i),i}return b(n,t),h(n,[{key:"getChildContext",value:function(){return m({},w,this[w])}},{key:"componentWillMount",value:function(){this[w]=this.i18n.getFixedT(null,"fallback"===this.nsMode?e:e[0])}},{key:"componentDidMount",value:function(){var t=this,n=function(){u&&t.i18n&&t.i18n.on(u,t.onI18nChanged),l&&t.i18n.store&&t.i18n.store.on(l,t.onI18nChanged)};this.mounted=!0,this.i18n.loadNamespaces(e,function(){var e=function(){t.mounted&&t.setState({ready:!0}),O&&t.mounted&&n()};if(t.i18n.isInitialized)e();else{var r=function n(){setTimeout(function(){t.i18n.off("initialized",n)},1e3),e()};t.i18n.on("initialized",r)}}),O||n()}},{key:"componentWillUnmount",value:function(){var e=this;if(this.mounted=!1,this.onI18nChanged){if(u){u.split(" ").forEach(function(t){return e.i18n.off(t,e.onI18nChanged)})}if(l){l.split(" ").forEach(function(t){return e.i18n.store&&e.i18n.store.off(t,e.onI18nChanged)})}}}},{key:"onI18nChanged",value:function(){this.mounted&&this.setState({i18nLoadedAt:new Date})}},{key:"getWrappedInstance",value:function(){return a||console.error("To access the wrapped instance, you need to specify { withRef: true } as the second argument of the translate() call."),this.refs.wrappedInstance}},{key:"render",value:function(){var e,t=this.state,n=t.i18nLoadedAt,r=t.ready,o=(e={i18nLoadedAt:n},m(e,w,this[w]),m(e,"i18n",this.i18n),e);return a&&(o.ref="wrappedInstance"),!r&&O?null:p.createElement(i,v({},this.props,o))}}]),n}(t.Component);return s.WrappedComponent=i,s.contextTypes={i18n:n.object},s.childContextTypes=m({},w,n.func.isRequired),s.displayName="Translate("+r(i)+")",s.namespaces=e,f(s,i)}}function i(e,t){for(var n=0,r=e.length;n<r;n++)if("object"===d(e[n])){var o=!0,i=!1,a=void 0;try{for(var s,p=Object.entries(e[n])[Symbol.iterator]();!(o=(s=p.next()).done);o=!0){var u=w(s.value,2),c=u[0],l=u[1];t(l,n,c)}}catch(e){i=!0,a=e}finally{try{!o&&p.return&&p.return()}finally{if(i)throw a}}}else t(e[n],n)}function a(e){var t=[];return i(e,function(e){e&&e.namespaces&&e.namespaces.forEach(function(e){-1===t.indexOf(e)&&t.push(e)})}),t}function s(e){var t=e.components,n=e.i18n,r=a(t);return new Promise(function(e){n.loadNamespaces(r,e)})}var p="default"in t?t.default:t;n="default"in n?n.default:n;var u={childContextTypes:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,mixins:!0,propTypes:!0,type:!0},c={name:!0,length:!0,prototype:!0,caller:!0,arguments:!0,arity:!0},l="function"==typeof Object.getOwnPropertySymbols,f=function(e,t,n){if("string"!=typeof t){var r=Object.getOwnPropertyNames(t);l&&(r=r.concat(Object.getOwnPropertySymbols(t)));for(var o=0;o<r.length;++o)if(!(u[r[o]]||c[r[o]]||n&&n[r[o]]))try{e[r[o]]=t[r[o]]}catch(e){}}return e},d="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},y=function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")},h=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),m=function(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e},v=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},b=function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)},g=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t},w=function(){function e(e,t){var n=[],r=!0,o=!1,i=void 0;try{for(var a,s=e[Symbol.iterator]();!(r=(a=s.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(e){o=!0,i=e}finally{try{!r&&s.return&&s.return()}finally{if(o)throw i}}return n}return function(t,n){if(Array.isArray(t))return t;if(Symbol.iterator in Object(t))return e(t,n);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),x=function(e){function t(e,n){y(this,t);var r=g(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e,n));return r.i18n=n.i18n,r.t=n.t,r}return b(t,e),h(t,[{key:"render",value:function(){var e=this,t=this.props.parent||"span",n=this.props.regexp||this.i18n.services.interpolator.regexp,r=this.props,o=r.className,i=r.style,a=this.props.useDangerouslySetInnerHTML||!1,s=this.props.dangerouslySetInnerHTMLPartElement||"span",u=v({},this.props.options,{interpolation:{prefix:"#$?",suffix:"?$#"}}),c=this.t(this.props.i18nKey,u);if(!c||"string"!=typeof c)return p.createElement("noscript",null);var l=[],f=function(t,n){if(t.indexOf(e.i18n.options.interpolation.formatSeparator)<0)return void 0===n[t]&&e.i18n.services.logger.warn("interpolator: missed to pass in variable "+t+" for interpolating "+c),n[t];var r=t.split(e.i18n.options.interpolation.formatSeparator),o=r.shift().trim(),i=r.join(e.i18n.options.interpolation.formatSeparator).trim();return void 0===n[o]&&e.i18n.services.logger.warn("interpolator: missed to pass in variable "+o+" for interpolating "+c),e.i18n.options.interpolation.format(n[o],i,e.i18n.language)};c.split(n).reduce(function(t,n,r){var o=void 0;if(r%2==0){if(0===n.length)return t;o=a?p.createElement(s,{dangerouslySetInnerHTML:{__html:n}}):n}else o=f(n,e.props);return t.push(o),t},l);var d={};return o&&(d.className=o),i&&(d.style=i),p.createElement.apply(this,[t,d].concat(l))}}]),t}(t.Component);x.propTypes={className:n.string},x.defaultProps={className:""},x.contextTypes={i18n:n.object.isRequired,t:n.func.isRequired};var O=function(e){function n(e,t){y(this,n);var r=g(this,(n.__proto__||Object.getPrototypeOf(n)).call(this,e,t));return r.i18n=e.i18n,r}return b(n,e),h(n,[{key:"getChildContext",value:function(){return{i18n:this.i18n}}},{key:"componentWillReceiveProps",value:function(e){if(this.props.i18n!==e.i18n)throw new Error("[react-i18next][I18nextProvider]does not support changing the i18n object.")}},{key:"render",value:function(){var e=this.props.children;return t.Children.only(e)}}]),n}(t.Component);O.propTypes={i18n:n.object.isRequired,children:n.element.isRequired},O.childContextTypes={i18n:n.object.isRequired},e.loadNamespaces=s,e.translate=o,e.Interpolate=x,e.I18nextProvider=O,Object.defineProperty(e,"__esModule",{value:!0})});
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("react"),require("prop-types")):"function"==typeof define&&define.amd?define("reactI18next",["exports","react","prop-types"],t):t(e.reactI18next=e.reactI18next||{},e.React,e.PropTypes)}(this,function(e,t,n){"use strict";function r(e){return e.displayName||e.name||"Component"}function o(e){var o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=o.withRef,a=void 0!==i&&i,s=o.bindI18n,p=void 0===s?"languageChanged loaded":s,c=o.bindStore,l=void 0===c?"added removed":c,d=o.translateFuncName,w=void 0===d?"t":d,x=o.wait,O=void 0!==x&&x;return function(i){var s=function(t){function n(t,r){y(this,n);var i=g(this,(n.__proto__||Object.getPrototypeOf(n)).call(this,t,r));return i.i18n=r.i18n||t.i18n,e=e||i.i18n.options.defaultNS,"string"==typeof e&&(e=[e]),!O&&i.i18n.options&&(i.i18n.options.wait||i.i18n.options.react&&i.i18n.options.react.wait)&&(O=!0),i.nsMode=o.nsMode||i.i18n.options&&i.i18n.options.react&&i.i18n.options.react.nsMode||"default",i.state={i18nLoadedAt:null,ready:!1},i.onI18nChanged=i.onI18nChanged.bind(i),i.getWrappedInstance=i.getWrappedInstance.bind(i),i}return b(n,t),h(n,[{key:"getChildContext",value:function(){return m({},w,this[w])}},{key:"componentWillMount",value:function(){this[w]=this.i18n.getFixedT(null,"fallback"===this.nsMode?e:e[0])}},{key:"componentDidMount",value:function(){var t=this,n=function(){p&&t.i18n&&t.i18n.on(p,t.onI18nChanged),l&&t.i18n.store&&t.i18n.store.on(l,t.onI18nChanged)};this.mounted=!0,this.i18n.loadNamespaces(e,function(){var e=function(){t.mounted&&t.setState({ready:!0}),O&&t.mounted&&n()};if(t.i18n.isInitialized)e();else{var r=function n(){setTimeout(function(){t.i18n.off("initialized",n)},1e3),e()};t.i18n.on("initialized",r),setTimeout(function(){return!t.state.ready&&t.i18n.isInitialized&&e()})}}),O||n()}},{key:"componentWillUnmount",value:function(){var e=this;if(this.mounted=!1,this.onI18nChanged){if(p){p.split(" ").forEach(function(t){return e.i18n.off(t,e.onI18nChanged)})}if(l){l.split(" ").forEach(function(t){return e.i18n.store&&e.i18n.store.off(t,e.onI18nChanged)})}}}},{key:"onI18nChanged",value:function(){this.mounted&&this.setState({i18nLoadedAt:new Date})}},{key:"getWrappedInstance",value:function(){return a||console.error("To access the wrapped instance, you need to specify { withRef: true } as the second argument of the translate() call."),this.refs.wrappedInstance}},{key:"render",value:function(){var e,t=this.state,n=t.i18nLoadedAt,r=t.ready,o=(e={i18nLoadedAt:n},m(e,w,this[w]),m(e,"i18n",this.i18n),e);return a&&(o.ref="wrappedInstance"),!r&&O?null:u.createElement(i,v({},this.props,o))}}]),n}(t.Component);return s.WrappedComponent=i,s.contextTypes={i18n:n.object},s.childContextTypes=m({},w,n.func.isRequired),s.displayName="Translate("+r(i)+")",s.namespaces=e,f(s,i)}}function i(e,t){for(var n=0,r=e.length;n<r;n++)if("object"===d(e[n])){var o=!0,i=!1,a=void 0;try{for(var s,u=Object.entries(e[n])[Symbol.iterator]();!(o=(s=u.next()).done);o=!0){var p=w(s.value,2),c=p[0],l=p[1];t(l,n,c)}}catch(e){i=!0,a=e}finally{try{!o&&u.return&&u.return()}finally{if(i)throw a}}}else t(e[n],n)}function a(e){var t=[];return i(e,function(e){e&&e.namespaces&&e.namespaces.forEach(function(e){-1===t.indexOf(e)&&t.push(e)})}),t}function s(e){var t=e.components,n=e.i18n,r=a(t);return new Promise(function(e){n.loadNamespaces(r,e)})}var u="default"in t?t.default:t;n="default"in n?n.default:n;var p={childContextTypes:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,mixins:!0,propTypes:!0,type:!0},c={name:!0,length:!0,prototype:!0,caller:!0,arguments:!0,arity:!0},l="function"==typeof Object.getOwnPropertySymbols,f=function(e,t,n){if("string"!=typeof t){var r=Object.getOwnPropertyNames(t);l&&(r=r.concat(Object.getOwnPropertySymbols(t)));for(var o=0;o<r.length;++o)if(!(p[r[o]]||c[r[o]]||n&&n[r[o]]))try{e[r[o]]=t[r[o]]}catch(e){}}return e},d="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},y=function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")},h=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),m=function(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e},v=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},b=function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)},g=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t},w=function(){function e(e,t){var n=[],r=!0,o=!1,i=void 0;try{for(var a,s=e[Symbol.iterator]();!(r=(a=s.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(e){o=!0,i=e}finally{try{!r&&s.return&&s.return()}finally{if(o)throw i}}return n}return function(t,n){if(Array.isArray(t))return t;if(Symbol.iterator in Object(t))return e(t,n);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),x=function(e){function t(e,n){y(this,t);var r=g(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e,n));return r.i18n=n.i18n,r.t=n.t,r}return b(t,e),h(t,[{key:"render",value:function(){var e=this,t=this.props.parent||"span",n=this.props.regexp||this.i18n.services.interpolator.regexp,r=this.props,o=r.className,i=r.style,a=this.props.useDangerouslySetInnerHTML||!1,s=this.props.dangerouslySetInnerHTMLPartElement||"span",p=v({},this.props.options,{interpolation:{prefix:"#$?",suffix:"?$#"}}),c=this.t(this.props.i18nKey,p);if(!c||"string"!=typeof c)return u.createElement("noscript",null);var l=[],f=function(t,n){if(t.indexOf(e.i18n.options.interpolation.formatSeparator)<0)return void 0===n[t]&&e.i18n.services.logger.warn("interpolator: missed to pass in variable "+t+" for interpolating "+c),n[t];var r=t.split(e.i18n.options.interpolation.formatSeparator),o=r.shift().trim(),i=r.join(e.i18n.options.interpolation.formatSeparator).trim();return void 0===n[o]&&e.i18n.services.logger.warn("interpolator: missed to pass in variable "+o+" for interpolating "+c),e.i18n.options.interpolation.format(n[o],i,e.i18n.language)};c.split(n).reduce(function(t,n,r){var o=void 0;if(r%2==0){if(0===n.length)return t;o=a?u.createElement(s,{dangerouslySetInnerHTML:{__html:n}}):n}else o=f(n,e.props);return t.push(o),t},l);var d={};return o&&(d.className=o),i&&(d.style=i),u.createElement.apply(this,[t,d].concat(l))}}]),t}(t.Component);x.propTypes={className:n.string},x.defaultProps={className:""},x.contextTypes={i18n:n.object.isRequired,t:n.func.isRequired};var O=function(e){function n(e,t){y(this,n);var r=g(this,(n.__proto__||Object.getPrototypeOf(n)).call(this,e,t));return r.i18n=e.i18n,r}return b(n,e),h(n,[{key:"getChildContext",value:function(){return{i18n:this.i18n}}},{key:"componentWillReceiveProps",value:function(e){if(this.props.i18n!==e.i18n)throw new Error("[react-i18next][I18nextProvider]does not support changing the i18n object.")}},{key:"render",value:function(){var e=this.props.children;return t.Children.only(e)}}]),n}(t.Component);O.propTypes={i18n:n.object.isRequired,children:n.element.isRequired},O.childContextTypes={i18n:n.object.isRequired},e.loadNamespaces=s,e.translate=o,e.Interpolate=x,e.I18nextProvider=O,Object.defineProperty(e,"__esModule",{value:!0})});
{
"name": "react-i18next",
"version": "4.1.0",
"version": "4.1.1",
"description": "Internationalization for react done right. Using the i18next i18n ecosystem.",

@@ -88,4 +88,10 @@ "main": "dist/commonjs/index.js",

"**/?(*.)(spec|test).js?(x)"
],
"collectCoverageFrom": [
"**/src/*.{js,jsx}",
"!**/src/index.js",
"!**/node_modules/**",
"!**/test/**"
]
}
}

@@ -241,5 +241,5 @@ (function (global, factory) {

if (!wait && _this.i18n.options.wait || _this.i18n.options.react && _this.i18n.options.react.wait) wait = _this.i18n.options.wait || _this.i18n.options.react.wait;
if (!wait && _this.i18n.options && (_this.i18n.options.wait || _this.i18n.options.react && _this.i18n.options.react.wait)) wait = true;
_this.nsMode = options.nsMode || _this.i18n.options.react && _this.i18n.options.react.nsMode || 'default';
_this.nsMode = options.nsMode || _this.i18n.options && _this.i18n.options.react && _this.i18n.options.react.nsMode || 'default';

@@ -295,2 +295,8 @@ _this.state = {

_this2.i18n.on('initialized', initialized);
// In case of race condition, that 'initialized' never comes - do immediately
// check ready state + if i18n is initialized.
setTimeout(function () {
return !_this2.state.ready && _this2.i18n.isInitialized && ready();
});
}

@@ -297,0 +303,0 @@ });

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

!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("react"),require("prop-types")):"function"==typeof define&&define.amd?define("reactI18next",["exports","react","prop-types"],t):t(e.reactI18next=e.reactI18next||{},e.React,e.PropTypes)}(this,function(e,t,n){"use strict";function r(e){return e.displayName||e.name||"Component"}function o(e){var o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=o.withRef,a=void 0!==i&&i,s=o.bindI18n,u=void 0===s?"languageChanged loaded":s,c=o.bindStore,l=void 0===c?"added removed":c,d=o.translateFuncName,w=void 0===d?"t":d,x=o.wait,O=void 0!==x&&x;return function(i){var s=function(t){function n(t,r){y(this,n);var i=g(this,(n.__proto__||Object.getPrototypeOf(n)).call(this,t,r));return i.i18n=r.i18n||t.i18n,e=e||i.i18n.options.defaultNS,"string"==typeof e&&(e=[e]),(!O&&i.i18n.options.wait||i.i18n.options.react&&i.i18n.options.react.wait)&&(O=i.i18n.options.wait||i.i18n.options.react.wait),i.nsMode=o.nsMode||i.i18n.options.react&&i.i18n.options.react.nsMode||"default",i.state={i18nLoadedAt:null,ready:!1},i.onI18nChanged=i.onI18nChanged.bind(i),i.getWrappedInstance=i.getWrappedInstance.bind(i),i}return b(n,t),h(n,[{key:"getChildContext",value:function(){return m({},w,this[w])}},{key:"componentWillMount",value:function(){this[w]=this.i18n.getFixedT(null,"fallback"===this.nsMode?e:e[0])}},{key:"componentDidMount",value:function(){var t=this,n=function(){u&&t.i18n&&t.i18n.on(u,t.onI18nChanged),l&&t.i18n.store&&t.i18n.store.on(l,t.onI18nChanged)};this.mounted=!0,this.i18n.loadNamespaces(e,function(){var e=function(){t.mounted&&t.setState({ready:!0}),O&&t.mounted&&n()};if(t.i18n.isInitialized)e();else{var r=function n(){setTimeout(function(){t.i18n.off("initialized",n)},1e3),e()};t.i18n.on("initialized",r)}}),O||n()}},{key:"componentWillUnmount",value:function(){var e=this;if(this.mounted=!1,this.onI18nChanged){if(u){u.split(" ").forEach(function(t){return e.i18n.off(t,e.onI18nChanged)})}if(l){l.split(" ").forEach(function(t){return e.i18n.store&&e.i18n.store.off(t,e.onI18nChanged)})}}}},{key:"onI18nChanged",value:function(){this.mounted&&this.setState({i18nLoadedAt:new Date})}},{key:"getWrappedInstance",value:function(){return a||console.error("To access the wrapped instance, you need to specify { withRef: true } as the second argument of the translate() call."),this.refs.wrappedInstance}},{key:"render",value:function(){var e,t=this.state,n=t.i18nLoadedAt,r=t.ready,o=(e={i18nLoadedAt:n},m(e,w,this[w]),m(e,"i18n",this.i18n),e);return a&&(o.ref="wrappedInstance"),!r&&O?null:p.createElement(i,v({},this.props,o))}}]),n}(t.Component);return s.WrappedComponent=i,s.contextTypes={i18n:n.object},s.childContextTypes=m({},w,n.func.isRequired),s.displayName="Translate("+r(i)+")",s.namespaces=e,f(s,i)}}function i(e,t){for(var n=0,r=e.length;n<r;n++)if("object"===d(e[n])){var o=!0,i=!1,a=void 0;try{for(var s,p=Object.entries(e[n])[Symbol.iterator]();!(o=(s=p.next()).done);o=!0){var u=w(s.value,2),c=u[0],l=u[1];t(l,n,c)}}catch(e){i=!0,a=e}finally{try{!o&&p.return&&p.return()}finally{if(i)throw a}}}else t(e[n],n)}function a(e){var t=[];return i(e,function(e){e&&e.namespaces&&e.namespaces.forEach(function(e){-1===t.indexOf(e)&&t.push(e)})}),t}function s(e){var t=e.components,n=e.i18n,r=a(t);return new Promise(function(e){n.loadNamespaces(r,e)})}var p="default"in t?t.default:t;n="default"in n?n.default:n;var u={childContextTypes:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,mixins:!0,propTypes:!0,type:!0},c={name:!0,length:!0,prototype:!0,caller:!0,arguments:!0,arity:!0},l="function"==typeof Object.getOwnPropertySymbols,f=function(e,t,n){if("string"!=typeof t){var r=Object.getOwnPropertyNames(t);l&&(r=r.concat(Object.getOwnPropertySymbols(t)));for(var o=0;o<r.length;++o)if(!(u[r[o]]||c[r[o]]||n&&n[r[o]]))try{e[r[o]]=t[r[o]]}catch(e){}}return e},d="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},y=function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")},h=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),m=function(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e},v=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},b=function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)},g=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t},w=function(){function e(e,t){var n=[],r=!0,o=!1,i=void 0;try{for(var a,s=e[Symbol.iterator]();!(r=(a=s.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(e){o=!0,i=e}finally{try{!r&&s.return&&s.return()}finally{if(o)throw i}}return n}return function(t,n){if(Array.isArray(t))return t;if(Symbol.iterator in Object(t))return e(t,n);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),x=function(e){function t(e,n){y(this,t);var r=g(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e,n));return r.i18n=n.i18n,r.t=n.t,r}return b(t,e),h(t,[{key:"render",value:function(){var e=this,t=this.props.parent||"span",n=this.props.regexp||this.i18n.services.interpolator.regexp,r=this.props,o=r.className,i=r.style,a=this.props.useDangerouslySetInnerHTML||!1,s=this.props.dangerouslySetInnerHTMLPartElement||"span",u=v({},this.props.options,{interpolation:{prefix:"#$?",suffix:"?$#"}}),c=this.t(this.props.i18nKey,u);if(!c||"string"!=typeof c)return p.createElement("noscript",null);var l=[],f=function(t,n){if(t.indexOf(e.i18n.options.interpolation.formatSeparator)<0)return void 0===n[t]&&e.i18n.services.logger.warn("interpolator: missed to pass in variable "+t+" for interpolating "+c),n[t];var r=t.split(e.i18n.options.interpolation.formatSeparator),o=r.shift().trim(),i=r.join(e.i18n.options.interpolation.formatSeparator).trim();return void 0===n[o]&&e.i18n.services.logger.warn("interpolator: missed to pass in variable "+o+" for interpolating "+c),e.i18n.options.interpolation.format(n[o],i,e.i18n.language)};c.split(n).reduce(function(t,n,r){var o=void 0;if(r%2==0){if(0===n.length)return t;o=a?p.createElement(s,{dangerouslySetInnerHTML:{__html:n}}):n}else o=f(n,e.props);return t.push(o),t},l);var d={};return o&&(d.className=o),i&&(d.style=i),p.createElement.apply(this,[t,d].concat(l))}}]),t}(t.Component);x.propTypes={className:n.string},x.defaultProps={className:""},x.contextTypes={i18n:n.object.isRequired,t:n.func.isRequired};var O=function(e){function n(e,t){y(this,n);var r=g(this,(n.__proto__||Object.getPrototypeOf(n)).call(this,e,t));return r.i18n=e.i18n,r}return b(n,e),h(n,[{key:"getChildContext",value:function(){return{i18n:this.i18n}}},{key:"componentWillReceiveProps",value:function(e){if(this.props.i18n!==e.i18n)throw new Error("[react-i18next][I18nextProvider]does not support changing the i18n object.")}},{key:"render",value:function(){var e=this.props.children;return t.Children.only(e)}}]),n}(t.Component);O.propTypes={i18n:n.object.isRequired,children:n.element.isRequired},O.childContextTypes={i18n:n.object.isRequired},e.loadNamespaces=s,e.translate=o,e.Interpolate=x,e.I18nextProvider=O,Object.defineProperty(e,"__esModule",{value:!0})});
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("react"),require("prop-types")):"function"==typeof define&&define.amd?define("reactI18next",["exports","react","prop-types"],t):t(e.reactI18next=e.reactI18next||{},e.React,e.PropTypes)}(this,function(e,t,n){"use strict";function r(e){return e.displayName||e.name||"Component"}function o(e){var o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=o.withRef,a=void 0!==i&&i,s=o.bindI18n,p=void 0===s?"languageChanged loaded":s,c=o.bindStore,l=void 0===c?"added removed":c,d=o.translateFuncName,w=void 0===d?"t":d,x=o.wait,O=void 0!==x&&x;return function(i){var s=function(t){function n(t,r){y(this,n);var i=g(this,(n.__proto__||Object.getPrototypeOf(n)).call(this,t,r));return i.i18n=r.i18n||t.i18n,e=e||i.i18n.options.defaultNS,"string"==typeof e&&(e=[e]),!O&&i.i18n.options&&(i.i18n.options.wait||i.i18n.options.react&&i.i18n.options.react.wait)&&(O=!0),i.nsMode=o.nsMode||i.i18n.options&&i.i18n.options.react&&i.i18n.options.react.nsMode||"default",i.state={i18nLoadedAt:null,ready:!1},i.onI18nChanged=i.onI18nChanged.bind(i),i.getWrappedInstance=i.getWrappedInstance.bind(i),i}return b(n,t),h(n,[{key:"getChildContext",value:function(){return m({},w,this[w])}},{key:"componentWillMount",value:function(){this[w]=this.i18n.getFixedT(null,"fallback"===this.nsMode?e:e[0])}},{key:"componentDidMount",value:function(){var t=this,n=function(){p&&t.i18n&&t.i18n.on(p,t.onI18nChanged),l&&t.i18n.store&&t.i18n.store.on(l,t.onI18nChanged)};this.mounted=!0,this.i18n.loadNamespaces(e,function(){var e=function(){t.mounted&&t.setState({ready:!0}),O&&t.mounted&&n()};if(t.i18n.isInitialized)e();else{var r=function n(){setTimeout(function(){t.i18n.off("initialized",n)},1e3),e()};t.i18n.on("initialized",r),setTimeout(function(){return!t.state.ready&&t.i18n.isInitialized&&e()})}}),O||n()}},{key:"componentWillUnmount",value:function(){var e=this;if(this.mounted=!1,this.onI18nChanged){if(p){p.split(" ").forEach(function(t){return e.i18n.off(t,e.onI18nChanged)})}if(l){l.split(" ").forEach(function(t){return e.i18n.store&&e.i18n.store.off(t,e.onI18nChanged)})}}}},{key:"onI18nChanged",value:function(){this.mounted&&this.setState({i18nLoadedAt:new Date})}},{key:"getWrappedInstance",value:function(){return a||console.error("To access the wrapped instance, you need to specify { withRef: true } as the second argument of the translate() call."),this.refs.wrappedInstance}},{key:"render",value:function(){var e,t=this.state,n=t.i18nLoadedAt,r=t.ready,o=(e={i18nLoadedAt:n},m(e,w,this[w]),m(e,"i18n",this.i18n),e);return a&&(o.ref="wrappedInstance"),!r&&O?null:u.createElement(i,v({},this.props,o))}}]),n}(t.Component);return s.WrappedComponent=i,s.contextTypes={i18n:n.object},s.childContextTypes=m({},w,n.func.isRequired),s.displayName="Translate("+r(i)+")",s.namespaces=e,f(s,i)}}function i(e,t){for(var n=0,r=e.length;n<r;n++)if("object"===d(e[n])){var o=!0,i=!1,a=void 0;try{for(var s,u=Object.entries(e[n])[Symbol.iterator]();!(o=(s=u.next()).done);o=!0){var p=w(s.value,2),c=p[0],l=p[1];t(l,n,c)}}catch(e){i=!0,a=e}finally{try{!o&&u.return&&u.return()}finally{if(i)throw a}}}else t(e[n],n)}function a(e){var t=[];return i(e,function(e){e&&e.namespaces&&e.namespaces.forEach(function(e){-1===t.indexOf(e)&&t.push(e)})}),t}function s(e){var t=e.components,n=e.i18n,r=a(t);return new Promise(function(e){n.loadNamespaces(r,e)})}var u="default"in t?t.default:t;n="default"in n?n.default:n;var p={childContextTypes:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,mixins:!0,propTypes:!0,type:!0},c={name:!0,length:!0,prototype:!0,caller:!0,arguments:!0,arity:!0},l="function"==typeof Object.getOwnPropertySymbols,f=function(e,t,n){if("string"!=typeof t){var r=Object.getOwnPropertyNames(t);l&&(r=r.concat(Object.getOwnPropertySymbols(t)));for(var o=0;o<r.length;++o)if(!(p[r[o]]||c[r[o]]||n&&n[r[o]]))try{e[r[o]]=t[r[o]]}catch(e){}}return e},d="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},y=function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")},h=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),m=function(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e},v=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},b=function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)},g=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t},w=function(){function e(e,t){var n=[],r=!0,o=!1,i=void 0;try{for(var a,s=e[Symbol.iterator]();!(r=(a=s.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(e){o=!0,i=e}finally{try{!r&&s.return&&s.return()}finally{if(o)throw i}}return n}return function(t,n){if(Array.isArray(t))return t;if(Symbol.iterator in Object(t))return e(t,n);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),x=function(e){function t(e,n){y(this,t);var r=g(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e,n));return r.i18n=n.i18n,r.t=n.t,r}return b(t,e),h(t,[{key:"render",value:function(){var e=this,t=this.props.parent||"span",n=this.props.regexp||this.i18n.services.interpolator.regexp,r=this.props,o=r.className,i=r.style,a=this.props.useDangerouslySetInnerHTML||!1,s=this.props.dangerouslySetInnerHTMLPartElement||"span",p=v({},this.props.options,{interpolation:{prefix:"#$?",suffix:"?$#"}}),c=this.t(this.props.i18nKey,p);if(!c||"string"!=typeof c)return u.createElement("noscript",null);var l=[],f=function(t,n){if(t.indexOf(e.i18n.options.interpolation.formatSeparator)<0)return void 0===n[t]&&e.i18n.services.logger.warn("interpolator: missed to pass in variable "+t+" for interpolating "+c),n[t];var r=t.split(e.i18n.options.interpolation.formatSeparator),o=r.shift().trim(),i=r.join(e.i18n.options.interpolation.formatSeparator).trim();return void 0===n[o]&&e.i18n.services.logger.warn("interpolator: missed to pass in variable "+o+" for interpolating "+c),e.i18n.options.interpolation.format(n[o],i,e.i18n.language)};c.split(n).reduce(function(t,n,r){var o=void 0;if(r%2==0){if(0===n.length)return t;o=a?u.createElement(s,{dangerouslySetInnerHTML:{__html:n}}):n}else o=f(n,e.props);return t.push(o),t},l);var d={};return o&&(d.className=o),i&&(d.style=i),u.createElement.apply(this,[t,d].concat(l))}}]),t}(t.Component);x.propTypes={className:n.string},x.defaultProps={className:""},x.contextTypes={i18n:n.object.isRequired,t:n.func.isRequired};var O=function(e){function n(e,t){y(this,n);var r=g(this,(n.__proto__||Object.getPrototypeOf(n)).call(this,e,t));return r.i18n=e.i18n,r}return b(n,e),h(n,[{key:"getChildContext",value:function(){return{i18n:this.i18n}}},{key:"componentWillReceiveProps",value:function(e){if(this.props.i18n!==e.i18n)throw new Error("[react-i18next][I18nextProvider]does not support changing the i18n object.")}},{key:"render",value:function(){var e=this.props.children;return t.Children.only(e)}}]),n}(t.Component);O.propTypes={i18n:n.object.isRequired,children:n.element.isRequired},O.childContextTypes={i18n:n.object.isRequired},e.loadNamespaces=s,e.translate=o,e.Interpolate=x,e.I18nextProvider=O,Object.defineProperty(e,"__esModule",{value:!0})});
# react-i18next
> Higher-order components and components for React when using [i18next](https://github.com/i18next/i18next).
> Higher-order components and components for React when using [i18next](https://www.i18next.com).
[![NPM][npm-icon] ][npm-url]
[![Travis CI][travis-ci-image] ][travis-ci-url]
[![Code Climate](https://codeclimate.com/github/codeclimate/codeclimate/badges/gpa.svg)](https://codeclimate.com/github/i18next/react-i18next)
[![Coverage Status](https://coveralls.io/repos/github/i18next/react-i18next/badge.svg)](https://coveralls.io/github/i18next/react-i18next)
[![Coverage Status](https://coveralls.io/repos/github/i18next/react-i18next/badge.svg?t=1)](https://coveralls.io/github/i18next/react-i18next)
[![Quality][quality-badge] ][quality-url]

@@ -27,2 +25,6 @@ [![dependencies][dependencies-image] ][dependencies-url]

### Documentation
The documentation is published on [react.i18next.com](https://react.i18next.com)
### Installation

@@ -44,3 +46,6 @@

* [Example project](https://github.com/i18next/react-i18next/tree/master/example)
* [Example webpack2](https://github.com/i18next/react-i18next/tree/master/example/webpack2)
* [Example webpack1](https://github.com/i18next/react-i18next/tree/master/example/webpack1)
* [Example react-native](https://github.com/i18next/react-i18next/tree/master/example/react-native-expo)
* [Example expo.io](https://github.com/i18next/react-i18next/tree/master/example/react-native-expo)

@@ -57,3 +62,3 @@ ### Requirements

![locize](http://i18next.com/img/locize_recap_medium_low.gif)
![locize](https://www.i18next.com/assets/img/locize_recap_big_low.gif)

@@ -63,253 +68,1 @@ With using [locize](http://locize.com/) you directly support the future of i18next and react-i18next.

--------------
## Documentation
### I18nextProvider
It will add your i18n instance in context.
```javascript
import React from 'react';
import ReactDOM from 'react-dom';
import { I18nextProvider } from 'react-i18next';
import App from './App'; // your entry page
import i18n from './i18n'; // initialized i18next instance
ReactDOM.render(
<I18nextProvider i18n={ i18n }><App /></I18nextProvider>,
document.getElementById('app')
);
```
You can safely set escapeValue to false in interpolation options as react take care of escaping, see the [sample](https://github.com/i18next/react-i18next/blob/master/example/app/i18n.js#L19).
### Translate HOC
__translate(namespaces, options)__: higher-order component to wrap a translatable component.
- All given namespaces will be loaded.
- props.t will default to first namespace in array of given namespaces (providing a string as namespace will convert automatically to array, providing no namespaces will default to `defaultNS`)
- used nested inside I18nextProvider (context.i18n) or by passing i18n as a prop
- passing `{ withRef: true }` to options store a ref to the wrapped component instance making it available via `getWrappedInstance()` method
- passing `{ translateFuncName: 'someFunctionName' }` will change the name of the property passed to the child component for the translation function (by default, the value is `t`). This is useful if you are already using a concrete function name for extracting the translation chains from your source files
options:
```js
{
withRef: false, // store a ref to the wrapped component
translateFuncName: 't', // will change the name of translation prop default 't'
wait: false, // delay rendering until translations are loaded - wait can be set globally on i18next init too ( can be set on i18next.init({ react: { wait: true }};) too)
nsMode: 'default', // can be set to fallback to let passed namespaces treated as fallbacks in order passed - wait can be set globally on i18next init too ( can be set on i18next.init({ react: { nsMode: 'fallback' }};) too)
bindI18n: 'languageChanged loaded', // which events trigger a rerender, can be set to false or string of events
bindStore: 'added removed' // which events on store trigger a rerender, can be set to false or string of events
}
```
```javascript
import React from 'react';
import { translate } from 'react-i18next';
function TranslatableView(props) {
const { t } = props;
return (
<div>
<h1>{t('keyFromDefault')}</h1>
<p>{t('anotherNamespace:key.from.another.namespace', { /* options t options */ })}</p>
</div>
)
}
export default translate(['defaultNamespace', 'anotherNamespace'])(TranslatableView);
// short for only loading one namespace:
// export default translate('defaultNamespace')(TranslatableView);
```
You can set options.wait to true per options in hoc or globally on i18next.init if you want to delay rendering until translation files are loaded:
```javascript
import React from 'react';
import { translate } from 'react-i18next';
function TranslatableView(props) {
const { t } = props;
return (
<div>
<h1>{t('keyFromDefault')}</h1>
<p>{t('anotherNamespace:key.from.another.namespace', { /* options t options */ })}</p>
</div>
)
}
export default translate(['defaultNamespace', 'anotherNamespace'], { wait: true })(TranslatableView);
```
__getWrappedInstance()__: allows you to access to the component instance, wrapped into `translate()`.
Only available if you pass `{ withRef: true }` to the `translate()` options.
```javascript
import React, { Component } from 'react';
import { translate } from 'react-i18next';
class TranslatableView extends Component {
foo() {
// do something important
}
render() {
const { t } = this.props;
return (
<div>
<h1>{t('keyFromDefault')}</h1>
</div>
)
}
}
export default translate(['defaultNamespace', 'anotherNamespace'], { withRef: true })(TranslatableView);
```
```javascript
import React, { Component } from 'react';
import ./TranslatableView;
class App extends Component {
handleClick() {
this.refs.translatedView.foo();
}
render() {
return (
<div>
<TranslatableView ref="translatedView" />
<button onClick={() => this.handleClick()}>Click</button>
</div>
)
}
}
```
### Interpolate Component
__Interpolate__: component that allows to interpolate React Components or other props into translations.
- used nested inside I18nextProvider and translation hoc (context.i18n, context.t)
__props__:
- i18nKey: the key to lookup
- options: [options](http://i18next.com/docs/options/#t-options) to use for translation (exclude interpolation variables!)
- parent: optional component to wrap translation into (default 'span')
- useDangerouslySetInnerHTML: allows use of raw html tags in translation values
- dangerouslySetInnerHTMLPartElement: optional component to wrap parts of translation values into (default 'span'), used with `useDangerouslySetInnerHTML={true}` only
- ...props: values to interpolate into found translation (eg. `my value with {{replaceMe}} interpolation`)
```json
{
"interpolateSample": "you <strong>can</strong> interpolate {{value}} or {{component}} via interpolate component!"
}
```
```javascript
import React from 'react';
import { translate, Interpolate } from 'react-i18next';
function TranslatableView(props) {
const { t } = props;
let interpolateComponent = <strong>a interpolated component</strong>;
return (
<div>
<Interpolate i18nKey='ns:interpolateSample' value='"some string"' component={interpolateComponent} />
{/*
=>
<span>
you &lt;strong&gt;can&lt;/strong&gt; interpolate "some string" or <strong>a interpolated component</strong> via interpolate component!
</span>
*/}
<Interpolate i18nKey='ns:interpolateSample' useDangerouslySetInnerHTML={true} value='"some string"' component={interpolateComponent} />
{/*
=>
<span>
you <strong>can</strong> interpolate "some string" or <strong>a interpolated component</strong> via interpolate component!
</span>
*/}
</div>
)
}
```
You can use formatting, see the [sample](https://github.com/i18next/react-i18next/blob/master/example/app/i18n.js#L20).
### Universal Rendering
__loadNamespaces__: Function that will pre-load all namespaces used by your components. Works well with `react-router` `match` function
__props__:
- components: Components that need to have namespaces loaded.
- i18n: the i18n instance to load translations into
```javascript
import { I18nextProvider, loadNamespaces } from 'react-i18next';
import { match } from 'react-router';
match({...matchArguments}, (error, redirectLocation, renderProps) => {
loadNamespaces({ ...renderProps, i18n: i18nInstance })
.then(()=>{
// All i18n namespaces required to render this route are loaded
})
});
```
When using [i18next-express-middleware](https://github.com/i18next/i18next-express-middleware), you can use `req.i18n` as the `i18next` instance for `I18nextProvider`:
```javascript
import { I18nextProvider } from 'react-i18next';
import i18n from './i18next'; // your own initialized i18next instance
import App from './app';
app.use((req, res) => {
const component = (
<I18nextProvider i18n={req.i18n}>
<App />
</I18nextProvider>
);
// render as desired now ...
});
```
Full [sample/boilerplate](https://github.com/simpleblack/react-redux-universal-hot-example) for universal rendering.
### Typescript users
For Typescript users, if you are running into issues, such as `Uncaught TypeError: Cannot read property 'off' of undefined`, it's possible that you have not exported your own initialized i18next instance correctly. Try the following:
```typescript
import * as i18n from 'i18next'
import * as XHR from 'i18next-xhr-backend'
import * as LanguageDetector from 'i18next-browser-languagedetector'
import config from '../src/config/config'
const instance = i18n
.use(/* your settings */)
.init({
// your settings here
})
export default instance
```

@@ -22,5 +22,5 @@ import React, { Component } from 'react';

if (!wait && this.i18n.options.wait || (this.i18n.options.react && this.i18n.options.react.wait)) wait = this.i18n.options.wait || this.i18n.options.react.wait;
if (!wait && this.i18n.options && (this.i18n.options.wait || (this.i18n.options.react && this.i18n.options.react.wait))) wait = true;
this.nsMode = options.nsMode || (this.i18n.options.react && this.i18n.options.react.nsMode) || 'default';
this.nsMode = options.nsMode || (this.i18n.options && this.i18n.options.react && this.i18n.options.react.nsMode) || 'default';

@@ -69,2 +69,6 @@ this.state = {

this.i18n.on('initialized', initialized);
// In case of race condition, that 'initialized' never comes - do immediately
// check ready state + if i18n is initialized.
setTimeout(() => !this.state.ready && this.i18n.isInitialized && ready());
}

@@ -71,0 +75,0 @@ });

Sorry, the diff of this file is not supported yet

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