Socket
Socket
Sign inDemoInstall

i18next-http-backend

Package Overview
Dependencies
Maintainers
2
Versions
66
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

i18next-http-backend - npm Package Compare versions

Comparing version 1.0.6 to 1.0.7

4

cjs/request.js

@@ -82,3 +82,3 @@ "use strict";

headers: headers
}, options.srequestOptions)).then(function (response) {
}, typeof options.requestOptions === 'function' ? options.requestOptions(payload) : options.requestOptions)).then(function (response) {
if (!response.ok) return callback(response.statusText || 'Error', {

@@ -180,2 +180,2 @@ status: response.status

exports["default"] = _default;
module.exports = exports.default;
module.exports = exports.default;

@@ -305,3 +305,3 @@ (function(f){if(typeof exports==="object"&&typeof module!=="undefined"){module.exports=f()}else if(typeof define==="function"&&define.amd){define([],f)}else{var g;if(typeof window!=="undefined"){g=window}else if(typeof global!=="undefined"){g=global}else if(typeof self!=="undefined"){g=self}else{g=this}g.i18nextHttpBackend = f()}})(function(){var define,module,exports;return (function(){function r(e,n,t){function o(i,f){if(!n[i]){if(!e[i]){var c="function"==typeof require&&require;if(!f&&c)return c(i,!0);if(u)return u(i,!0);var a=new Error("Cannot find module '"+i+"'");throw a.code="MODULE_NOT_FOUND",a}var p=n[i]={exports:{}};e[i][0].call(p.exports,function(r){var n=e[i][1][r];return o(n||r)},p,p.exports,r,e,n,t)}return n[i].exports}for(var u="function"==typeof require&&require,i=0;i<t.length;i++)o(t[i]);return o}return r})()({1:[function(require,module,exports){

headers: headers
}, options.srequestOptions)).then(function (response) {
}, typeof options.requestOptions === 'function' ? options.requestOptions(payload) : options.requestOptions)).then(function (response) {
if (!response.ok) return callback(response.statusText || 'Error', {

@@ -404,3 +404,2 @@ status: response.status

module.exports = exports.default;
}).call(this,typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {})

@@ -407,0 +406,0 @@ },{"./getFetch.js":1}],4:[function(require,module,exports){

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

!function(e){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=e();else if("function"==typeof define&&define.amd)define([],e);else{("undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this).i18nextHttpBackend=e()}}(function(){return function r(a,s,f){function u(t,e){if(!s[t]){if(!a[t]){var n="function"==typeof require&&require;if(!e&&n)return n(t,!0);if(c)return c(t,!0);var o=new Error("Cannot find module '"+t+"'");throw o.code="MODULE_NOT_FOUND",o}var i=s[t]={exports:{}};a[t][0].call(i.exports,function(e){return u(a[t][1][e]||e)},i,i.exports,r,a,s,f)}return s[t].exports}for(var c="function"==typeof require&&require,e=0;e<f.length;e++)u(f[e]);return u}({1:[function(o,i,r){(function(e){var t;if("function"==typeof fetch&&(void 0!==e&&e.fetch?t=e.fetch:"undefined"!=typeof window&&window.fetch&&(t=window.fetch)),void 0!==o){var n=t||o("node-fetch");n.default&&(n=n.default),r.default=n,i.exports=r.default}}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"node-fetch":5}],2:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0;var o,a=e("./utils.js"),i=(o=e("./request.js"))&&o.__esModule?o:{default:o};function r(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}function s(){return{loadPath:"/locales/{{lng}}/{{ns}}.json",addPath:"/locales/add/{{lng}}/{{ns}}",allowMultiLoading:!1,parse:function(e){return JSON.parse(e)},stringify:JSON.stringify,parsePayload:function(e,t,n){return r=n||"",(i=t)in(o={})?Object.defineProperty(o,i,{value:r,enumerable:!0,configurable:!0,writable:!0}):o[i]=r,o;var o,i,r},request:i.default,reloadInterval:!1,customHeaders:{},queryStringParams:{},crossDomain:!1,withCredentials:!1,overrideMimeType:!1,requestOptions:{mode:"cors",credentials:"same-origin",cache:"default"}}}var f=function(){function o(e){var t=1<arguments.length&&void 0!==arguments[1]?arguments[1]:{},n=2<arguments.length&&void 0!==arguments[2]?arguments[2]:{};!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o),this.services=e,this.options=t,this.allOptions=n,this.type="backend",this.init(e,t,n)}var e,t,n;return e=o,(t=[{key:"init",value:function(e,t,n){var o=this,i=1<arguments.length&&void 0!==t?t:{},r=2<arguments.length&&void 0!==n?n:{};this.services=e,this.options=(0,a.defaults)(i,this.options||{},s()),this.allOptions=r,this.options.reloadInterval&&setInterval(function(){return o.reload()},this.options.reloadInterval)}},{key:"readMulti",value:function(e,t,n){var o=this.options.loadPath;"function"==typeof this.options.loadPath&&(o=this.options.loadPath(e,t));var i=this.services.interpolator.interpolate(o,{lng:e.join("+"),ns:t.join("+")});this.loadUrl(i,n,e,t)}},{key:"read",value:function(e,t,n){var o=this.options.loadPath;"function"==typeof this.options.loadPath&&(o=this.options.loadPath([e],[t]));var i=this.services.interpolator.interpolate(o,{lng:e,ns:t});this.loadUrl(i,n,e,t)}},{key:"loadUrl",value:function(i,r,a,s){var f=this;this.options.request(this.options,i,function(e,t){if(t&&500<=t.status&&t.status<600)return r("failed loading "+i,!0);if(t&&400<=t.status&&t.status<500)return r("failed loading "+i,!1);if(e)return r(e,!1);var n,o;try{n=f.options.parse(t.data,a,s)}catch(e){o="failed parsing "+i+" to json"}if(o)return r(o,!1);r(null,n)})}},{key:"create",value:function(e,n,t,o){var i=this;if(this.options.addPath){"string"==typeof e&&(e=[e]);var r=this.options.parsePayload(n,t,o);e.forEach(function(e){var t=i.services.interpolator.interpolate(i.options.addPath,{lng:e,ns:n});i.options.request(i.options,t,r,function(e,t){})})}}},{key:"reload",value:function(){var e=this,t=this.services,i=t.backendConnector,n=t.languageUtils,r=t.logger,o=i.language;if(!o||"cimode"!==o.toLowerCase()){var a=[],s=function(e){n.toResolveHierarchy(e).forEach(function(e){a.indexOf(e)<0&&a.push(e)})};s(o),this.allOptions.preload&&this.allOptions.preload.forEach(function(e){return s(e)}),a.forEach(function(o){e.allOptions.ns.forEach(function(n){i.read(o,n,"read",null,null,function(e,t){e&&r.warn("loading namespace ".concat(n," for language ").concat(o," failed"),e),!e&&t&&r.log("loaded namespace ".concat(n," for language ").concat(o),t),i.loaded("".concat(o,"|").concat(n),e,t)})})})}}}])&&r(e.prototype,t),n&&r(e,n),o}();f.type="backend";var u=f;n.default=u,t.exports=n.default},{"./request.js":3,"./utils.js":4}],3:[function(d,p,y){(function(e){"use strict";Object.defineProperty(y,"__esModule",{value:!0}),y.default=void 0;var r,s,f,t=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!==c(e)&&"function"!=typeof e)return{default:e};var t=a();if(t&&t.has(e))return t.get(e);var n={},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if(Object.prototype.hasOwnProperty.call(e,i)){var r=o?Object.getOwnPropertyDescriptor(e,i):null;r&&(r.get||r.set)?Object.defineProperty(n,i,r):n[i]=e[i]}n.default=e,t&&t.set(e,n);return n}(d("./getFetch.js"));function a(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return a=function(){return e},e}function o(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);e&&(o=o.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),n.push.apply(n,o)}return n}function u(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?o(Object(n),!0).forEach(function(e){i(t,e,n[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):o(Object(n)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))})}return t}function i(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function c(e){return(c="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})(e)}"function"==typeof fetch&&(void 0!==e&&e.fetch?r=e.fetch:"undefined"!=typeof window&&window.fetch&&(r=window.fetch)),"function"==typeof XMLHttpRequest&&(void 0!==e&&e.XMLHttpRequest?s=e.XMLHttpRequest:"undefined"!=typeof window&&window.XMLHttpRequest&&(s=window.XMLHttpRequest)),"function"==typeof ActiveXObject&&(void 0!==e&&e.ActiveXObject?f=e.ActiveXObject:"undefined"!=typeof window&&window.ActiveXObject&&(f=window.ActiveXObject)),!r&&t&&(r=t.default||t);function l(e,t){if(t&&"object"===c(t)){var n="";for(var o in t)n+="&"+encodeURIComponent(o)+"="+encodeURIComponent(t[o]);if(!n)return e;e=e+(-1!==e.indexOf("?")?"&":"?")+n.slice(1)}return e}function n(e,t,n,o){return"function"==typeof n&&(o=n,n=void 0),o=o||function(){},r?function(e,t,n,o){e.queryStringParams&&(t=l(t,e.queryStringParams));var i=u({},e.customHeaders||{});n&&(i["Content-Type"]="application/json"),r(t,u({method:n?"POST":"GET",body:n?e.stringify(n):void 0,headers:i},e.srequestOptions)).then(function(t){if(!t.ok)return o(t.statusText||"Error",{status:t.status});t.text().then(function(e){o(null,{status:t.status,data:e})}).catch(o)}).catch(o)}(e,t,n,o):"function"==typeof XMLHttpRequest||"function"==typeof ActiveXObject?function(e,t,n,o){n&&"object"===c(n)&&(n=l("",n).slice(1)),e.queryStringParams&&(t=l(t,e.queryStringParams));try{var i;(i=s?new s:new f("MSXML2.XMLHTTP.3.0")).open(n?"POST":"GET",t,1),e.crossDomain||i.setRequestHeader("X-Requested-With","XMLHttpRequest"),i.withCredentials=!!e.withCredentials,n&&i.setRequestHeader("Content-Type","application/x-www-form-urlencoded"),i.overrideMimeType&&i.overrideMimeType("application/json");var r=e.customHeaders;if(r="function"==typeof r?r():r)for(var a in r)i.setRequestHeader(a,r[a]);i.onreadystatechange=function(){3<i.readyState&&o(i.statusText,{status:i.status,data:i.responseText})},i.send(n)}catch(e){console&&console.log(e)}}(e,t,n,o):void 0}y.default=n,p.exports=y.default}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"./getFetch.js":1}],4:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.defaults=function(n){return i.call(r.call(arguments,1),function(e){if(e)for(var t in e)void 0===n[t]&&(n[t]=e[t])}),n};var o=[],i=o.forEach,r=o.slice},{}],5:[function(e,t,n){(function(e){"use strict";e=function(){if("undefined"!=typeof self)return self;if("undefined"!=typeof window)return window;if(void 0!==e)return e;throw new Error("unable to locate global object")}();t.exports=n=e.fetch,n.default=e.fetch.bind(e),n.Headers=e.Headers,n.Request=e.Request,n.Response=e.Response}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}]},{},[2])(2)});
!function(e){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=e();else if("function"==typeof define&&define.amd)define([],e);else{("undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this).i18nextHttpBackend=e()}}(function(){return function r(a,s,f){function u(t,e){if(!s[t]){if(!a[t]){var n="function"==typeof require&&require;if(!e&&n)return n(t,!0);if(c)return c(t,!0);var o=new Error("Cannot find module '"+t+"'");throw o.code="MODULE_NOT_FOUND",o}var i=s[t]={exports:{}};a[t][0].call(i.exports,function(e){return u(a[t][1][e]||e)},i,i.exports,r,a,s,f)}return s[t].exports}for(var c="function"==typeof require&&require,e=0;e<f.length;e++)u(f[e]);return u}({1:[function(o,i,r){(function(e){var t;if("function"==typeof fetch&&(void 0!==e&&e.fetch?t=e.fetch:"undefined"!=typeof window&&window.fetch&&(t=window.fetch)),void 0!==o){var n=t||o("node-fetch");n.default&&(n=n.default),r.default=n,i.exports=r.default}}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"node-fetch":5}],2:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0;var o,a=e("./utils.js"),i=(o=e("./request.js"))&&o.__esModule?o:{default:o};function r(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}function s(){return{loadPath:"/locales/{{lng}}/{{ns}}.json",addPath:"/locales/add/{{lng}}/{{ns}}",allowMultiLoading:!1,parse:function(e){return JSON.parse(e)},stringify:JSON.stringify,parsePayload:function(e,t,n){return r=n||"",(i=t)in(o={})?Object.defineProperty(o,i,{value:r,enumerable:!0,configurable:!0,writable:!0}):o[i]=r,o;var o,i,r},request:i.default,reloadInterval:!1,customHeaders:{},queryStringParams:{},crossDomain:!1,withCredentials:!1,overrideMimeType:!1,requestOptions:{mode:"cors",credentials:"same-origin",cache:"default"}}}var f=function(){function o(e){var t=1<arguments.length&&void 0!==arguments[1]?arguments[1]:{},n=2<arguments.length&&void 0!==arguments[2]?arguments[2]:{};!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o),this.services=e,this.options=t,this.allOptions=n,this.type="backend",this.init(e,t,n)}var e,t,n;return e=o,(t=[{key:"init",value:function(e,t,n){var o=this,i=1<arguments.length&&void 0!==t?t:{},r=2<arguments.length&&void 0!==n?n:{};this.services=e,this.options=(0,a.defaults)(i,this.options||{},s()),this.allOptions=r,this.options.reloadInterval&&setInterval(function(){return o.reload()},this.options.reloadInterval)}},{key:"readMulti",value:function(e,t,n){var o=this.options.loadPath;"function"==typeof this.options.loadPath&&(o=this.options.loadPath(e,t));var i=this.services.interpolator.interpolate(o,{lng:e.join("+"),ns:t.join("+")});this.loadUrl(i,n,e,t)}},{key:"read",value:function(e,t,n){var o=this.options.loadPath;"function"==typeof this.options.loadPath&&(o=this.options.loadPath([e],[t]));var i=this.services.interpolator.interpolate(o,{lng:e,ns:t});this.loadUrl(i,n,e,t)}},{key:"loadUrl",value:function(i,r,a,s){var f=this;this.options.request(this.options,i,function(e,t){if(t&&500<=t.status&&t.status<600)return r("failed loading "+i,!0);if(t&&400<=t.status&&t.status<500)return r("failed loading "+i,!1);if(e)return r(e,!1);var n,o;try{n=f.options.parse(t.data,a,s)}catch(e){o="failed parsing "+i+" to json"}if(o)return r(o,!1);r(null,n)})}},{key:"create",value:function(e,n,t,o){var i=this;if(this.options.addPath){"string"==typeof e&&(e=[e]);var r=this.options.parsePayload(n,t,o);e.forEach(function(e){var t=i.services.interpolator.interpolate(i.options.addPath,{lng:e,ns:n});i.options.request(i.options,t,r,function(e,t){})})}}},{key:"reload",value:function(){var e=this,t=this.services,i=t.backendConnector,n=t.languageUtils,r=t.logger,o=i.language;if(!o||"cimode"!==o.toLowerCase()){var a=[],s=function(e){n.toResolveHierarchy(e).forEach(function(e){a.indexOf(e)<0&&a.push(e)})};s(o),this.allOptions.preload&&this.allOptions.preload.forEach(function(e){return s(e)}),a.forEach(function(o){e.allOptions.ns.forEach(function(n){i.read(o,n,"read",null,null,function(e,t){e&&r.warn("loading namespace ".concat(n," for language ").concat(o," failed"),e),!e&&t&&r.log("loaded namespace ".concat(n," for language ").concat(o),t),i.loaded("".concat(o,"|").concat(n),e,t)})})})}}}])&&r(e.prototype,t),n&&r(e,n),o}();f.type="backend";var u=f;n.default=u,t.exports=n.default},{"./request.js":3,"./utils.js":4}],3:[function(d,p,y){(function(e){"use strict";Object.defineProperty(y,"__esModule",{value:!0}),y.default=void 0;var r,s,f,t=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!==c(e)&&"function"!=typeof e)return{default:e};var t=a();if(t&&t.has(e))return t.get(e);var n={},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if(Object.prototype.hasOwnProperty.call(e,i)){var r=o?Object.getOwnPropertyDescriptor(e,i):null;r&&(r.get||r.set)?Object.defineProperty(n,i,r):n[i]=e[i]}n.default=e,t&&t.set(e,n);return n}(d("./getFetch.js"));function a(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return a=function(){return e},e}function o(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);e&&(o=o.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),n.push.apply(n,o)}return n}function u(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?o(Object(n),!0).forEach(function(e){i(t,e,n[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):o(Object(n)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))})}return t}function i(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function c(e){return(c="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})(e)}"function"==typeof fetch&&(void 0!==e&&e.fetch?r=e.fetch:"undefined"!=typeof window&&window.fetch&&(r=window.fetch)),"function"==typeof XMLHttpRequest&&(void 0!==e&&e.XMLHttpRequest?s=e.XMLHttpRequest:"undefined"!=typeof window&&window.XMLHttpRequest&&(s=window.XMLHttpRequest)),"function"==typeof ActiveXObject&&(void 0!==e&&e.ActiveXObject?f=e.ActiveXObject:"undefined"!=typeof window&&window.ActiveXObject&&(f=window.ActiveXObject)),!r&&t&&(r=t.default||t);function l(e,t){if(t&&"object"===c(t)){var n="";for(var o in t)n+="&"+encodeURIComponent(o)+"="+encodeURIComponent(t[o]);if(!n)return e;e=e+(-1!==e.indexOf("?")?"&":"?")+n.slice(1)}return e}function n(e,t,n,o){return"function"==typeof n&&(o=n,n=void 0),o=o||function(){},r?function(e,t,n,o){e.queryStringParams&&(t=l(t,e.queryStringParams));var i=u({},e.customHeaders||{});n&&(i["Content-Type"]="application/json"),r(t,u({method:n?"POST":"GET",body:n?e.stringify(n):void 0,headers:i},"function"==typeof e.requestOptions?e.requestOptions(n):e.requestOptions)).then(function(t){if(!t.ok)return o(t.statusText||"Error",{status:t.status});t.text().then(function(e){o(null,{status:t.status,data:e})}).catch(o)}).catch(o)}(e,t,n,o):"function"==typeof XMLHttpRequest||"function"==typeof ActiveXObject?function(e,t,n,o){n&&"object"===c(n)&&(n=l("",n).slice(1)),e.queryStringParams&&(t=l(t,e.queryStringParams));try{var i;(i=s?new s:new f("MSXML2.XMLHTTP.3.0")).open(n?"POST":"GET",t,1),e.crossDomain||i.setRequestHeader("X-Requested-With","XMLHttpRequest"),i.withCredentials=!!e.withCredentials,n&&i.setRequestHeader("Content-Type","application/x-www-form-urlencoded"),i.overrideMimeType&&i.overrideMimeType("application/json");var r=e.customHeaders;if(r="function"==typeof r?r():r)for(var a in r)i.setRequestHeader(a,r[a]);i.onreadystatechange=function(){3<i.readyState&&o(i.statusText,{status:i.status,data:i.responseText})},i.send(n)}catch(e){console&&console.log(e)}}(e,t,n,o):void 0}y.default=n,p.exports=y.default}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"./getFetch.js":1}],4:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.defaults=function(n){return i.call(r.call(arguments,1),function(e){if(e)for(var t in e)void 0===n[t]&&(n[t]=e[t])}),n};var o=[],i=o.forEach,r=o.slice},{}],5:[function(e,t,n){(function(e){"use strict";e=function(){if("undefined"!=typeof self)return self;if("undefined"!=typeof window)return window;if(void 0!==e)return e;throw new Error("unable to locate global object")}();t.exports=n=e.fetch,n.default=e.fetch.bind(e),n.Headers=e.Headers,n.Request=e.Request,n.Response=e.Response}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}]},{},[2])(2)});

@@ -53,3 +53,3 @@ import * as fetchNode from './getFetch.cjs'

headers,
...options.srequestOptions
...(typeof options.requestOptions === 'function' ? options.requestOptions(payload) : options.requestOptions)
}).then((response) => {

@@ -56,0 +56,0 @@ if (!response.ok) return callback(response.statusText || 'Error', { status: response.status })

{
"name": "i18next-http-backend",
"version": "1.0.6",
"version": "1.0.7",
"private": false,

@@ -61,3 +61,3 @@ "type": "module",

"lint": "eslint .",
"compile": "rm -rf cjs && mkdir cjs && babel lib -d cjs --presets=@babel/preset-env --plugins=add-module-exports && echo '{\"type\":\"commonjs\"}' > cjs/package.json && cp lib/getFetch.cjs cjs/getFetch.js && sed -i '' 's/getFetch.cjs/getFetch.js/g' cjs/request.js",
"compile": "rm -rf cjs && mkdir cjs && babel lib -d cjs --presets=@babel/preset-env --plugins=add-module-exports && echo '{\"type\":\"commonjs\"}' > cjs/package.json && cp lib/getFetch.cjs cjs/getFetch.js && node -e \"fs.writeFileSync('cjs/request.js', fs.readFileSync('cjs/request.js').toString().replace('getFetch.cjs', 'getFetch.js'))\"",
"browser": "browserify --standalone i18nextHttpBackend cjs/index.js -o i18nextHttpBackend.js && uglifyjs i18nextHttpBackend.js --compress --mangle -o i18nextHttpBackend.min.js",

@@ -64,0 +64,0 @@ "build": "npm run compile && npm run browser",

@@ -10,2 +10,4 @@ # Introduction

It's based on the deprecated [i18next-xhr-backend](https://github.com/i18next/i18next-xhr-backend) and can mostly be used as a drop-in replacement.
# Getting started

@@ -12,0 +14,0 @@

SocketSocket SOC 2 Logo

Product

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

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc