Add 'dots/' from commit '357b97a7692c8d5ec9666d8d7d7c98d81cb51cf0'
git-subtree-dir: dots git-subtree-mainline:2ad98cde17git-subtree-split:357b97a769
This commit is contained in:
7
dots/.bin/count-json-objects.js
Executable file
7
dots/.bin/count-json-objects.js
Executable file
@@ -0,0 +1,7 @@
|
||||
#!/usr/bin/env node
|
||||
|
||||
const fs = require('fs')
|
||||
|
||||
const objLength = obj => Object.keys(obj).length
|
||||
|
||||
fs.readFile(process.argv[2], (err, data) => (err ? console.error(err) : console.log(objLength(JSON.parse(data)))))
|
||||
Reference in New Issue
Block a user