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

@liff/util

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/util - npm Package Compare versions

Comparing version 2.20.2 to 2.20.3

21

lib/base64url.d.ts

@@ -1,24 +0,3 @@

/**
* decode Base64URL
* @export
* @param {string} str - string
* @returns {string}
*/
declare function decode(str: string): string;
/**
* decode Base64 with Unicode included
*
* you can refer to encode implementation if you needed:
* https://developer.mozilla.org/ja/docs/Web/API/WindowBase64/Base64_encoding_and_decoding#Solution_4_%E2%80%93_escaping_the_string_before_encoding_it
* @export
* @param {string} str
* @returns {string}
*/
declare function decodeUnicode(str: string): string;
/**
* encode Base64URL
* @export
* @param {string} str - string
* @returns {string}
*/
declare function encode(str: string): string;

@@ -25,0 +4,0 @@ export declare const base64Url: {

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

/**
* compare two versions
* @export
* @param {string} version - string
* @param {string} comparedVersion - string
* @returns {-1|0|1} If version is higher, returns 1. same : 0, lower : -1.
*/
export declare function compareVersion(version: string, comparedVersion: string): number;

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

/**
* Convert ARGB Color Code to RGBA CSS String.
* @export
* @param {string} str
* @returns string
*/
export declare function convertArgbToRgba(argb: string): string;
export declare function convertHexToRgb(hexCode: string): string;

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

/**
* string to ArrayBuffer
* https://developers.google.com/web/updates/2012/06/How-to-convert-ArrayBuffer-to-and-from-String
* @export
* @param {string} str - string
* @returns {ArrayBuffer}
*/
export declare function convertArrayBuffer(str: string): ArrayBuffer;

@@ -1,20 +0,3 @@

/**
* https://developer.mozilla.org/en-US/docs/Web/API/Document/cookie
* get cookie value by key
* @param {string} key
* @return {string}
*/
declare function get(key: string): string;
/**
* https://developer.mozilla.org/en-US/docs/Web/API/Document/cookie
* @param {string} key
* @param {string | number} value
* @param {any} [options]
*/
declare function set(key: string, value: string | number, options?: Record<string, unknown>): void;
/**
* https://developer.mozilla.org/en-US/docs/Web/API/Document/cookie
* @param {string} key
* @param {any} [options]
*/
declare function remove(key: string, options?: Record<string, unknown>): void;

@@ -21,0 +4,0 @@ export declare const cookie: {

@@ -9,7 +9,2 @@ import { UNAUTHORIZED, INVALID_ARGUMENT, INIT_FAILED, FORBIDDEN, INVALID_CONFIG, INVALID_ID_TOKEN, CREATE_SUBWINDOW_FAILED, EXCEPTION_IN_SUBWINDOW } from '@liff/consts';

export declare type ErrorCode = PublicErrorCode | InternalErrorCode | UnpublishedErrorCode;
/**
* Custom Liff Error with code & message
* @param {string} code
* @param {string} message
*/
export declare class LiffError extends Error {

@@ -19,9 +14,3 @@ code: string | number;

}
/**
* create custom liff error
* @param {string} code [description]
* @param {string} message [description]
* @return {LiffError} [description]
*/
export declare function createLiffError(code: ErrorCode, message?: string): LiffError;
export {};

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

/**
* @export
* @param {string} liffId
* @returns {string|null} - Channel ID
*/
export declare function extractChannelIdFromLiffId(liffId: string): string | null;

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

/**
* Hex to Base64
* @param {string} str [hex]
* @return {string} [base64]
*/
export declare function hexToBase64(hex: string): string;
declare type Value = undefined | string;
export declare type Query = Record<string, Value | Value[]>;
/**
* Parse url query string to object
* @param {string} search - query string
* @returns {{}} - query object
*/
declare function parse(search: string): Query;

@@ -12,7 +7,2 @@ declare type CanBeEncoded = Parameters<typeof encodeURIComponent>[0] | undefined;

declare type ParsedUrlQuery = Record<string, StringifiableValue>;
/**
* Stringify object to url query string
* @param {{}} query - object
* @returns {string} - query string
*/
declare function stringify(query: ParsedUrlQuery): string;

@@ -19,0 +9,0 @@ export declare const qs: {

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

/**
* return more strict random value than Math.random()
* @returns 0 to less than 1 (inclusive of 0, but not 1)
*/
export declare function getRandomValue(): number;
/**
* return random alphanumeric string
* @param {number} length [length of sting]
* @return {string} [alphanumeric string]
*/
export declare function randomAlphaNumericString(length: number): string;

@@ -1,21 +0,4 @@

/**
* Remove credential tokens from given URL and return new URL
* @param url
*/
export declare function removeCredential(url: string): string;
/**
* Remove origin from given URL
* @param href
*/
export declare function removeOrigin(href: string): string;
/**
* Replace URL with the one whose credential tokens have been removed.
* @param url
*/
export declare const replaceUrlCredentialRemoved: (url: string) => void;
/**
* Add query parameter to received URL and returns it
* @param url
* @param params
*/
export declare function addParamsToUrl(url: string, params: {

@@ -22,0 +5,0 @@ [key: string]: string;

@@ -1,20 +0,5 @@

/**
* check if a user uses IE
*/
export declare function isIE(userAgent?: string): boolean;
export declare function isIpad(userAgent?: string): boolean;
/**
* return true when UA includes `Line/0.0.0`
* @param userAgent
*/
export declare function isLINEBrowser(userAgent?: string): boolean;
/**
* return true when UA includes `Line/0.0.0 LIFF`
* @param userAgent
*/
export declare function isLIFFBrowser(userAgent?: string): boolean;
/**
* return true when UA includes `LIFF/SubWindow`
* @param userAgent
*/
export declare function isSubWindow(userAgent?: string): boolean;

8

package.json
{
"name": "@liff/util",
"version": "2.20.2",
"version": "2.20.3",
"description": "@liff/util",

@@ -31,4 +31,4 @@ "license": "SEE LICENSE IN README.md",

"dependencies": {
"@liff/consts": "2.20.2",
"@liff/logger": "2.20.2"
"@liff/consts": "2.20.3",
"@liff/logger": "2.20.3"
},

@@ -41,3 +41,3 @@ "devDependencies": {

},
"gitHead": "7299a0642aafc87b46d0808da89840399148d436"
"gitHead": "7845e9a5c675d44b97a35c64dc5c200c4751ce2d"
}
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