UNPKG

aerospike

Version:
13 lines (8 loc) 288 B
import fs from 'fs' const folder = './lib/binding' const count = fs.readdirSync(folder, { withFileTypes: true }) .filter(dirent => dirent.isDirectory()).length if (count !== 3) { throw new Error(`Expected 3 subfolders, found ${count}`) } console.log('Exactly 3 subfolders found')