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

@liff/open-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/open-window - npm Package Compare versions

Comparing version 2.21.4 to 2.22.0

2

lib/index.cjs.js

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

"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("tslib"),n=require("@liff/consts"),i=require("@liff/util"),r=require("@liff/is-in-client"),t=require("@liff/get-os"),o=require("@liff/get-line-version"),f=require("@liff/native-bridge"),l=function(e,n){return e?"&".concat(e.split("&").filter((function(e){return-1===e.indexOf("is_liff_external_open_window")})).join("&").concat("".concat(n?"#".concat(n):""))):"".concat(n?"#".concat(n):"")};exports.openWindow=function(a){if(!function(n){if(!n||"object"!=typeof n)return!1;var i=n,r=i.url,t=i.external,o=e.__read([typeof r,typeof t],2),f=o[0],l=o[1];return"string"===f&&""!==r&&("undefined"===l||"boolean"===l)}(a))throw i.createLiffError(n.INVALID_ARGUMENT,"Invalid parameters for liff.openWindow()");var c=o.getLineVersion();if(r.isInClient())if(null!==c&&"ios"===t.getOS()&&i.compareVersion(c,"9.19")>=0||!window._liff.postMessage){var u=a.url,d=a.external,s=void 0!==d&&d;window.open(function(n,i){var r,t,o,f,a,c,u,d,s,_;(function(e){return-1!==e.indexOf("#")&&-1!==e.indexOf("?")&&e.indexOf("#")<e.indexOf("?")})(n)||function(e){return-1===e.indexOf("?")&&-1!==e.indexOf("#")}(n)?(u=(r=e.__read(n.split("#"),2))[0],d=void 0===(t=r[1])?"":t,s=(o=e.__read(d.split("?"),2))[0],_=o[1]):(u=(f=e.__read(n.split("?"),2))[0],d=void 0===(a=f[1])?"":a,_=(c=e.__read(d.split("#"),2))[0],s=c[1]);var p=l(_,s);return"".concat(u,"?").concat("is_liff_external_open_window","=").concat(!!i).concat(p)}(u,s))}else f.call("openWindow",a);else window.open(a.url,"_blank")};
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("tslib"),n=require("@liff/consts"),i=require("@liff/util"),r=require("@liff/is-in-client"),t=require("@liff/get-os"),o=require("@liff/get-line-version"),f=require("@liff/native-bridge"),l=require("@liff/use"),u=function(e,n){return e?"&".concat(e.split("&").filter((function(e){return-1===e.indexOf("is_liff_external_open_window")})).join("&").concat("".concat(n?"#".concat(n):""))):"".concat(n?"#".concat(n):"")};function a(l){if(!function(n){if(!n||"object"!=typeof n)return!1;var i=n,r=i.url,t=i.external,o=e.__read([typeof r,typeof t],2),f=o[0],l=o[1];return"string"===f&&""!==r&&("undefined"===l||"boolean"===l)}(l))throw i.createLiffError(n.INVALID_ARGUMENT,"Invalid parameters for liff.openWindow()");var a=o.getLineVersion();if(r.isInClient())if(null!==a&&"ios"===t.getOS()&&i.compareVersion(a,"9.19")>=0||!window._liff.postMessage){var c=l.url,d=l.external,s=void 0!==d&&d;window.open(function(n,i){var r,t,o,f,l,a,c,d,s,p;(function(e){return-1!==e.indexOf("#")&&-1!==e.indexOf("?")&&e.indexOf("#")<e.indexOf("?")})(n)||function(e){return-1===e.indexOf("?")&&-1!==e.indexOf("#")}(n)?(c=(r=e.__read(n.split("#"),2))[0],d=void 0===(t=r[1])?"":t,s=(o=e.__read(d.split("?"),2))[0],p=o[1]):(c=(f=e.__read(n.split("?"),2))[0],d=void 0===(l=f[1])?"":l,p=(a=e.__read(d.split("#"),2))[0],s=a[1]);var _=u(p,s);return"".concat(c,"?").concat("is_liff_external_open_window","=").concat(!!i).concat(_)}(c,s))}else f.call("openWindow",l);else window.open(l.url,"_blank")}var c=function(n){function i(){return null!==n&&n.apply(this,arguments)||this}return e.__extends(i,n),Object.defineProperty(i.prototype,"name",{get:function(){return"openWindow"},enumerable:!1,configurable:!0}),i.prototype.install=function(){return function(e){return a(e)}},i}(l.LiffModule);exports.OpenWindowModule=c,exports.openWindow=a;

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

import { LiffModule } from '@liff/use';
export interface OpenWindowParams {

@@ -6,1 +7,7 @@ url: string;

export declare function openWindow(params: OpenWindowParams): void;
type Api = (params: OpenWindowParams) => void;
export declare class OpenWindowModule extends LiffModule<Api, never, {}> {
get name(): string;
install(): (params: OpenWindowParams) => void;
}
export {};

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

import{__read as n}from"tslib";import{INVALID_ARGUMENT as i}from"@liff/consts";import{createLiffError as o,compareVersion as t}from"@liff/util";import{isInClient as e}from"@liff/is-in-client";import{getOS as f}from"@liff/get-os";import{getLineVersion as r}from"@liff/get-line-version";import{call as l}from"@liff/native-bridge";var c=function(n,i){return n?"&".concat(n.split("&").filter((function(n){return-1===n.indexOf("is_liff_external_open_window")})).join("&").concat("".concat(i?"#".concat(i):""))):"".concat(i?"#".concat(i):"")};function a(a){if(!function(i){if(!i||"object"!=typeof i)return!1;var o=i,t=o.url,e=o.external,f=n([typeof t,typeof e],2),r=f[0],l=f[1];return"string"===r&&""!==t&&("undefined"===l||"boolean"===l)}(a))throw o(i,"Invalid parameters for liff.openWindow()");var p=r();if(e())if(null!==p&&"ios"===f()&&t(p,"9.19")>=0||!window._liff.postMessage){var d=a.url,s=a.external,u=void 0!==s&&s;window.open(function(i,o){var t,e,f,r,l,a,p,d,s;(function(n){return-1!==n.indexOf("#")&&-1!==n.indexOf("?")&&n.indexOf("#")<n.indexOf("?")})(i)||function(n){return-1===n.indexOf("?")&&-1!==n.indexOf("#")}(i)?(p=(t=n(i.split("#"),2))[0],e=t[1],d=(f=n((void 0===e?"":e).split("?"),2))[0],s=f[1]):(p=(r=n(i.split("?"),2))[0],l=r[1],s=(a=n((void 0===l?"":l).split("#"),2))[0],d=a[1]);var u=c(s,d);return"".concat(p,"?").concat("is_liff_external_open_window","=").concat(!!o).concat(u)}(d,u))}else l("openWindow",a);else window.open(a.url,"_blank")}export{a as openWindow};
import{__extends as n,__read as i}from"tslib";import{INVALID_ARGUMENT as t}from"@liff/consts";import{createLiffError as o,compareVersion as e}from"@liff/util";import{isInClient as r}from"@liff/is-in-client";import{getOS as f}from"@liff/get-os";import{getLineVersion as l}from"@liff/get-line-version";import{call as c}from"@liff/native-bridge";import{LiffModule as u}from"@liff/use";var a=function(n,i){return n?"&".concat(n.split("&").filter((function(n){return-1===n.indexOf("is_liff_external_open_window")})).join("&").concat("".concat(i?"#".concat(i):""))):"".concat(i?"#".concat(i):"")};function p(n){if(!function(n){if(!n||"object"!=typeof n)return!1;var t=n,o=t.url,e=t.external,r=i([typeof o,typeof e],2),f=r[0],l=r[1];return"string"===f&&""!==o&&("undefined"===l||"boolean"===l)}(n))throw o(t,"Invalid parameters for liff.openWindow()");var u=l();if(r())if(null!==u&&"ios"===f()&&e(u,"9.19")>=0||!window._liff.postMessage){var p=n.url,s=n.external,d=void 0!==s&&s;window.open(function(n,t){var o,e,r,f,l,c,u,p,s;(function(n){return-1!==n.indexOf("#")&&-1!==n.indexOf("?")&&n.indexOf("#")<n.indexOf("?")})(n)||function(n){return-1===n.indexOf("?")&&-1!==n.indexOf("#")}(n)?(u=(o=i(n.split("#"),2))[0],e=o[1],p=(r=i((void 0===e?"":e).split("?"),2))[0],s=r[1]):(u=(f=i(n.split("?"),2))[0],l=f[1],s=(c=i((void 0===l?"":l).split("#"),2))[0],p=c[1]);var d=a(s,p);return"".concat(u,"?").concat("is_liff_external_open_window","=").concat(!!t).concat(d)}(p,d))}else c("openWindow",n);else window.open(n.url,"_blank")}var s=function(i){function t(){return null!==i&&i.apply(this,arguments)||this}return n(t,i),Object.defineProperty(t.prototype,"name",{get:function(){return"openWindow"},enumerable:!1,configurable:!0}),t.prototype.install=function(){return function(n){return p(n)}},t}(u);export{s as OpenWindowModule,p as openWindow};
{
"name": "@liff/open-window",
"version": "2.21.4",
"version": "2.22.0",
"description": "@liff/open-window",

@@ -34,10 +34,11 @@ "license": "SEE LICENSE IN README.md",

"dependencies": {
"@liff/consts": "2.21.4",
"@liff/get-line-version": "2.21.4",
"@liff/get-os": "2.21.4",
"@liff/is-in-client": "2.21.4",
"@liff/native-bridge": "2.21.4",
"@liff/util": "2.21.4"
},
"gitHead": "af2b35a241fa715f3aa1ce484f011c9da9524e12"
"@liff/consts": "2.22.0",
"@liff/get-line-version": "2.22.0",
"@liff/get-os": "2.22.0",
"@liff/is-in-client": "2.22.0",
"@liff/native-bridge": "2.22.0",
"@liff/types": "2.22.0",
"@liff/use": "2.22.0",
"@liff/util": "2.22.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