Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
f894ffe
commit 095bf96
Showing
6 changed files
with
41 additions
and
0 deletions.
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
test: | ||
./node_modules/.bin/mocha --reporter list --compilers coffee:coffee-script *.coffee | ||
|
||
.PHONY: test |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
module.exports = Object::isEmpty = -> Object.keys(@).length is 0 |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
require 'should' | ||
|
||
require './emptyObject' | ||
|
||
describe 'emptyObject', -> | ||
it 'should return true when object is empty', -> | ||
{}.isEmpty().should.be.true |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
require('coffee-script'); | ||
module.exports = require('./emptyObject'); |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
require 'should' | ||
|
||
require './emptyObject' | ||
|
||
describe 'emptyObject', -> | ||
it 'should return false when object isnt empty', -> | ||
{foo:'bar'}.isEmpty().should.not.be.true |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
{ | ||
"name":"emptyObject", | ||
"description":"A simple micro lib to add an isEmpty method to the object prototype. _ too heavy weight? Wanna save yourself a coffeescript one-liner? Just use this!", | ||
"version":"1.0.0", | ||
"homepage":"http://github.com/leadVisionary/emptyObject", | ||
"repository":"git://github.com/leadVisionary/emptyObject.git", | ||
"author":"Nicholas Vaidyanathan <visionary.software.solutions@gmail.com> (http://www.visionarysoftwaresolutions.com/)", | ||
"main":"./empty.js", | ||
"dependencies":{ | ||
"coffee-script":"*" | ||
}, | ||
"devDependencies":{ | ||
"node-log":"*", | ||
"should":"*", | ||
"mocha":"*" | ||
}, | ||
"engines":{ | ||
"node":">= 0.6.0" | ||
} | ||
} |