Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/jaforbes/yang
Categorise your file system! (yay!)
https://github.com/jaforbes/yang
Last synced: about 1 month ago
JSON representation
Categorise your file system! (yay!)
- Host: GitHub
- URL: https://github.com/jaforbes/yang
- Owner: JAForbes
- Created: 2014-12-18T00:45:34.000Z (almost 10 years ago)
- Default Branch: master
- Last Pushed: 2014-12-18T01:25:35.000Z (almost 10 years ago)
- Last Synced: 2024-04-16T09:06:37.838Z (7 months ago)
- Language: JavaScript
- Size: 355 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: readme.md
Awesome Lists containing this project
README
Yang
====`npm install JAForbes/yang`
Usage:
```javascript
var yang = require('yang')yang({
patterns: {
'png|jpeg|jpg': 'Pictures',
'txt|pdf|doc|docx': 'Documents'
},
sortPath: process.env.HOMEPATH+'/desktop'
})
.then(function(categorised){
console.log(categorised)
})```
Which will ouput...
```javascript
{ Pictures:
[ 'BznRVAYCQAAP6QV.png',
'download (1).png',
'download (2).png',
'download (3).png',
'download (4).png',
'download.png',
'BznRVAYCQAAP6QV.png-large',
'unnamed (1).jpg',
'unnamed (2).jpg',
'unnamed (3).jpg',
'unnamed.jpg' ],
Documents: [ 'example.doc', 'js-in-ten-minutes.pdf' ] }```