Linux vps-61133.fhnet.fr 4.9.0-19-amd64 #1 SMP Debian 4.9.320-2 (2022-06-30) x86_64
Apache/2.4.25 (Debian)
Server IP : 93.113.207.21 & Your IP : 216.73.216.119
Domains :
Cant Read [ /etc/named.conf ]
User : www-data
Terminal
Auto Root
Create File
Create Folder
Localroot Suggester
Backdoor Destroyer
Readme
/
var /
www /
html_old /
iNetty /
node_modules /
arity-n /
Delete
Unzip
Name
Size
Permission
Date
Action
.editorconfig
253
B
-rw-r--r--
2022-04-21 14:24
.jshintrc
601
B
-rw-r--r--
2022-04-21 14:24
.npmignore
97
B
-rw-r--r--
2022-04-21 14:24
.travis.yml
38
B
-rw-r--r--
2022-04-21 14:24
0.js
100
B
-rw-r--r--
2022-04-21 14:24
1.js
101
B
-rw-r--r--
2022-04-21 14:24
2.js
104
B
-rw-r--r--
2022-04-21 14:24
3.js
107
B
-rw-r--r--
2022-04-21 14:24
4.js
110
B
-rw-r--r--
2022-04-21 14:24
5.js
113
B
-rw-r--r--
2022-04-21 14:24
LICENSE
1.06
KB
-rw-r--r--
2022-04-21 14:24
N.js
243
B
-rw-r--r--
2022-04-21 14:24
README.md
603
B
-rw-r--r--
2022-04-21 14:24
package.json
698
B
-rw-r--r--
2022-04-21 14:24
test.js
2.32
KB
-rw-r--r--
2022-04-21 14:24
Save
Rename
var arity0 = require('./0'), arity1 = require('./1'), arity2 = require('./2'), arity3 = require('./3'), arity4 = require('./4'), arity5 = require('./5'), arityN = require('./N'), spy = require('sinon').spy(), expect = require('expect.js'); function createArray(l) { var arr = []; for (var i = 0; i < l; i++) { arr.push(i); } return arr; } function hasArity(wrapped, fn, l) { var arr = createArray(l); expect(wrapped).to.be.a('function'); expect(wrapped.length).to.be.eql(l); wrapped.call(null, arr); expect(fn.calledWith.call(fn, arr)).to.be.ok(); } describe('arity-function', () => { describe('#arity0', () => { it('should return a function with length 0', () => { var spy0 = arity0(spy); hasArity(spy0, spy, 0); }); }); describe('#arity1', () => { it('should return a function with length 1', () => { var spy1 = arity1(spy); hasArity(spy1, spy, 1); }); }); describe('#arity2', () => { it('should return a function with length 2', () => { var spy2 = arity2(spy); hasArity(spy2, spy, 2); }); }); describe('#arity3', () => { it('should return a function with length 3', () => { var spy3 = arity3(spy); hasArity(spy3, spy, 3); }); }); describe('#arity4', () => { it('should return a function with length 4', () => { var spy4 = arity4(spy); hasArity(spy4, spy, 4); }); }); describe('#arity5', () => { it('should return a function with length 5', () => { var spy5 = arity5(spy); hasArity(spy5, spy, 5); }); }); describe('#arityN', () => { it('should return a function with length N', () => { var spy0 = arityN(spy, 0); hasArity(spy0, spy, 0); var spy1 = arityN(spy, 1); hasArity(spy1, spy, 1); var spy2 = arityN(spy, 2); hasArity(spy2, spy, 2); var spy3 = arityN(spy, 3); hasArity(spy3, spy, 3); var spy4 = arityN(spy, 4); hasArity(spy4, spy, 4); var spy5 = arityN(spy, 5); hasArity(spy5, spy, 5); var spyX = arityN(spy, undefined); hasArity(spyX, spy, 0); spyX = arityN(spy, null); hasArity(spyX, spy, 0); var newFn = arityN(function(a,b,c,d,e,f,g,h,i,j,k){ return true; }, 9); expect(newFn.length).to.be.eql(11); expect(newFn()).to.be.eql(true); }); }); });