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

@kamkam1_0/french-dates

Package Overview
Dependencies
Maintainers
1
Versions
15
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@kamkam1_0/french-dates - npm Package Compare versions

Comparing version 1.2.1 to 1.2.2

2

package.json
{
"name": "@kamkam1_0/french-dates",
"version": "1.2.1",
"version": "1.2.2",
"description": "",

@@ -5,0 +5,0 @@ "main": "./src/index.js",

@@ -11,3 +11,3 @@ const fetch = require("node-fetch")

*/
module.exports = async (zone) => {
module.exports = async (zone=null) => {
if (zone) {

@@ -29,12 +29,20 @@ zone = String(zone).toLocaleUpperCase()

let dataToHandle = data
.split('Voir la version texte')[2]
.split('<table class')[1]
.split('</table>')[0]
.split('<p>')
let rawDataToHandle = data
.split('div class="fr-my-6w fr-')[1]
.split('rowspan="1"')
let firstVersionDataToHandle = rawDataToHandle
.splice(rawDataToHandle.findIndex(rawText => rawText.includes('class="fr-sr-only')) + 1, rawDataToHandle.length -1)
let secondVersionDataToHandle = firstVersionDataToHandle
.splice(0, firstVersionDataToHandle.findIndex(rawText => rawText.includes('class="fr-sr-only')) +1)
let dataToHandle = secondVersionDataToHandle
.filter(rawData => rawData.includes('</p>'))
.map(rawData => {
return rawData.split('</p>')[0]
return rawData
.split('</p>')[0]
.split('<p>')[1]
})
let zones = dataToHandle

@@ -61,3 +69,3 @@ .slice(0, 4)

dataToHandleWithoutZones.forEach(rawData => {
if (yearsToAnalyse.find(yearToAnalyse => rawData.includes(yearToAnalyse))) {
if (yearsToAnalyse.find(year => rawData.includes(year))) {
let rightDate = rawData.split('<sup></sup>')

@@ -64,0 +72,0 @@ if (rightDate.length === 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