Created
February 5, 2016 00:05
-
-
Save hash-bang/91218c9e554dd7a0577e to your computer and use it in GitHub Desktop.
Simple script to scan a directory recursively for potentially altered Lodash v4 functions
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Scans a project recursively for depreciated lodash functions | |
# | |
# Usage: lodash-depreciated [other grep options] | |
# | |
# Lodash changelog - https://github.com/lodash/lodash/wiki/Changelog#v400 | |
grep \ | |
--color=auto -r \ | |
--exclude-dir=node_modules --exclude-dir=bower_components --exclude-dir=.git --exclude-dir=build --exclude-dir=data \ | |
-P '(_|\s)\.(findWhere|first|indexBy|invoke|padLeft|padRight|pairs|pluck|rest|restParam|sortByAll|sortByOrder|support|trimLeft|trimRight|trunc|where)' \ | |
"$@" . |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment