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.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("tslib"),i=require("@liff/consts"),n=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,i){return e?"&"+e.split("&").filter((function(e){return-1===e.indexOf("is_liff_external_open_window")})).join("&").concat(i?"#"+i:""):i?"#"+i:""};exports.openWindow=function(u){if(!function(i){if(!i||"object"!=typeof i)return!1;var n=i,r=n.url,t=n.external,o=e.__read([typeof r,typeof t],2),f=o[0],l=o[1];return"string"===f&&""!==r&&("undefined"===l||"boolean"===l)}(u))throw n.createLiffError(i.INVALID_ARGUMENT,"Invalid parameters for liff.openWindow()");var d=o.getLineVersion();if(r.isInClient())if(null!==d&&"ios"===t.getOS()&&n.compareVersion(d,"9.19")>=0||!window._liff.postMessage){var s=u.url,a=u.external,_=void 0!==a&&a;window.open(function(i,n){var r,t,o,f,u,d,s,a,_,p;return function(e){return-1!==e.indexOf("#")&&-1!==e.indexOf("?")&&e.indexOf("#")<e.indexOf("?")}(i)||function(e){return-1===e.indexOf("?")&&-1!==e.indexOf("#")}(i)?(s=(r=e.__read(i.split("#"),2))[0],a=void 0===(t=r[1])?"":t,_=(o=e.__read(a.split("?"),2))[0],p=o[1]):(s=(f=e.__read(i.split("?"),2))[0],a=void 0===(u=f[1])?"":u,p=(d=e.__read(a.split("#"),2))[0],_=d[1]),s+"?is_liff_external_open_window="+!!n+l(p,_)}(s,_))}else f.call("openWindow",u);else window.open(u.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=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")};

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

import{__read as i}from"tslib";import{INVALID_ARGUMENT as n}from"@liff/consts";import{createLiffError as o,compareVersion as e}from"@liff/util";import{isInClient as f}from"@liff/is-in-client";import{getOS as r}from"@liff/get-os";import{getLineVersion as t}from"@liff/get-line-version";import{call as l}from"@liff/native-bridge";var p=function(i,n){return i?"&"+i.split("&").filter((function(i){return-1===i.indexOf("is_liff_external_open_window")})).join("&").concat(n?"#"+n:""):n?"#"+n:""};function d(d){if(!function(n){if(!n||"object"!=typeof n)return!1;var o=n,e=o.url,f=o.external,r=i([typeof e,typeof f],2),t=r[0],l=r[1];return"string"===t&&""!==e&&("undefined"===l||"boolean"===l)}(d))throw o(n,"Invalid parameters for liff.openWindow()");var s=t();if(f())if(null!==s&&"ios"===r()&&e(s,"9.19")>=0||!window._liff.postMessage){var u=d.url,a=d.external,m=void 0!==a&&a;window.open(function(n,o){var e,f,r,t,l,d,s,u,a;return function(i){return-1!==i.indexOf("#")&&-1!==i.indexOf("?")&&i.indexOf("#")<i.indexOf("?")}(n)||function(i){return-1===i.indexOf("?")&&-1!==i.indexOf("#")}(n)?(s=(e=i(n.split("#"),2))[0],f=e[1],u=(r=i((void 0===f?"":f).split("?"),2))[0],a=r[1]):(s=(t=i(n.split("?"),2))[0],l=t[1],a=(d=i((void 0===l?"":l).split("#"),2))[0],u=d[1]),s+"?is_liff_external_open_window="+!!o+p(a,u)}(u,m))}else l("openWindow",d);else window.open(d.url,"_blank")}export{d as openWindow};
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};
{
"name": "@liff/open-window",
"version": "2.21.1",
"version": "2.21.2",
"description": "@liff/open-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,10 +35,10 @@ "clean": "rm -rf ./lib ./tsconfig.tsbuildinfo"

"dependencies": {
"@liff/consts": "2.21.1",
"@liff/get-line-version": "2.21.1",
"@liff/get-os": "2.21.1",
"@liff/is-in-client": "2.21.1",
"@liff/native-bridge": "2.21.1",
"@liff/util": "2.21.1"
"@liff/consts": "2.21.2",
"@liff/get-line-version": "2.21.2",
"@liff/get-os": "2.21.2",
"@liff/is-in-client": "2.21.2",
"@liff/native-bridge": "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