1.0.32 • Published 2 months ago

folquire v1.0.32

Weekly downloads
-
License
MIT
Repository
github
Last release
2 months ago

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 🖤

1.0.32

2 months ago

1.0.31

3 months ago

1.0.29

7 months ago

1.0.30

6 months ago

1.0.26

8 months ago

1.0.28

8 months ago

1.0.25

10 months ago

1.0.24

1 year ago

1.0.23

1 year ago

1.0.21

1 year ago

1.0.19

1 year ago

1.0.18

1 year ago

1.0.17

1 year ago

1.0.16

1 year ago

1.0.15

1 year ago

1.0.14

1 year ago

1.0.13

2 years ago

1.0.12

2 years ago

1.0.11

2 years ago

1.0.10

2 years ago

1.0.9

2 years ago

1.0.7

2 years ago

1.0.6

2 years ago

1.0.5

2 years ago

1.0.2

2 years ago

1.0.3

2 years ago

1.0.1

2 years ago

1.0.0

2 years ago

0.1.1

3 years ago

0.1.0

3 years ago

0.0.3

3 years ago

0.0.2

3 years ago

0.0.1

3 years ago