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

@evervault/react

Package Overview
Dependencies
Maintainers
7
Versions
50
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@evervault/react - npm Package Compare versions

Comparing version 0.2.1 to 0.2.2

2

build/lib/index.js

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

!function(e,t){if("object"==typeof exports&&"object"==typeof module)module.exports=t(require("react"));else if("function"==typeof define&&define.amd)define(["react"],t);else{var r="object"==typeof exports?t(require("react")):t(e.react);for(var n in r)("object"==typeof exports?exports:e)[n]=r[n]}}(window,(function(e){return function(e){var t={};function r(n){if(t[n])return t[n].exports;var o=t[n]={i:n,l:!1,exports:{}};return e[n].call(o.exports,o,o.exports,r),o.l=!0,o.exports}return r.m=e,r.c=t,r.d=function(e,t,n){r.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},r.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.t=function(e,t){if(1&t&&(e=r(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(r.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)r.d(n,o,function(t){return e[t]}.bind(null,o));return n},r.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(t,"a",t),t},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.p="",r(r.s=1)}([function(t,r){t.exports=e},function(e,t,r){"use strict";r.r(t),r.d(t,"EvervaultContext",(function(){return p})),r.d(t,"EvervaultProvider",(function(){return y})),r.d(t,"useEvervault",(function(){return b}));var n=r(0),o=r.n(n);function u(){return(u=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e}).apply(this,arguments)}function i(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if(!(Symbol.iterator in Object(e)||"[object Arguments]"===Object.prototype.toString.call(e)))return;var r=[],n=!0,o=!1,u=void 0;try{for(var i,a=e[Symbol.iterator]();!(n=(i=a.next()).done)&&(r.push(i.value),!t||r.length!==t);n=!0);}catch(e){o=!0,u=e}finally{try{n||null==a.return||a.return()}finally{if(o)throw u}}return r}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}()}function a(e,t){if(null==e)return{};var r,n,o=function(e,t){if(null==e)return{};var r,n,o={},u=Object.keys(e);for(n=0;n<u.length;n++)r=u[n],t.indexOf(r)>=0||(o[r]=e[r]);return o}(e,t);if(Object.getOwnPropertySymbols){var u=Object.getOwnPropertySymbols(e);for(n=0;n<u.length;n++)r=u[n],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}function c(e,t,r,n,o,u,i){try{var a=e[u](i),c=a.value}catch(e){return void r(e)}a.done?t(c):Promise.resolve(c).then(n,o)}var l=/^https:\/\/js\.evervault\.com\/v1\/?(\?.*)?$/,f=null,v=function(){return null!==f?f:f=new Promise((function(e,t){if("undefined"!=typeof window)if(window.Evervault&&console.warn("Evervault has already been loaded"),window.Evervault)e(window.Evervault);else try{var r=s();r?console.warn("Evervault has already been loaded"):r||(r=function(){var e=document.createElement("script");e.src="https://js.evervault.com/v1";var t=document.head||document.body;if(!t)throw new Error("Expected document.body not to be null. Evervault.js requires a <body> element.");return t.appendChild(e),e}()),r.addEventListener("load",(function(){window.Evervault?e(window.Evervault):t(new Error("Evervault.js not available"))})),r.addEventListener("error",(function(){t(new Error("Failed to load Evervault.js"))}))}catch(e){return void t(e)}else e(null)}))},s=function(){for(var e=document.querySelectorAll<HTMLScriptElement>'script[src^="'.concat("https://js.evervault.com/v1",'"]'),t=0;t<e.length;t++){var r=e[t];if(l.test(r.src))return r}return null},d=function(){var e,t=(e=regeneratorRuntime.mark((function e(){var t,r;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=Promise.resolve().then((function(){return v()})),r=!1,t.catch((function(e){r||console.warn(e)})),r=!0,e.abrupt("return",t.then((function(){return window.Evervault})));case 5:case"end":return e.stop()}}),e)})),function(){var t=this,r=arguments;return new Promise((function(n,o){var u=e.apply(t,r);function i(e){c(u,n,o,i,a,"next",e)}function a(e){c(u,n,o,i,a,"throw",e)}i(void 0)}))});return function(){return t.apply(this,arguments)}}(),p=o.a.createContext(void 0),y=function(e){var t=e.teamId,r=e.children,n=a(e,["teamId","children"]),c=i(o.a.useState(void 0),2),l=c[0],f=c[1];return o.a.useEffect((function(){d().then((function(e){return f(new e(t))}))}),[d]),o.a.createElement(p.Provider,u({},n,{value:l}),r)};function b(){if("function"!=typeof o.a.useContext)throw new Error("You must use React >= 16.8 in order to use useEvervault()");return o.a.useContext(p)}}])}));
!function(e,t){if("object"==typeof exports&&"object"==typeof module)module.exports=t(require("react"));else if("function"==typeof define&&define.amd)define(["react"],t);else{var r="object"==typeof exports?t(require("react")):t(e.react);for(var n in r)("object"==typeof exports?exports:e)[n]=r[n]}}(window,(function(e){return function(e){var t={};function r(n){if(t[n])return t[n].exports;var o=t[n]={i:n,l:!1,exports:{}};return e[n].call(o.exports,o,o.exports,r),o.l=!0,o.exports}return r.m=e,r.c=t,r.d=function(e,t,n){r.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},r.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.t=function(e,t){if(1&t&&(e=r(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(r.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)r.d(n,o,function(t){return e[t]}.bind(null,o));return n},r.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(t,"a",t),t},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.p="",r(r.s=1)}([function(t,r){t.exports=e},function(e,t,r){"use strict";r.r(t),r.d(t,"EvervaultContext",(function(){return p})),r.d(t,"EvervaultProvider",(function(){return y})),r.d(t,"useEvervault",(function(){return b}));var n=r(0),o=r.n(n);function u(){return(u=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e}).apply(this,arguments)}function i(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if(!(Symbol.iterator in Object(e)||"[object Arguments]"===Object.prototype.toString.call(e)))return;var r=[],n=!0,o=!1,u=void 0;try{for(var i,a=e[Symbol.iterator]();!(n=(i=a.next()).done)&&(r.push(i.value),!t||r.length!==t);n=!0);}catch(e){o=!0,u=e}finally{try{n||null==a.return||a.return()}finally{if(o)throw u}}return r}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}()}function a(e,t){if(null==e)return{};var r,n,o=function(e,t){if(null==e)return{};var r,n,o={},u=Object.keys(e);for(n=0;n<u.length;n++)r=u[n],t.indexOf(r)>=0||(o[r]=e[r]);return o}(e,t);if(Object.getOwnPropertySymbols){var u=Object.getOwnPropertySymbols(e);for(n=0;n<u.length;n++)r=u[n],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}function c(e,t,r,n,o,u,i){try{var a=e[u](i),c=a.value}catch(e){return void r(e)}a.done?t(c):Promise.resolve(c).then(n,o)}var l=/^https:\/\/js\.evervault\.com\/v1\/?(\?.*)?$/,f=null,v=function(){return null!==f?f:f=new Promise((function(e,t){if("undefined"!=typeof window)if(window.Evervault&&console.warn("Evervault has already been loaded"),window.Evervault)e(window.Evervault);else try{var r=d();r?console.warn("Evervault has already been loaded"):r||(r=function(){var e=document.createElement("script");e.src="https://js.evervault.com/v1";var t=document.head||document.body;if(!t)throw new Error("Expected document.body not to be null. Evervault.js requires a <body> element.");return t.appendChild(e),e}()),r.addEventListener("load",(function(){window.Evervault?e(window.Evervault):t(new Error("Evervault.js not available"))})),r.addEventListener("error",(function(){t(new Error("Failed to load Evervault.js"))}))}catch(e){return void t(e)}else e(null)}))},d=function(){for(var e=document.querySelectorAll<HTMLScriptElement>'script[src^="'.concat("https://js.evervault.com/v1",'"]'),t=0;t<e.length;t++){var r=e[t];if(l.test(r.src))return r}return null},s=function(){var e,t=(e=regeneratorRuntime.mark((function e(){var t,r;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=Promise.resolve().then((function(){return v()})),r=!1,t.catch((function(e){r||console.warn(e)})),r=!0,e.abrupt("return",t.then((function(){"undefined"!=typeof window&&window.Evervault})));case 5:case"end":return e.stop()}}),e)})),function(){var t=this,r=arguments;return new Promise((function(n,o){var u=e.apply(t,r);function i(e){c(u,n,o,i,a,"next",e)}function a(e){c(u,n,o,i,a,"throw",e)}i(void 0)}))});return function(){return t.apply(this,arguments)}}(),p=o.a.createContext(void 0),y=function(e){var t=e.teamId,r=e.children,n=a(e,["teamId","children"]),c=i(o.a.useState(void 0),2),l=c[0],f=c[1];return o.a.useEffect((function(){s().then((function(e){return f(new e(t))}))}),[s]),o.a.createElement(p.Provider,u({},n,{value:l}),r)};function b(){if("function"!=typeof o.a.useContext)throw new Error("You must use React >= 16.8 in order to use useEvervault()");return o.a.useContext(p)}}])}));

@@ -106,3 +106,5 @@ /** @format */

loadCalled = true;
return evervaultPromise.then(() => window.Evervault)
return evervaultPromise.then(() => {
if (typeof window !== 'undefined') window.Evervault
})
}

@@ -109,0 +111,0 @@

{
"name": "@evervault/react",
"version": "0.2.1",
"version": "0.2.2",
"description": "React package for the Evervault SDK",

@@ -27,4 +27,4 @@ "main": "./build/lib/index.js",

"webpack": "^4.41.2",
"webpack-cli": "^3.3.10"
"webpack-cli": "^3.3.12"
}
}
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