dir-to-object
Advanced tools
Comparing version 1.0.0-beta.1 to 1.0.0
{ | ||
"name": "dir-to-object", | ||
"version": "1.0.0-beta.1", | ||
"version": "1.0.0", | ||
"description": "Builds an object from the files contained inside a directory.", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
const fs = require('fs'); | ||
const { join } = require('path'); | ||
const fields = ({ canAdd, dirPath }) => | ||
const dirToObject = ({ canAdd, dirPath }) => | ||
fs.readdirSync(dirPath).reduce((accumulator, fileName) => { | ||
@@ -18,2 +18,2 @@ const filePath = join(dirPath, fileName); | ||
module.exports = fields; | ||
module.exports = dirToObject; |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
0
5418