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

@lite-v3/common-helpers

Package Overview
Dependencies
Maintainers
4
Versions
26
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@lite-v3/common-helpers - npm Package Compare versions

Comparing version 0.0.6 to 0.0.7

3

dist/array/chunk.js
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = void 0;

@@ -3,0 +6,0 @@ /**

"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = void 0;

@@ -3,0 +6,0 @@ /* eslint-disable @typescript-eslint/no-inferrable-types */ /**

"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = void 0;

@@ -3,0 +6,0 @@ var _default = function(start, stop, step) {

"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = dedupe;
var swcHelpers = require("@swc/helpers");
function dedupe(theArray) {
return [].concat(new Set(theArray));
return swcHelpers.toConsumableArray(new Set(theArray));
}

8

dist/currency/index.js
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
Object.defineProperty(exports, "toNumber", {

@@ -15,4 +18,5 @@ enumerable: true,

exports.default = void 0;
var _toNumber = require("./toNumber");
var _toIDR = require("./toIDR");
var swcHelpers = require("@swc/helpers");
var _toNumber = swcHelpers.interopRequireDefault(require("./toNumber"));
var _toIDR = swcHelpers.interopRequireDefault(require("./toIDR"));
var _default = {

@@ -19,0 +23,0 @@ toNumber: _toNumber.default,

"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = _callee;

@@ -3,0 +6,0 @@ function _callee(str) {

"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = _callee;

@@ -3,0 +6,0 @@ function _callee(str) {

"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = toIDR;

@@ -3,0 +6,0 @@ function toIDR(idr, param) {

"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = toNumber;

@@ -3,0 +6,0 @@ function toNumber(price, param) {

"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.FIRST_DAY = exports.MONTHS = exports.WEEKDAYS_SHORT = exports.WEEKDAYS_LONG = void 0;

@@ -3,0 +6,0 @@ var WEEKDAYS_LONG = {

"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = formatDay;

@@ -3,0 +6,0 @@ var _constant = require("./constant");

"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = formatMonthTitle;

@@ -3,0 +6,0 @@ var _constant = require("./constant");

"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = formatWeekdayLong;

@@ -3,0 +6,0 @@ var _constant = require("./constant");

"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = formatWeekdayShort;

@@ -3,0 +6,0 @@ var _constant = require("./constant");

"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = getFirstDayOfWeek;

@@ -3,0 +6,0 @@ var _constant = require("./constant");

"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = void 0;

@@ -3,0 +6,0 @@ /**

"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = void 0;
var _formatDay = require("./formatDay");
var _formatMonthTitle = require("./formatMonthTitle");
var _formatWeekdayLong = require("./formatWeekdayLong");
var _formatWeekdayShort = require("./formatWeekdayShort");
var _getFirstDayOfWeek = require("./getFirstDayOfWeek");
var _isValidDate = require("./isValidDate");
var swcHelpers = require("@swc/helpers");
var _formatDay = swcHelpers.interopRequireDefault(require("./formatDay"));
var _formatMonthTitle = swcHelpers.interopRequireDefault(require("./formatMonthTitle"));
var _formatWeekdayLong = swcHelpers.interopRequireDefault(require("./formatWeekdayLong"));
var _formatWeekdayShort = swcHelpers.interopRequireDefault(require("./formatWeekdayShort"));
var _getFirstDayOfWeek = swcHelpers.interopRequireDefault(require("./getFirstDayOfWeek"));
var _isValidDate = swcHelpers.interopRequireDefault(require("./isValidDate"));
var _default = {

@@ -10,0 +14,0 @@ formatDay: _formatDay.default,

"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = isValidDate;

@@ -3,0 +6,0 @@ function isValidDate(s) {

"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = timestampFromNow;

@@ -3,0 +6,0 @@ var swcHelpers = require("@swc/helpers");

"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = void 0;

@@ -3,0 +6,0 @@ var canUseDOM = Boolean(typeof window !== 'undefined' && window.document && window.document.createElement);

"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
Object.defineProperty(exports, "canUseDOM", {

@@ -15,4 +18,5 @@ enumerable: true,

exports.default = void 0;
var _canUseDOM = require("./canUseDOM");
var _isSafari = require("./isSafari");
var swcHelpers = require("@swc/helpers");
var _canUseDOM = swcHelpers.interopRequireDefault(require("./canUseDOM"));
var _isSafari = swcHelpers.interopRequireDefault(require("./isSafari"));
var _default = {

@@ -19,0 +23,0 @@ canUseDOM: _canUseDOM.default,

"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = void 0;
var _canUseDOM = require("./canUseDOM");
var swcHelpers = require("@swc/helpers");
var _canUseDOM = swcHelpers.interopRequireDefault(require("./canUseDOM"));
var isSafari = _canUseDOM.default ? Boolean(typeof window.safari === 'object' && window.safari.pushNotification) : false;
var _default = isSafari;
exports.default = _default;
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = void 0;
var _flowRight = require("./flowRight");
var swcHelpers = require("@swc/helpers");
var _flowRight = swcHelpers.interopRequireDefault(require("./flowRight"));
function compose() {

@@ -5,0 +9,0 @@ for(var _len = arguments.length, funcs = new Array(_len), _key = 0; _key < _len; _key++){

"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.debounce = debounce;
var swcHelpers = require("@swc/helpers");
function debounce(fn, wait) {

@@ -11,5 +15,5 @@ var timeout;

timeout = setTimeout(function() {
fn.apply(void 0, arg);
fn.apply(void 0, swcHelpers.toConsumableArray(arg));
}, wait);
};
}
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = void 0;
var swcHelpers = require("@swc/helpers");
/**

@@ -9,11 +13,11 @@ * Pushes a function call onto a list. The list of saved calls is executed after the surrounding function returns.

*/ function defer(fn) {
var isFunction = function isFunction(value) {
return typeof value === 'function';
};
var isPromise = function isPromise(obj) {
return obj && obj.then && isFunction(obj.then);
};
var resolve = Promise.resolve.bind(Promise);
var reject = Promise.reject.bind(Promise);
var tasks = new Array(0);
function isFunction(value) {
return typeof value === 'function';
}
function isPromise(obj) {
return obj && obj.then && isFunction(obj.then);
}
function runDefer(result, mainError) {

@@ -47,3 +51,3 @@ if (!tasks.length) {

]);
result = fn.apply(void 0, args);
result = fn.apply(void 0, swcHelpers.toConsumableArray(args));
if (!isPromise(result)) {

@@ -50,0 +54,0 @@ result = resolve(result);

"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = void 0;

@@ -3,0 +6,0 @@ /* eslint-disable */ // Taken from lodash (https://github.com/lodash/lodash/blob/master/flow.js)

"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = void 0;
var _flow = require("./flow");
var swcHelpers = require("@swc/helpers");
var _flow = swcHelpers.interopRequireDefault(require("./flow"));
/**

@@ -5,0 +9,0 @@ * This method is like `flow` except that it composes a function that

"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = void 0;

@@ -3,0 +6,0 @@ var _default = function() {

"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = void 0;

@@ -3,0 +6,0 @@ var swcHelpers = require("@swc/helpers");

"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
Object.defineProperty(exports, "safeParse", {

@@ -9,3 +12,4 @@ enumerable: true,

exports.default = void 0;
var _safeParse = require("./safeParse");
var swcHelpers = require("@swc/helpers");
var _safeParse = swcHelpers.interopRequireDefault(require("./safeParse"));
var _default = {

@@ -12,0 +16,0 @@ safeParse: _safeParse.default

"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = safeParse;

@@ -3,0 +6,0 @@ function safeParse(str) {

"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = void 0;

@@ -3,0 +6,0 @@ var execIfFunc = function(x) {

"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = void 0;
var _execIfFunc = require("./execIfFunc");
var swcHelpers = require("@swc/helpers");
var _execIfFunc = swcHelpers.interopRequireDefault(require("./execIfFunc"));
/**

@@ -5,0 +9,0 @@ * This is a higher order function that accepts a boolean condition and will

"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
Object.defineProperty(exports, "ifElse", {

@@ -15,4 +18,5 @@ enumerable: true,

exports.default = void 0;
var _ifElse = require("./ifElse");
var _shallowEqual = require("./shallowEqual");
var swcHelpers = require("@swc/helpers");
var _ifElse = swcHelpers.interopRequireDefault(require("./ifElse"));
var _shallowEqual = swcHelpers.interopRequireDefault(require("./shallowEqual"));
var _default = {

@@ -19,0 +23,0 @@ ifElse: _ifElse.default,

"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = shallowEqual;

@@ -3,0 +6,0 @@ function shallowEqual(arg1, arg2) {

"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = void 0;

@@ -3,0 +6,0 @@ /**

"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = _callee;

@@ -3,0 +6,0 @@ function _callee(email) {

"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = _callee;

@@ -3,0 +6,0 @@ function _callee(inputValue, seperator, pos) {

"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = void 0;

@@ -3,0 +6,0 @@ /**

"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = void 0;

@@ -3,0 +6,0 @@ var fileSizeFormat = function(fileSizeInBytes) {

"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = _callee;

@@ -3,0 +6,0 @@ function _callee(number) {

"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = _callee;

@@ -3,0 +6,0 @@ function _callee(weight) {

"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = _callee;

@@ -3,0 +6,0 @@ function _callee(min, max) {

"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = humanizeReviewCount;

@@ -3,0 +6,0 @@ function getNumber(number) {

"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
Object.defineProperty(exports, "humanizeReviewCount", {

@@ -27,7 +30,8 @@ enumerable: true,

exports.default = void 0;
var _humanizeReviewCount = require("./humanizeReviewCount");
var _thousandSeparator = require("./thousandSeparator");
var _counterFormat = require("./counterFormat");
var _fileSizeFormat = require("./fileSizeFormat");
var _removeNonNumber = require("./removeNonNumber");
var swcHelpers = require("@swc/helpers");
var _humanizeReviewCount = swcHelpers.interopRequireDefault(require("./humanizeReviewCount"));
var _thousandSeparator = swcHelpers.interopRequireDefault(require("./thousandSeparator"));
var _counterFormat = swcHelpers.interopRequireDefault(require("./counterFormat"));
var _fileSizeFormat = swcHelpers.interopRequireDefault(require("./fileSizeFormat"));
var _removeNonNumber = swcHelpers.interopRequireDefault(require("./removeNonNumber"));
var _default = {

@@ -34,0 +38,0 @@ humanizeReviewCount: _humanizeReviewCount.default,

"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = _callee;

@@ -3,0 +6,0 @@ function _callee(value) {

"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = void 0;

@@ -3,0 +6,0 @@ /**

"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = thousandSeparator;

@@ -3,0 +6,0 @@ function thousandSeparator(numb, param) {

"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = void 0;

@@ -3,0 +6,0 @@ var escapeRegExp = function(str) {

"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
Object.defineProperty(exports, "titleCase", {

@@ -8,2 +11,3 @@ enumerable: true,

});
var _titleCase = require("./titleCase");
var swcHelpers = require("@swc/helpers");
var _titleCase = swcHelpers.interopRequireDefault(require("./titleCase"));
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = randomString;

@@ -3,0 +6,0 @@ function randomString(length) {

"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = void 0;

@@ -3,0 +6,0 @@ /**

"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = _callee;

@@ -3,0 +6,0 @@ function _callee(str) {

"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = sanitizeLang;

@@ -3,0 +6,0 @@ function sanitizeLang(lang) {

"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = _callee;

@@ -3,0 +6,0 @@ function _callee(text) {

"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = void 0;

@@ -3,0 +6,0 @@ /**

"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = void 0;

@@ -3,0 +6,0 @@ var _default = function(text, param) {

"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = void 0;
var swcHelpers = require("@swc/helpers");
/**

@@ -13,3 +17,3 @@ * Convert hex to rgba

// eslint-disable-next-line prefer-const
var ref = findColor.exec(hex) || [], prefix = ref[1], hexColor = ref[2], r = ref[3], g = ref[4], b = ref[5], postfix = ref[6];
var ref = swcHelpers.slicedToArray(findColor.exec(hex) || [], 7), prefix = ref[1], hexColor = ref[2], r = ref[3], g = ref[4], b = ref[5], postfix = ref[6];
var isShortHand = (hexColor === null || hexColor === void 0 ? void 0 : hexColor.length) === 4;

@@ -16,0 +20,0 @@ if (isShortHand) {

"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = void 0;

@@ -3,0 +6,0 @@ /**

{
"name": "@lite-v3/common-helpers",
"version": "0.0.6",
"version": "0.0.7",
"description": "Public common helpers for Tokopedia Web",

@@ -23,2 +23,5 @@ "repository": {

},
"dependencies": {
"@swc/helpers": "^0.2.10"
},
"devDependencies": {

@@ -25,0 +28,0 @@ "@types/node": "^16.11.1"

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