-
Notifications
You must be signed in to change notification settings - Fork 445
Removes Underscore dependency #100
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
@@ -39,24 +39,12 @@ function buildUrl_(url, params) { | |||
function validate_(params) { | |||
Object.keys(params).forEach(function(name) { | |||
var value = params[name]; | |||
if (isEmpty_(value)) { | |||
if (!value) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not functionally equivalent to isEmpty_(), but I don't think any of my validations rely on detecting empty arrays or objects.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good point.
Thanks for the PR! Service.gs still uses _.extend() in a number of places however, and you'll need to find a replacement for that. |
PTAL.
npm run test
> mocha
Service
#getToken()
✓ should load from the in-memory store
✓ should load from the cache and set the in-memory store
✓ should load from the properties and set the cache and in-memory store
#saveToken_()
✓ should save the token to the properties, cache, and in-memory store
#reset()
✓ should delete the token from properties, cache, and in-memory store
Utilities
#extend_()
✓ should extend (left) an object
✓ should extend (right) an object
✓ should extend (merge) an object
8 passing (10ms) |
Looks great, thanks Grant! |
Goal:
[email protected]
library from scm.This PR:
_
withgulpfile
/package.json
references_
isEmpty_
Feel free to comment or modify.