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

@nitunity/api-compiler

Package Overview
Dependencies
Maintainers
1
Versions
24
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@nitunity/api-compiler - npm Package Compare versions

Comparing version 0.0.4 to 0.0.5

34

modules/unlink/index.js
const fs = require('fs')
const path = require('path')
module.exports.destroy = () => {
module.exports.destroy = async (object) => {
await posts(object)
await categories(object)
await home(object)
}
let home = (object) => {
let home = fs.readdirSync(`${object.cache}/home`)
let html = home.filter((file) => {
return file.includes('.html')
})
html.map((file) => {
fs.unlinkSync(`${object.cache}/home/${file}`)
})
}
let posts = (object) => {
let posts = fs.readdirSync(`${object.cache}/posts`)
let html = posts.filter((file) => {
return file.includes('.html')
})
html.map((file) => {
fs.unlinkSync(`${object.cache}/posts/${file}`)
})
}
let categories = (object) => {
let categories = fs.readdirSync(`${object.cache}/categories`)
let html = categories.filter((file) => {
return file.includes('.html')
})
html.map((file) => {
fs.unlinkSync(`${object.cache}/categories/${file}`)
})
}

3

package.json
{
"name": "@nitunity/api-compiler",
"version": "0.0.4",
"version": "0.0.5",
"description": "This package is API for compiling HTML templates using Nunjucks template engine",

@@ -9,3 +9,2 @@ "main": "index.js",

"private": false,
"publishConfig": {},
"dependencies": {

@@ -12,0 +11,0 @@ "dotenv": "^8.1.0",

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