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

@dofiltra/helpers

Package Overview
Dependencies
Maintainers
1
Versions
75
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@dofiltra/helpers - npm Package Compare versions

Comparing version 1.0.42 to 1.0.43

3

lib/index.d.ts

@@ -60,2 +60,5 @@ import type { TDodecoratorSettings, TResultError, TTrackMetadata } from '@dofiltra/types';

}): string[];
static findYoutubeVideoIds({ text }: {
text: string;
}): string[];
static createHtmlTag: ({ tagName, innerHTML, attrs }: {

@@ -62,0 +65,0 @@ tagName: string;

@@ -141,2 +141,14 @@ /* tslint:disable:max-classes-per-file */

}
static findYoutubeVideoIds({ text }) {
// Regular expression to match YouTube URLs and capture the video ID, including YouTube Shorts
const youtubeRegex = /(?:https?:\/\/)?(?:www\.)?(?:youtube\.com\/(?:[^\/\n\s]+\/\S+\/|(?:v|e(?:mbed)?|shorts)\/|\S*?[?&]v=)|youtu\.be\/)([a-zA-Z0-9_-]{11})/g;
// Array to store all the video IDs found
const videoIds = [];
let match;
// Loop through all matches and add the video IDs to the array
while ((match = youtubeRegex.exec(text)) !== null) {
videoIds.push(match[1]);
}
return [...new Set(videoIds)];
}
static createHtmlTag = ({ tagName, innerHTML, attrs }) => {

@@ -143,0 +155,0 @@ const attributes = Object.keys(attrs || {})

4

package.json
{
"name": "@dofiltra/helpers",
"version": "1.0.42",
"version": "1.0.43",
"license": "MIT",

@@ -29,3 +29,3 @@ "main": "./lib/index.js",

"devDependencies": {
"@dofiltra/types": "^1.0.183",
"@dofiltra/types": "^1.0.208",
"@types/node": "^20.8.0",

@@ -32,0 +32,0 @@ "prettier": "^3.0.3",

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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