react-localize-redux
Advanced tools
Comparing version 2.11.0 to 2.12.0
@@ -494,3 +494,3 @@ (function webpackUniversalModuleDefinition(root, factory) { | ||
var hasHtmlTags = exports.hasHtmlTags = function hasHtmlTags(value) { | ||
var pattern = /<\/?\w+((\s+\w+(\s*=\s*(?:".*?"|'.*?'|[\^'">\s]+))?)+\s*|\s*)\/?>/; | ||
var pattern = /(&[^\s]*;|<\/?\w+((\s+\w+(\s*=\s*(?:".*?"|'.*?'|[\^'">\s]+))?)+\s*|\s*)\/?>)/; | ||
return value.search(pattern) >= 0; | ||
@@ -497,0 +497,0 @@ }; |
@@ -1,2 +0,2 @@ | ||
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("react"),require("react-redux"),require("redux")):"function"==typeof define&&define.amd?define(["react","react-redux","redux"],t):"object"==typeof exports?exports.ReactLocalizeRedux=t(require("react"),require("react-redux"),require("redux")):e.ReactLocalizeRedux=t(e.React,e.ReactRedux,e.Redux)}(this,function(e,t,n){return function(e){function t(r){if(n[r])return n[r].exports;var a=n[r]={i:r,l:!1,exports:{}};return e[r].call(a.exports,a,a.exports,t),a.l=!0,a.exports}var n={};return t.m=e,t.c=n,t.i=function(e){return e},t.d=function(e,n,r){t.o(e,n)||Object.defineProperty(e,n,{configurable:!1,enumerable:!0,get:r})},t.n=function(e){var n=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(n,"a",n),n},t.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},t.p="",t(t.s=3)}([function(e,t,n){"use strict";function r(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function a(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments[1];switch(t.type){case f:case p:var n=t.payload.languageCodes,r=t.payload.options||{},a=t.payload.activeLanguage||r.defaultLanguage||n[0],o=n.indexOf(a);return n.map(function(e,t){return{code:e,active:t===o}});case v:return e.map(function(e){return e.code===t.payload.languageCode?i({},e,{active:!0}):i({},e,{active:!1})});default:return e}}function o(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments[1];switch(t.type){case g:var n=void 0!==t.translationTransform?t.translationTransform(t.payload.translation,t.languageCodes):t.payload.translation;return i({},e,(0,c.flatten)(n,{safe:!0}));case d:var a=t.languageCodes.indexOf(t.payload.language),o=a>=0?(0,c.flatten)(t.payload.translation):{},u=Object.keys(o).reduce(function(n,u){var c=t.languageCodes.map(function(t,n){var r=e[u]||[];return n===a?o[u]:r[n]});return i({},n,r({},u,c))},{});return i({},e,u);default:return e}}function u(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:y,t=arguments[1];switch(t.type){case f:var n=t.payload.options||{};return i({},e,(0,s.validateOptions)(n));default:return e}}Object.defineProperty(t,"__esModule",{value:!0}),t.getTranslate=t.getTranslationsForActiveLanguage=t.translationsEqualSelector=t.getActiveLanguage=t.getOptions=t.getLanguages=t.getTranslations=t.setActiveLanguage=t.setLanguages=t.addTranslationForLanguage=t.addTranslation=t.initialize=t.localeReducer=t.defaultTranslateOptions=t.TRANSLATE=t.SET_ACTIVE_LANGUAGE=t.SET_LANGUAGES=t.ADD_TRANSLATION_FOR_LANGUGE=t.ADD_TRANSLATION=t.INITIALIZE=void 0;var i=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};t.languages=a,t.translations=o,t.options=u;var c=(n(9),n(5)),l=n(7),s=n(4),f=t.INITIALIZE="@@localize/INITIALIZE",g=t.ADD_TRANSLATION="@@localize/ADD_TRANSLATION",d=t.ADD_TRANSLATION_FOR_LANGUGE="@@localize/ADD_TRANSLATION_FOR_LANGUGE",p=t.SET_LANGUAGES="@@localize/SET_LANGUAGES",v=t.SET_ACTIVE_LANGUAGE="@@localize/SET_ACTIVE_LANGUAGE",y=(t.TRANSLATE="@@localize/TRANSLATE",t.defaultTranslateOptions={renderInnerHtml:!0,showMissingTranslationMsg:!0}),b={languages:[],translations:{},options:y},T=(t.localeReducer=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:b,t=arguments[1],n=e.languages.map(function(e){return e.code}),r=e.options.translationTransform;return{languages:a(e.languages,t),translations:o(e.translations,i({},t,{languageCodes:n,translationTransform:r})),options:u(e.options,t)}},t.initialize=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:y;return{type:f,payload:{languageCodes:e,options:t}}},t.addTranslation=function(e){return{type:g,payload:{translation:e}}},t.addTranslationForLanguage=function(e,t){return{type:d,payload:{translation:e,language:t}}},t.setLanguages=function(e,t){return{type:p,payload:{languageCodes:e,activeLanguage:t}}},t.setActiveLanguage=function(e){return{type:v,payload:{languageCode:e}}},t.getTranslations=function(e){return e.translations}),A=t.getLanguages=function(e){return e.languages},O=t.getOptions=function(e){return e.options},m=t.getActiveLanguage=function(e){var t=A(e);return t[t.map(function(e){return e.active}).indexOf(!0)]},L=t.translationsEqualSelector=(0,l.createSelectorCreator)(l.defaultMemoize,function(e,t){if(!(Array.isArray(e)||"code,active"===Object.keys(e).toString())){var n=t,r=e,a=Object.keys(n).toString(),o=Object.keys(r).toString();return a+" - "+(0,s.objectValuesToString)(n)==o+" - "+(0,s.objectValuesToString)(r)}return t===e}),j=t.getTranslationsForActiveLanguage=L(m,A,T,function(e,t,n){var a=e.code,o=(0,s.getIndexForLanguageCode)(a,t);return Object.keys(n).reduce(function(e,t){return i({},e,r({},t,n[t][o]))},{})});t.getTranslate=(0,l.createSelector)(j,m,O,function(e,t,n){return function(a,o){var u=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},c=i({},n,u);if("string"==typeof a)return(0,s.getLocalizedElement)(a,e,o,t,c);if(Array.isArray(a))return a.reduce(function(n,a){return i({},n,r({},a,(0,s.getLocalizedElement)(a,e,o,t,c)))},{});throw new Error("react-localize-redux: Invalid key passed to getTranslate.")}})},function(t,n){t.exports=e},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.localize=void 0;var r=n(1),a=(function(e){e&&e.__esModule}(r),n(8)),o=n(0),u=function(e){return function(t){var n=e?t[e]:t;return{currentLanguage:(0,o.getActiveLanguage)(n).code,translate:(0,o.getTranslate)(n)}}};t.localize=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;return(0,a.connect)(u(t))(e)}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(2);Object.defineProperty(t,"localize",{enumerable:!0,get:function(){return r.localize}});var a=n(0);Object.defineProperty(t,"localeReducer",{enumerable:!0,get:function(){return a.localeReducer}}),Object.defineProperty(t,"initialize",{enumerable:!0,get:function(){return a.initialize}}),Object.defineProperty(t,"addTranslation",{enumerable:!0,get:function(){return a.addTranslation}}),Object.defineProperty(t,"addTranslationForLanguage",{enumerable:!0,get:function(){return a.addTranslationForLanguage}}),Object.defineProperty(t,"setLanguages",{enumerable:!0,get:function(){return a.setLanguages}}),Object.defineProperty(t,"setActiveLanguage",{enumerable:!0,get:function(){return a.setActiveLanguage}}),Object.defineProperty(t,"getTranslate",{enumerable:!0,get:function(){return a.getTranslate}}),Object.defineProperty(t,"getActiveLanguage",{enumerable:!0,get:function(){return a.getActiveLanguage}}),Object.defineProperty(t,"getLanguages",{enumerable:!0,get:function(){return a.getLanguages}}),Object.defineProperty(t,"getTranslations",{enumerable:!0,get:function(){return a.getTranslations}}),Object.defineProperty(t,"getOptions",{enumerable:!0,get:function(){return a.getOptions}})},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.validateOptions=t.objectValuesToString=t.getIndexForLanguageCode=t.templater=t.hasHtmlTags=t.getLocalizedElement=void 0;var r=n(1),a=function(e){return e&&e.__esModule?e:{default:e}}(r),o=n(0),u=(t.getLocalizedElement=function(e,t,n,r){var c=arguments.length>4&&void 0!==arguments[4]?arguments[4]:o.defaultTranslateOptions,l=t[e]||function(){return c.missingTranslationCallback&&c.missingTranslationCallback(e,r.code),c.showMissingTranslationMsg?"Missing localized key: "+e+" for language: "+r.code:""}(),s=i(l,n);return c.renderInnerHtml&&u(s)?a.default.createElement("span",{dangerouslySetInnerHTML:{__html:s}}):s},t.hasHtmlTags=function(e){var t=/<\/?\w+((\s+\w+(\s*=\s*(?:".*?"|'.*?'|[\^'">\s]+))?)+\s*|\s*)\/?>/;return e.search(t)>=0}),i=t.templater=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};for(var n in t){var r="\\${\\s*"+n+"\\s*}",a=new RegExp(r,"gmi");e=e.replace(a,t[n])}return e};t.getIndexForLanguageCode=function(e,t){return t.map(function(e){return e.code}).indexOf(e)},t.objectValuesToString=function(e){return Object.values?Object.values(e).toString():Object.keys(e).map(function(t){return e[t].toString()}).toString()},t.validateOptions=function(e){if(void 0!==e.translationTransform&&"function"!=typeof e.translationTransform)throw new Error("react-localize-redux: Invalid translationTransform function.");return e}},function(e,t,n){function r(e,t){function n(e,i,c){c=c||1,Object.keys(e).forEach(function(l){var s=e[l],f=t.safe&&Array.isArray(s),g=Object.prototype.toString.call(s),d=o(s),p="[object Object]"===g||"[object Array]"===g,v=i?i+r+l:l;if(!f&&!d&&p&&Object.keys(s).length&&(!t.maxDepth||c<a))return n(s,v,c+1);u[v]=s})}t=t||{};var r=t.delimiter||".",a=t.maxDepth,u={};return n(e),u}function a(e,t){function n(e){var t=Number(e);return isNaN(t)||-1!==e.indexOf(".")?e:t}t=t||{};var r=t.delimiter||".",u=t.overwrite||!1,i={};return o(e)||"[object Object]"!==Object.prototype.toString.call(e)?e:(Object.keys(e).forEach(function(o){for(var c=o.split(r),l=n(c.shift()),s=n(c[0]),f=i;void 0!==s;){var g=Object.prototype.toString.call(f[l]),d="[object Object]"===g||"[object Array]"===g;if(!u&&!d&&void 0!==f[l])return;(u&&!d||!u&&null==f[l])&&(f[l]="number"!=typeof s||t.object?{}:[]),f=f[l],c.length>0&&(l=n(c.shift()),s=n(c[0]))}f[l]=a(e[o],t)}),i)}var o=n(6);e.exports=r;r.flatten=r,r.unflatten=a},function(e,t){function n(e){return!!e.constructor&&"function"==typeof e.constructor.isBuffer&&e.constructor.isBuffer(e)}function r(e){return"function"==typeof e.readFloatLE&&"function"==typeof e.slice&&n(e.slice(0,0))}/*! | ||
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("react"),require("react-redux"),require("redux")):"function"==typeof define&&define.amd?define(["react","react-redux","redux"],t):"object"==typeof exports?exports.ReactLocalizeRedux=t(require("react"),require("react-redux"),require("redux")):e.ReactLocalizeRedux=t(e.React,e.ReactRedux,e.Redux)}(this,function(e,t,n){return function(e){function t(r){if(n[r])return n[r].exports;var a=n[r]={i:r,l:!1,exports:{}};return e[r].call(a.exports,a,a.exports,t),a.l=!0,a.exports}var n={};return t.m=e,t.c=n,t.i=function(e){return e},t.d=function(e,n,r){t.o(e,n)||Object.defineProperty(e,n,{configurable:!1,enumerable:!0,get:r})},t.n=function(e){var n=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(n,"a",n),n},t.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},t.p="",t(t.s=3)}([function(e,t,n){"use strict";function r(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function a(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments[1];switch(t.type){case f:case p:var n=t.payload.languageCodes,r=t.payload.options||{},a=t.payload.activeLanguage||r.defaultLanguage||n[0],o=n.indexOf(a);return n.map(function(e,t){return{code:e,active:t===o}});case v:return e.map(function(e){return e.code===t.payload.languageCode?i({},e,{active:!0}):i({},e,{active:!1})});default:return e}}function o(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments[1];switch(t.type){case g:var n=void 0!==t.translationTransform?t.translationTransform(t.payload.translation,t.languageCodes):t.payload.translation;return i({},e,(0,c.flatten)(n,{safe:!0}));case d:var a=t.languageCodes.indexOf(t.payload.language),o=a>=0?(0,c.flatten)(t.payload.translation):{},u=Object.keys(o).reduce(function(n,u){var c=t.languageCodes.map(function(t,n){var r=e[u]||[];return n===a?o[u]:r[n]});return i({},n,r({},u,c))},{});return i({},e,u);default:return e}}function u(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:y,t=arguments[1];switch(t.type){case f:var n=t.payload.options||{};return i({},e,(0,s.validateOptions)(n));default:return e}}Object.defineProperty(t,"__esModule",{value:!0}),t.getTranslate=t.getTranslationsForActiveLanguage=t.translationsEqualSelector=t.getActiveLanguage=t.getOptions=t.getLanguages=t.getTranslations=t.setActiveLanguage=t.setLanguages=t.addTranslationForLanguage=t.addTranslation=t.initialize=t.localeReducer=t.defaultTranslateOptions=t.TRANSLATE=t.SET_ACTIVE_LANGUAGE=t.SET_LANGUAGES=t.ADD_TRANSLATION_FOR_LANGUGE=t.ADD_TRANSLATION=t.INITIALIZE=void 0;var i=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};t.languages=a,t.translations=o,t.options=u;var c=(n(9),n(5)),l=n(7),s=n(4),f=t.INITIALIZE="@@localize/INITIALIZE",g=t.ADD_TRANSLATION="@@localize/ADD_TRANSLATION",d=t.ADD_TRANSLATION_FOR_LANGUGE="@@localize/ADD_TRANSLATION_FOR_LANGUGE",p=t.SET_LANGUAGES="@@localize/SET_LANGUAGES",v=t.SET_ACTIVE_LANGUAGE="@@localize/SET_ACTIVE_LANGUAGE",y=(t.TRANSLATE="@@localize/TRANSLATE",t.defaultTranslateOptions={renderInnerHtml:!0,showMissingTranslationMsg:!0}),b={languages:[],translations:{},options:y},T=(t.localeReducer=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:b,t=arguments[1],n=e.languages.map(function(e){return e.code}),r=e.options.translationTransform;return{languages:a(e.languages,t),translations:o(e.translations,i({},t,{languageCodes:n,translationTransform:r})),options:u(e.options,t)}},t.initialize=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:y;return{type:f,payload:{languageCodes:e,options:t}}},t.addTranslation=function(e){return{type:g,payload:{translation:e}}},t.addTranslationForLanguage=function(e,t){return{type:d,payload:{translation:e,language:t}}},t.setLanguages=function(e,t){return{type:p,payload:{languageCodes:e,activeLanguage:t}}},t.setActiveLanguage=function(e){return{type:v,payload:{languageCode:e}}},t.getTranslations=function(e){return e.translations}),A=t.getLanguages=function(e){return e.languages},O=t.getOptions=function(e){return e.options},m=t.getActiveLanguage=function(e){var t=A(e);return t[t.map(function(e){return e.active}).indexOf(!0)]},L=t.translationsEqualSelector=(0,l.createSelectorCreator)(l.defaultMemoize,function(e,t){if(!(Array.isArray(e)||"code,active"===Object.keys(e).toString())){var n=t,r=e,a=Object.keys(n).toString(),o=Object.keys(r).toString();return a+" - "+(0,s.objectValuesToString)(n)==o+" - "+(0,s.objectValuesToString)(r)}return t===e}),j=t.getTranslationsForActiveLanguage=L(m,A,T,function(e,t,n){var a=e.code,o=(0,s.getIndexForLanguageCode)(a,t);return Object.keys(n).reduce(function(e,t){return i({},e,r({},t,n[t][o]))},{})});t.getTranslate=(0,l.createSelector)(j,m,O,function(e,t,n){return function(a,o){var u=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},c=i({},n,u);if("string"==typeof a)return(0,s.getLocalizedElement)(a,e,o,t,c);if(Array.isArray(a))return a.reduce(function(n,a){return i({},n,r({},a,(0,s.getLocalizedElement)(a,e,o,t,c)))},{});throw new Error("react-localize-redux: Invalid key passed to getTranslate.")}})},function(t,n){t.exports=e},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.localize=void 0;var r=n(1),a=(function(e){e&&e.__esModule}(r),n(8)),o=n(0),u=function(e){return function(t){var n=e?t[e]:t;return{currentLanguage:(0,o.getActiveLanguage)(n).code,translate:(0,o.getTranslate)(n)}}};t.localize=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;return(0,a.connect)(u(t))(e)}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(2);Object.defineProperty(t,"localize",{enumerable:!0,get:function(){return r.localize}});var a=n(0);Object.defineProperty(t,"localeReducer",{enumerable:!0,get:function(){return a.localeReducer}}),Object.defineProperty(t,"initialize",{enumerable:!0,get:function(){return a.initialize}}),Object.defineProperty(t,"addTranslation",{enumerable:!0,get:function(){return a.addTranslation}}),Object.defineProperty(t,"addTranslationForLanguage",{enumerable:!0,get:function(){return a.addTranslationForLanguage}}),Object.defineProperty(t,"setLanguages",{enumerable:!0,get:function(){return a.setLanguages}}),Object.defineProperty(t,"setActiveLanguage",{enumerable:!0,get:function(){return a.setActiveLanguage}}),Object.defineProperty(t,"getTranslate",{enumerable:!0,get:function(){return a.getTranslate}}),Object.defineProperty(t,"getActiveLanguage",{enumerable:!0,get:function(){return a.getActiveLanguage}}),Object.defineProperty(t,"getLanguages",{enumerable:!0,get:function(){return a.getLanguages}}),Object.defineProperty(t,"getTranslations",{enumerable:!0,get:function(){return a.getTranslations}}),Object.defineProperty(t,"getOptions",{enumerable:!0,get:function(){return a.getOptions}})},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.validateOptions=t.objectValuesToString=t.getIndexForLanguageCode=t.templater=t.hasHtmlTags=t.getLocalizedElement=void 0;var r=n(1),a=function(e){return e&&e.__esModule?e:{default:e}}(r),o=n(0),u=(t.getLocalizedElement=function(e,t,n,r){var c=arguments.length>4&&void 0!==arguments[4]?arguments[4]:o.defaultTranslateOptions,l=t[e]||function(){return c.missingTranslationCallback&&c.missingTranslationCallback(e,r.code),c.showMissingTranslationMsg?"Missing localized key: "+e+" for language: "+r.code:""}(),s=i(l,n);return c.renderInnerHtml&&u(s)?a.default.createElement("span",{dangerouslySetInnerHTML:{__html:s}}):s},t.hasHtmlTags=function(e){var t=/(&[^\s]*;|<\/?\w+((\s+\w+(\s*=\s*(?:".*?"|'.*?'|[\^'">\s]+))?)+\s*|\s*)\/?>)/;return e.search(t)>=0}),i=t.templater=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};for(var n in t){var r="\\${\\s*"+n+"\\s*}",a=new RegExp(r,"gmi");e=e.replace(a,t[n])}return e};t.getIndexForLanguageCode=function(e,t){return t.map(function(e){return e.code}).indexOf(e)},t.objectValuesToString=function(e){return Object.values?Object.values(e).toString():Object.keys(e).map(function(t){return e[t].toString()}).toString()},t.validateOptions=function(e){if(void 0!==e.translationTransform&&"function"!=typeof e.translationTransform)throw new Error("react-localize-redux: Invalid translationTransform function.");return e}},function(e,t,n){function r(e,t){function n(e,i,c){c=c||1,Object.keys(e).forEach(function(l){var s=e[l],f=t.safe&&Array.isArray(s),g=Object.prototype.toString.call(s),d=o(s),p="[object Object]"===g||"[object Array]"===g,v=i?i+r+l:l;if(!f&&!d&&p&&Object.keys(s).length&&(!t.maxDepth||c<a))return n(s,v,c+1);u[v]=s})}t=t||{};var r=t.delimiter||".",a=t.maxDepth,u={};return n(e),u}function a(e,t){function n(e){var t=Number(e);return isNaN(t)||-1!==e.indexOf(".")?e:t}t=t||{};var r=t.delimiter||".",u=t.overwrite||!1,i={};return o(e)||"[object Object]"!==Object.prototype.toString.call(e)?e:(Object.keys(e).forEach(function(o){for(var c=o.split(r),l=n(c.shift()),s=n(c[0]),f=i;void 0!==s;){var g=Object.prototype.toString.call(f[l]),d="[object Object]"===g||"[object Array]"===g;if(!u&&!d&&void 0!==f[l])return;(u&&!d||!u&&null==f[l])&&(f[l]="number"!=typeof s||t.object?{}:[]),f=f[l],c.length>0&&(l=n(c.shift()),s=n(c[0]))}f[l]=a(e[o],t)}),i)}var o=n(6);e.exports=r;r.flatten=r,r.unflatten=a},function(e,t){function n(e){return!!e.constructor&&"function"==typeof e.constructor.isBuffer&&e.constructor.isBuffer(e)}function r(e){return"function"==typeof e.readFloatLE&&"function"==typeof e.slice&&n(e.slice(0,0))}/*! | ||
* Determine if an object is a Buffer | ||
@@ -3,0 +3,0 @@ * |
@@ -20,3 +20,3 @@ import React from 'react'; | ||
export var hasHtmlTags = function hasHtmlTags(value) { | ||
var pattern = /<\/?\w+((\s+\w+(\s*=\s*(?:".*?"|'.*?'|[\^'">\s]+))?)+\s*|\s*)\/?>/; | ||
var pattern = /(&[^\s]*;|<\/?\w+((\s+\w+(\s*=\s*(?:".*?"|'.*?'|[\^'">\s]+))?)+\s*|\s*)\/?>)/; | ||
return value.search(pattern) >= 0; | ||
@@ -23,0 +23,0 @@ }; |
@@ -31,3 +31,3 @@ 'use strict'; | ||
var hasHtmlTags = exports.hasHtmlTags = function hasHtmlTags(value) { | ||
var pattern = /<\/?\w+((\s+\w+(\s*=\s*(?:".*?"|'.*?'|[\^'">\s]+))?)+\s*|\s*)\/?>/; | ||
var pattern = /(&[^\s]*;|<\/?\w+((\s+\w+(\s*=\s*(?:".*?"|'.*?'|[\^'">\s]+))?)+\s*|\s*)\/?>)/; | ||
return value.search(pattern) >= 0; | ||
@@ -34,0 +34,0 @@ }; |
{ | ||
"name": "react-localize-redux", | ||
"version": "2.11.0", | ||
"version": "2.12.0", | ||
"description": "Localization library for React/Redux", | ||
@@ -5,0 +5,0 @@ "main": "./lib/index.js", |
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
109769