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

@liff/is-sub-window

Package Overview
Dependencies
Maintainers
2
Versions
30
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@liff/is-sub-window - npm Package Compare versions

Comparing version 2.21.1 to 2.21.2

2

lib/index.cjs.js

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

"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("@liff/consts"),t=require("@liff/util"),i=require("@liff/store"),n=require("@liff/is-in-client"),r=function(){function e(){}return e.prototype.invoke=function(){return t.isSubWindow()},e}(),o=function(){function n(e){this.storage=e}return Object.defineProperty(n,"IN_SUB_WINDOW_KEY",{get:function(){return"inSubWindow"},enumerable:!1,configurable:!0}),n.prototype.invoke=function(){return!(!this.getInSubWindow()&&!this.getSubWindowIdentifier())||!!new URLSearchParams(window.location.search).has(e.SUB_WINDOW_IDNTIFICATION_KEY)&&(this.setInSubWindow(!0),!0)},n.prototype.getInSubWindow=function(){var t=this.storage.getItem(e.STORE_KEY+":"+this.getLiffId()+":"+n.IN_SUB_WINDOW_KEY);return null!==t&&JSON.parse(t)},n.prototype.getSubWindowIdentifier=function(){var e,t,i="liff.subwindow.identifier",n=new URLSearchParams(window.location.search);return n.get(i)||(e=i,(t=n.get("liff.state"))?new URLSearchParams(t).get(e):null)||null},n.prototype.setInSubWindow=function(t){this.storage.setItem(e.STORE_KEY+":"+this.getLiffId()+":"+n.IN_SUB_WINDOW_KEY,String(t))},n.prototype.getLiffId=function(){var n=i.getConfig().liffId;if(!n)throw t.createLiffError(e.INVALID_CONFIG,"liffId is necessary for liff.init()");return n},n}(),u=function(){function e(){n.isInClient()?this.impl=new r:this.impl=new o(window.sessionStorage)}return Object.defineProperty(e.prototype,"name",{get:function(){return"isSubWindow"},enumerable:!1,configurable:!0}),e.prototype.install=function(){return this.impl.invoke.bind(this.impl)},e}(),f=new u,s=f.install();exports.IsSubWindowModule=u,exports.isSubWindow=s,exports.module=f;
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var t=require("@liff/consts"),e=require("@liff/util"),n=require("@liff/store"),i=require("@liff/is-in-client"),o=function(){function t(){}return t.prototype.invoke=function(){return e.isSubWindow()},t}(),r=function(){function i(t){this.storage=t}return Object.defineProperty(i,"IN_SUB_WINDOW_KEY",{get:function(){return"inSubWindow"},enumerable:!1,configurable:!0}),i.prototype.invoke=function(){return!(!this.getInSubWindow()&&!this.getSubWindowIdentifier())||!!new URLSearchParams(window.location.search).has(t.SUB_WINDOW_IDNTIFICATION_KEY)&&(this.setInSubWindow(!0),!0)},i.prototype.getInSubWindow=function(){var e=this.storage.getItem("".concat(t.STORE_KEY,":").concat(this.getLiffId(),":").concat(i.IN_SUB_WINDOW_KEY));return null!==e&&JSON.parse(e)},i.prototype.getSubWindowIdentifier=function(){var t,e,n="liff.subwindow.identifier",i=new URLSearchParams(window.location.search);return i.get(n)||(t=n,(e=i.get("liff.state"))?new URLSearchParams(e).get(t):null)||null},i.prototype.setInSubWindow=function(e){this.storage.setItem("".concat(t.STORE_KEY,":").concat(this.getLiffId(),":").concat(i.IN_SUB_WINDOW_KEY),String(e))},i.prototype.getLiffId=function(){var i=n.getConfig().liffId;if(!i)throw e.createLiffError(t.INVALID_CONFIG,"liffId is necessary for liff.init()");return i},i}(),u=function(){function t(){i.isInClient()?this.impl=new o:this.impl=new r(window.sessionStorage)}return Object.defineProperty(t.prototype,"name",{get:function(){return"isSubWindow"},enumerable:!1,configurable:!0}),t.prototype.install=function(){return this.impl.invoke.bind(this.impl)},t}(),f=new u,s=f.install();exports.IsSubWindowModule=u,exports.isSubWindow=s,exports.module=f;

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

import{SUB_WINDOW_IDNTIFICATION_KEY as t,STORE_KEY as n,INVALID_CONFIG as i}from"@liff/consts";import{createLiffError as e,isSubWindow as o}from"@liff/util";import{getConfig as r}from"@liff/store";import{isInClient as f}from"@liff/is-in-client";var u=function(){function t(){}return t.prototype.invoke=function(){return o()},t}(),s=function(){function o(t){this.storage=t}return Object.defineProperty(o,"IN_SUB_WINDOW_KEY",{get:function(){return"inSubWindow"},enumerable:!1,configurable:!0}),o.prototype.invoke=function(){return!(!this.getInSubWindow()&&!this.getSubWindowIdentifier())||!!new URLSearchParams(window.location.search).has(t)&&(this.setInSubWindow(!0),!0)},o.prototype.getInSubWindow=function(){var t=this.storage.getItem(n+":"+this.getLiffId()+":"+o.IN_SUB_WINDOW_KEY);return null!==t&&JSON.parse(t)},o.prototype.getSubWindowIdentifier=function(){var t,n,i="liff.subwindow.identifier",e=new URLSearchParams(window.location.search);return e.get(i)||(t=i,(n=e.get("liff.state"))?new URLSearchParams(n).get(t):null)||null},o.prototype.setInSubWindow=function(t){this.storage.setItem(n+":"+this.getLiffId()+":"+o.IN_SUB_WINDOW_KEY,String(t))},o.prototype.getLiffId=function(){var t=r().liffId;if(!t)throw e(i,"liffId is necessary for liff.init()");return t},o}(),a=function(){function t(){f()?this.impl=new u:this.impl=new s(window.sessionStorage)}return Object.defineProperty(t.prototype,"name",{get:function(){return"isSubWindow"},enumerable:!1,configurable:!0}),t.prototype.install=function(){return this.impl.invoke.bind(this.impl)},t}(),l=new a,c=l.install();export{a as IsSubWindowModule,c as isSubWindow,l as module};
import{SUB_WINDOW_IDNTIFICATION_KEY as t,STORE_KEY as n,INVALID_CONFIG as i}from"@liff/consts";import{createLiffError as e,isSubWindow as o}from"@liff/util";import{getConfig as r}from"@liff/store";import{isInClient as f}from"@liff/is-in-client";var u=function(){function t(){}return t.prototype.invoke=function(){return o()},t}(),s=function(){function o(t){this.storage=t}return Object.defineProperty(o,"IN_SUB_WINDOW_KEY",{get:function(){return"inSubWindow"},enumerable:!1,configurable:!0}),o.prototype.invoke=function(){return!(!this.getInSubWindow()&&!this.getSubWindowIdentifier())||!!new URLSearchParams(window.location.search).has(t)&&(this.setInSubWindow(!0),!0)},o.prototype.getInSubWindow=function(){var t=this.storage.getItem("".concat(n,":").concat(this.getLiffId(),":").concat(o.IN_SUB_WINDOW_KEY));return null!==t&&JSON.parse(t)},o.prototype.getSubWindowIdentifier=function(){var t,n,i="liff.subwindow.identifier",e=new URLSearchParams(window.location.search);return e.get(i)||(t=i,(n=e.get("liff.state"))?new URLSearchParams(n).get(t):null)||null},o.prototype.setInSubWindow=function(t){this.storage.setItem("".concat(n,":").concat(this.getLiffId(),":").concat(o.IN_SUB_WINDOW_KEY),String(t))},o.prototype.getLiffId=function(){var t=r().liffId;if(!t)throw e(i,"liffId is necessary for liff.init()");return t},o}(),c=function(){function t(){f()?this.impl=new u:this.impl=new s(window.sessionStorage)}return Object.defineProperty(t.prototype,"name",{get:function(){return"isSubWindow"},enumerable:!1,configurable:!0}),t.prototype.install=function(){return this.impl.invoke.bind(this.impl)},t}(),a=new c,l=a.install();export{c as IsSubWindowModule,l as isSubWindow,a as module};
{
"name": "@liff/is-sub-window",
"version": "2.21.1",
"version": "2.21.2",
"description": "@liff/is-sub-window",

@@ -24,5 +24,5 @@ "license": "SEE LICENSE IN README.md",

"build:npm": "rollup -c rollup.config.js",
"build:watch": "yarn build:npm -w --watch.include './src/**'",
"dev-server": "yarn build:watch",
"dev-server:https": "yarn build:watch",
"build:watch": "npm run build:npm -- --watch",
"dev-server": "npm run build:watch",
"dev-server:https": "npm run build:watch",
"build:prerelease": "rollup -c rollup.config.prerelease.js",

@@ -35,9 +35,9 @@ "clean": "rm -rf ./lib ./tsconfig.tsbuildinfo"

"dependencies": {
"@liff/consts": "2.21.1",
"@liff/is-in-client": "2.21.1",
"@liff/store": "2.21.1",
"@liff/use": "2.21.1",
"@liff/util": "2.21.1"
"@liff/consts": "2.21.2",
"@liff/is-in-client": "2.21.2",
"@liff/store": "2.21.2",
"@liff/use": "2.21.2",
"@liff/util": "2.21.2"
},
"gitHead": "9af2e0816a5cd5547b99e8cadba3ee274b270a9a"
"gitHead": "b43eee22bc2c90b85e9919820c557cc15fb9712c"
}
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