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

folquire

Package Overview
Dependencies
Maintainers
0
Versions
36
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

folquire

Requires all the modules from a folder

  • 2.0.6
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
11
increased by450%
Maintainers
0
Weekly downloads
 
Created
Source

Folquire banner

Folquire

Requires all the modules from a folder

Getting started

To install run this command:

$ npm install folquire

Let's see an example. Suppose we have the following folder structure:

+-- math
|  +-- add.js
|  +-- subtract.js
|  +-- multiply.js
|  +-- divide.js
+-- index.js

index.js

'use strict'

const { join } = require('path')
const folquire = require('folquire')

const math = folquire(join(__dirname, 'math'))

math.add(1, 2)      // 2
math.subtract(8, 4) // 4
math.multiply(6, 7) // 42
math.divide(20, 10) // 2

Async folquire

index.js

'use strict'

const { join } = require('path')
const folquire = require('folquire')

folquire(join(__dirname, 'math'))
  .then(math => {
    math.add(1, 2)      // 2
    math.subtract(8, 4) // 4
    math.multiply(6, 7) // 42
    math.divide(20, 10) // 2
  })

Ignore modules

'use strict'

const { join } = require('path')
const folquire = require('folquire')

const modules = folquire(join(__dirname, 'math'), {
  ignore: ['add.js']
})

Black Tech by Gabriel Rufino 🖤

FAQs

Package last updated on 29 Oct 2024

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

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