Skip to content

Instantly share code, notes, and snippets.

@360disrupt
360disrupt / nodejs-folder-structure-to-json.coffee
Created March 22, 2018 10:27
Creates a Json of a Folder Structure
#async version of: http://researchhubs.com/post/computing/javascript/convert-directory-structure--to-json-with-node-js.html
inspect = require('util').inspect
chalk = require('chalk')
debug = require('debug')('helper:folderStructure')
fs = require('fs')
path = require('path')
async = require('async')
@360disrupt
360disrupt / order-by-empty-last.filter.coffee
Created October 18, 2017 12:41
OrderBy Filter Which Orders Empty Props Last
angular.module 'tsd.orderByEmptyLast', []
.filter 'orderByEmptyLast', ($filter) ->
return (list, predicate, reverse)->
orderedList = $filter('orderBy')(list, if reverse then ['!' + predicate, '-' + predicate] else ['!' + predicate, predicate] )
return orderedList
### Keybase proof
I hereby claim:
* I am 360disrupt on github.
* I am 360disrupt (https://keybase.io/360disrupt) on keybase.
* I have a public key whose fingerprint is 5939 FC4A DDCD 2CCB D2A7 727F E821 9FCA 623C D6EA
To claim this, I am signing this object: