-
Notifications
You must be signed in to change notification settings - Fork 15
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
Showing
5 changed files
with
26 additions
and
3 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,5 @@ | ||
{ | ||
"eslint.enable": false, | ||
"jshint.enable": false, | ||
"tslint.enable": false | ||
} |
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
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 |
---|---|---|
@@ -1,33 +1,35 @@ | ||
const Aggregate = require('./src/Aggregate'); | ||
const All = require('./src/All'); | ||
const Concat = require('./src/Concat'); | ||
const Count = require('./src/Count'); | ||
const ElementAt = require('./src/ElementAt'); | ||
const First = require('./src/First'); | ||
const Last = require('./src/Last'); | ||
const Prepend = require('./src/Prepend'); | ||
const Reverse = require('./src/Reverse'); | ||
const Select = require('./src/Select'); | ||
const Sum = require('./src/Sum'); | ||
const TakeWhile = require('./src/TakeWhile'); | ||
const ToDictionary = require('./src/ToDictionary'); | ||
const Union = require('./src/Union'); | ||
const Where = require('./src/Where'); | ||
const Sum = require('./src/Sum'); | ||
|
||
const bindAll = function() { | ||
Array.prototype.Aggregate = Aggregate; | ||
Array.prototype.All = All; | ||
Array.prototype.Concat = Concat; | ||
Array.prototype.Count = Count; | ||
Array.prototype.ElementAt = ElementAt; | ||
Array.prototype.First = First; | ||
Array.prototype.Last = Last; | ||
Array.prototype.Prepend = Prepend; | ||
Array.prototype.Reverse = Reverse; | ||
Array.prototype.Select = Select; | ||
Array.prototype.Sum = Sum; | ||
Array.prototype.TakeWhile = TakeWhile; | ||
Array.prototype.ToDictionary = ToDictionary; | ||
Array.prototype.Union = Union; | ||
Array.prototype.Where = Where; | ||
Array.prototype.Sum = Sum; | ||
}; | ||
|
||
module.exports = bindAll; |
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,5 @@ | ||
function Count() { | ||
return this.length; | ||
} | ||
|
||
module.exports = Count; |
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,10 @@ | ||
const expect = require('chai').expect; | ||
require('..')(); | ||
|
||
describe('Array#prototype#Count', () => { | ||
const input = [1, 2, 3]; | ||
|
||
it('should return correct length', () => { | ||
expect(input.Count()).to.eql(input.length); | ||
}); | ||
}); |