New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More

hcode-core

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

hcode-core - npm Package Compare versions

Comparing version

to
0.1.459

import { EnumCouponDiscountType } from '../../enums';
export declare function renderValueByDiscountType(value: number, discountTypeId: EnumCouponDiscountType): string;
export declare function renderValueByDiscountType(value: number, discountTypeId: EnumCouponDiscountType): string | undefined;

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

export declare function isEmail(email: any): boolean;
export declare function isEmail(email: string): boolean;

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

export declare function pluralToSingular(input: any): any;
export declare function pluralToSingular(input: string): string;

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

export declare function queryStringTimestampToDate(value: string): Date;
export declare function queryStringTimestampToDate(value: string): Date | null;
{
"name": "hcode-core",
"version": "0.1.458",
"version": "0.1.459",
"description": "Hcode Core",

@@ -43,2 +43,3 @@ "main": "build/index.js",

"@rollup/plugin-node-resolve": "^13.0.4",
"@types/cookie": "^0.6.0",
"@types/node": "^15.6.1",

@@ -45,0 +46,0 @@ "axios": "^1.7.2",

@@ -16,3 +16,3 @@ import { sanitize } from '..';

const lesson = take.scene.SceneCourseContent[0].courseContent;
const lesson = (take.scene?.SceneCourseContent ?? [])[0].courseContent;

@@ -44,5 +44,5 @@ if (!lesson) {

const persons = take.TakePerson.map(tp => tp.personId).sort(
(a, b) => a - b,
);
const persons = (take.TakePerson ?? [])
.map(tp => tp.personId)
.sort((a, b) => a - b);

@@ -49,0 +49,0 @@ let personIndex = String(persons.findIndex(id => person.id === id) + 1);

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

export function isEmail(email) {
export function isEmail(email: string) {
const re =

@@ -3,0 +3,0 @@ /^(([^<>()[\]\\.,;:\s@"]+(\.[^<>()[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/;

@@ -6,3 +6,4 @@ import { FilenameVideoClass } from '../../interfaces/filenameVideoClass';

): FilenameVideoClass => {
basename = basename.split('/').pop();
const basenames = basename.split('/');
basename = basenames.length ? (String(basenames.pop()) as string) : '';
const splited = basename.split('_');

@@ -13,3 +14,4 @@

if (title.indexOf('.mp4') > -1) {
title = title.split('.').shift().trim();
const titles = title.split('.');
title = titles.length ? String(titles.shift()).trim() : '';
}

@@ -30,11 +32,15 @@

if (splited.length === 4) {
const part = splited[3].split('.').shift();
switch (splited[3].substring(0, 3)) {
case 'Cap':
case 'Mic':
const part = splited[3].split('.').shift();
parsed.type = part.substring(0, 3);
parsed.user = Number(part.substring(3, part.length));
if (part) {
parsed.type = part.substring(0, 3);
parsed.user = Number(part.substring(3, part.length));
}
break;
default:
parsed.type = splited[3].split('.').shift().trim();
if (part) {
parsed.type = part.trim();
}
}

@@ -41,0 +47,0 @@ }

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

export function pluralToSingular(input) {
export function pluralToSingular(input: string) {
if (input.endsWith('ss') || input.endsWith('status')) {

@@ -3,0 +3,0 @@ return input.charAt(0).toUpperCase() + input.slice(1);

@@ -7,3 +7,3 @@ import { AnyObject } from '../../interfaces/anyObject';

// Crie um objeto vazio para armazenar os valores da query
const queryParams = {};
const queryParams: any = {};

@@ -10,0 +10,0 @@ // Itere sobre todos os pares chave-valor e adicione-os ao objeto queryParams

@@ -26,3 +26,3 @@ export const getErrorMetadata = (error: any) => {

};
} catch (e) {
} catch (e: any) {
return {

@@ -29,0 +29,0 @@ errorMain: {

@@ -14,3 +14,9 @@ {

"esModuleInterop": true,
"experimentalDecorators": true
"experimentalDecorators": true,
"allowJs": true,
"noEmit": true,
"strict": true,
"skipLibCheck": true,
"resolveJsonModule": true
},

@@ -17,0 +23,0 @@ "include": ["src/**/*"],

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet