@liff/is-api-available
Advanced tools
Comparing version 2.19.1 to 2.20.0
@@ -1,1 +0,1 @@ | ||
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("@liff/consts"),n=require("@liff/util"),i=require("@liff/store"),r=require("@liff/is-in-client"),t=require("@liff/is-logged-in"),o=require("@liff/get-line-version"),u=["subwindowOpen","shareTargetPicker","multipleLiffTransition","scanCode","scanCodeV2","getAdvertisingId","addToHomeScreen","bluetoothLeFunction","skipChannelVerificationScreen"];function s(e){var n,r=i.getContext();return null===(n=null==r?void 0:r.availability)||void 0===n?void 0:n[e]}function a(e,i){var r=o.getLineVersion();return!!r&&(!(i&&n.compareVersion(r,i)>0)&&n.compareVersion(r,e)>=0)}function c(e){var n=s(e);if(!n)return!1;var i=n.permission,t=n.minVer,o=n.unsupportedFromVer;return!!i&&(!!r.isInClient()&&a(t,o))}var f={shareTargetPicker:function(){if(!t.isLoggedIn())return!1;var e=s("shareTargetPicker");if(!e)return!1;var i=e.permission,u=e.minVer;if(!i)return!1;if(r.isInClient()){var a=o.getLineVersion();return null!==a&&n.compareVersion(a,u)>=0}return!0},multipleLiffTransition:function(){var e=s("multipleLiffTransition");if(!e)return!1;var n=e.permission;return r.isInClient()&&n},subwindowOpen:function(){var e=s("subwindowOpen");return!(!e||!e.permission)&&(!r.isInClient()||a(e.minVer,e.unsupportedFromVer))},scanCode:function(){return c("scanCode")},scanCodeV2:function(){var e=s("scanCodeV2");return!(!e||!e.permission)&&(!r.isInClient()||a(e.minVer))},getAdvertisingId:function(){return c("getAdvertisingId")},addToHomeScreen:function(){return c("addToHomeScreen")},bluetoothLeFunction:function(){return c("bluetoothLeFunction")},skipChannelVerificationScreen:function(){return c("skipChannelVerificationScreen")}};exports.isApiAvailable=function(i){if(!u.includes(i))throw n.createLiffError(e.INVALID_ARGUMENT,"Unexpected API name.");var r=f[i];return!r||r()}; | ||
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("@liff/consts"),n=require("@liff/util"),i=require("@liff/store"),r=require("@liff/is-in-client"),t=require("@liff/is-logged-in"),o=require("@liff/get-line-version"),u=["subwindowOpen","shareTargetPicker","multipleLiffTransition","scanCode","scanCodeV2","getAdvertisingId","addToHomeScreen","bluetoothLeFunction","skipChannelVerificationScreen"];function s(e){var n,r=i.getContext();return null===(n=null==r?void 0:r.availability)||void 0===n?void 0:n[e]}function a(e,i){var r=o.getLineVersion();return!!r&&(!(i&&n.compareVersion(r,i)>0)&&n.compareVersion(r,e)>=0)}function f(e){var n=s(e);if(!n)return!1;var i=n.permission,t=n.minVer,o=n.unsupportedFromVer;return!!i&&(!!r.isInClient()&&a(t,o))}var c={shareTargetPicker:function(){if(!t.isLoggedIn())return!1;var e=s("shareTargetPicker");if(!e)return!1;var i=e.permission,u=e.minVer;if(!i)return!1;if(r.isInClient()){var a=o.getLineVersion();return null!==a&&n.compareVersion(a,u)>=0}return!0},multipleLiffTransition:function(){var e=s("multipleLiffTransition");if(!e)return!1;var n=e.permission;return r.isInClient()&&n},subwindowOpen:function(){var e=s("subwindowOpen");return!(!e||!e.permission)&&(!r.isInClient()||a(e.minVer,e.unsupportedFromVer))},scanCode:function(){return f("scanCode")},scanCodeV2:function(){if(!t.isLoggedIn())return!1;var e=s("scanCodeV2");return!(!e||!e.permission)&&(!r.isInClient()||a(e.minVer))},getAdvertisingId:function(){return f("getAdvertisingId")},addToHomeScreen:function(){return f("addToHomeScreen")},bluetoothLeFunction:function(){return f("bluetoothLeFunction")},skipChannelVerificationScreen:function(){return f("skipChannelVerificationScreen")}};exports.isApiAvailable=function(i){if(!u.includes(i))throw n.createLiffError(e.INVALID_ARGUMENT,"Unexpected API name.");var r=c[i];return!r||r()}; |
@@ -1,1 +0,1 @@ | ||
import{INVALID_ARGUMENT as n}from"@liff/consts";import{createLiffError as r,compareVersion as i}from"@liff/util";import{getContext as e}from"@liff/store";import{isInClient as t}from"@liff/is-in-client";import{isLoggedIn as o}from"@liff/is-logged-in";import{getLineVersion as u}from"@liff/get-line-version";var f=["subwindowOpen","shareTargetPicker","multipleLiffTransition","scanCode","scanCodeV2","getAdvertisingId","addToHomeScreen","bluetoothLeFunction","skipChannelVerificationScreen"];function a(n){var r,i=e();return null===(r=null==i?void 0:i.availability)||void 0===r?void 0:r[n]}function s(n,r){var e=u();return!!e&&(!(r&&i(e,r)>0)&&i(e,n)>=0)}function c(n){var r=a(n);if(!r)return!1;var i=r.permission,e=r.minVer,o=r.unsupportedFromVer;return!!i&&(!!t()&&s(e,o))}var l={shareTargetPicker:function(){if(!o())return!1;var n=a("shareTargetPicker");if(!n)return!1;var r=n.permission,e=n.minVer;if(!r)return!1;if(t()){var f=u();return null!==f&&i(f,e)>=0}return!0},multipleLiffTransition:function(){var n=a("multipleLiffTransition");if(!n)return!1;var r=n.permission;return t()&&r},subwindowOpen:function(){var n=a("subwindowOpen");return!(!n||!n.permission)&&(!t()||s(n.minVer,n.unsupportedFromVer))},scanCode:function(){return c("scanCode")},scanCodeV2:function(){var n=a("scanCodeV2");return!(!n||!n.permission)&&(!t()||s(n.minVer))},getAdvertisingId:function(){return c("getAdvertisingId")},addToHomeScreen:function(){return c("addToHomeScreen")},bluetoothLeFunction:function(){return c("bluetoothLeFunction")},skipChannelVerificationScreen:function(){return c("skipChannelVerificationScreen")}};function m(i){if(!f.includes(i))throw r(n,"Unexpected API name.");var e=l[i];return!e||e()}export{m as isApiAvailable}; | ||
import{INVALID_ARGUMENT as n}from"@liff/consts";import{createLiffError as r,compareVersion as i}from"@liff/util";import{getContext as e}from"@liff/store";import{isInClient as t}from"@liff/is-in-client";import{isLoggedIn as o}from"@liff/is-logged-in";import{getLineVersion as u}from"@liff/get-line-version";var f=["subwindowOpen","shareTargetPicker","multipleLiffTransition","scanCode","scanCodeV2","getAdvertisingId","addToHomeScreen","bluetoothLeFunction","skipChannelVerificationScreen"];function a(n){var r,i=e();return null===(r=null==i?void 0:i.availability)||void 0===r?void 0:r[n]}function s(n,r){var e=u();return!!e&&(!(r&&i(e,r)>0)&&i(e,n)>=0)}function c(n){var r=a(n);if(!r)return!1;var i=r.permission,e=r.minVer,o=r.unsupportedFromVer;return!!i&&(!!t()&&s(e,o))}var l={shareTargetPicker:function(){if(!o())return!1;var n=a("shareTargetPicker");if(!n)return!1;var r=n.permission,e=n.minVer;if(!r)return!1;if(t()){var f=u();return null!==f&&i(f,e)>=0}return!0},multipleLiffTransition:function(){var n=a("multipleLiffTransition");if(!n)return!1;var r=n.permission;return t()&&r},subwindowOpen:function(){var n=a("subwindowOpen");return!(!n||!n.permission)&&(!t()||s(n.minVer,n.unsupportedFromVer))},scanCode:function(){return c("scanCode")},scanCodeV2:function(){if(!o())return!1;var n=a("scanCodeV2");return!(!n||!n.permission)&&(!t()||s(n.minVer))},getAdvertisingId:function(){return c("getAdvertisingId")},addToHomeScreen:function(){return c("addToHomeScreen")},bluetoothLeFunction:function(){return c("bluetoothLeFunction")},skipChannelVerificationScreen:function(){return c("skipChannelVerificationScreen")}};function m(i){if(!f.includes(i))throw r(n,"Unexpected API name.");var e=l[i];return!e||e()}export{m as isApiAvailable}; |
{ | ||
"name": "@liff/is-api-available", | ||
"version": "2.19.1", | ||
"version": "2.20.0", | ||
"description": "@liff/is-api-available", | ||
@@ -34,10 +34,10 @@ "license": "SEE LICENSE IN README.md", | ||
"dependencies": { | ||
"@liff/consts": "2.19.1", | ||
"@liff/get-line-version": "2.19.1", | ||
"@liff/is-in-client": "2.19.1", | ||
"@liff/is-logged-in": "2.19.1", | ||
"@liff/store": "2.19.1", | ||
"@liff/util": "2.19.1" | ||
"@liff/consts": "2.20.0", | ||
"@liff/get-line-version": "2.20.0", | ||
"@liff/is-in-client": "2.20.0", | ||
"@liff/is-logged-in": "2.20.0", | ||
"@liff/store": "2.20.0", | ||
"@liff/util": "2.20.0" | ||
}, | ||
"gitHead": "83f4036490a2007dd913cbbf20990251099a5153" | ||
"gitHead": "16e650543a0b2b995884e3271d63476d2e83e53e" | ||
} |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
5387
+ Added@liff/consts@2.20.0(transitive)
+ Added@liff/get-line-version@2.20.0(transitive)
+ Added@liff/is-in-client@2.20.0(transitive)
+ Added@liff/is-logged-in@2.20.0(transitive)
+ Added@liff/logger@2.20.0(transitive)
+ Added@liff/store@2.20.0(transitive)
+ Added@liff/types@2.20.0(transitive)
+ Added@liff/util@2.20.0(transitive)
- Removed@liff/consts@2.19.1(transitive)
- Removed@liff/get-line-version@2.19.1(transitive)
- Removed@liff/is-in-client@2.19.1(transitive)
- Removed@liff/is-logged-in@2.19.1(transitive)
- Removed@liff/logger@2.19.1(transitive)
- Removed@liff/store@2.19.1(transitive)
- Removed@liff/types@2.19.1(transitive)
- Removed@liff/util@2.19.1(transitive)
Updated@liff/consts@2.20.0
Updated@liff/is-in-client@2.20.0
Updated@liff/is-logged-in@2.20.0
Updated@liff/store@2.20.0
Updated@liff/util@2.20.0