repo
stringlengths
5
106
file_url
stringlengths
78
301
file_path
stringlengths
4
211
content
stringlengths
0
32.8k
language
stringclasses
1 value
license
stringclasses
7 values
commit_sha
stringlengths
40
40
retrieved_at
stringdate
2026-01-04 14:56:49
2026-01-05 02:23:25
truncated
bool
2 classes
koajs/koa
https://github.com/koajs/koa/blob/fecd464ae7be82bd71b275c1faa746dd1c45ef5b/__tests__/response/body.test.js
__tests__/response/body.test.js
'use strict' const { describe, it } = require('node:test') const response = require('../../test-helpers/context').response const CustomStream = require('../../test-helpers/stream') const assert = require('node:assert/strict') const fs = require('fs') const Stream = require('stream') describe('res.body=', () => { de...
javascript
MIT
fecd464ae7be82bd71b275c1faa746dd1c45ef5b
2026-01-04T15:00:14.872427Z
false
koajs/koa
https://github.com/koajs/koa/blob/fecd464ae7be82bd71b275c1faa746dd1c45ef5b/__tests__/response/headers.test.js
__tests__/response/headers.test.js
'use strict' const { describe, it } = require('node:test') const assert = require('node:assert/strict') const response = require('../../test-helpers/context').response describe('res.header', () => { it('should return the response header object', () => { const res = response() res.set('X-Foo', 'bar') ass...
javascript
MIT
fecd464ae7be82bd71b275c1faa746dd1c45ef5b
2026-01-04T15:00:14.872427Z
false
koajs/koa
https://github.com/koajs/koa/blob/fecd464ae7be82bd71b275c1faa746dd1c45ef5b/__tests__/response/redirect.test.js
__tests__/response/redirect.test.js
'use strict' const { describe, it } = require('node:test') const assert = require('node:assert/strict') const request = require('supertest') const context = require('../../test-helpers/context') const Koa = require('../..') describe('ctx.redirect(url)', () => { it('should redirect to the given url', () => { con...
javascript
MIT
fecd464ae7be82bd71b275c1faa746dd1c45ef5b
2026-01-04T15:00:14.872427Z
false
koajs/koa
https://github.com/koajs/koa/blob/fecd464ae7be82bd71b275c1faa746dd1c45ef5b/__tests__/response/remove.test.js
__tests__/response/remove.test.js
'use strict' const { describe, it } = require('node:test') const assert = require('node:assert/strict') const context = require('../../test-helpers/context') describe('ctx.remove(name)', () => { it('should remove a field', () => { const ctx = context() ctx.set('x-foo', 'bar') ctx.remove('x-foo') ass...
javascript
MIT
fecd464ae7be82bd71b275c1faa746dd1c45ef5b
2026-01-04T15:00:14.872427Z
false
koajs/koa
https://github.com/koajs/koa/blob/fecd464ae7be82bd71b275c1faa746dd1c45ef5b/__tests__/response/get.test.js
__tests__/response/get.test.js
'use strict' const { describe, it } = require('node:test') const assert = require('node:assert/strict') const context = require('../../test-helpers/context') describe('ctx.get(name)', () => { it('should get a field value, case insensitive', () => { const ctx = context() ctx.set('X-Foo', 'bar') assert.st...
javascript
MIT
fecd464ae7be82bd71b275c1faa746dd1c45ef5b
2026-01-04T15:00:14.872427Z
false
koajs/koa
https://github.com/koajs/koa/blob/fecd464ae7be82bd71b275c1faa746dd1c45ef5b/__tests__/response/message.test.js
__tests__/response/message.test.js
'use strict' const { describe, it } = require('node:test') const assert = require('node:assert/strict') const response = require('../../test-helpers/context').response describe('res.message', () => { it('should return the response status message', () => { const res = response() res.status = 200 assert.s...
javascript
MIT
fecd464ae7be82bd71b275c1faa746dd1c45ef5b
2026-01-04T15:00:14.872427Z
false
koajs/koa
https://github.com/koajs/koa/blob/fecd464ae7be82bd71b275c1faa746dd1c45ef5b/__tests__/response/attachment.test.js
__tests__/response/attachment.test.js
'use strict' const { describe, it } = require('node:test') const assert = require('node:assert/strict') const context = require('../../test-helpers/context') const request = require('supertest') const Koa = require('../..') describe('ctx.attachment([filename])', () => { describe('security: prevent Content-Type over...
javascript
MIT
fecd464ae7be82bd71b275c1faa746dd1c45ef5b
2026-01-04T15:00:14.872427Z
false
koajs/koa
https://github.com/koajs/koa/blob/fecd464ae7be82bd71b275c1faa746dd1c45ef5b/__tests__/response/header.test.js
__tests__/response/header.test.js
'use strict' const { describe, it } = require('node:test') const assert = require('node:assert/strict') const request = require('supertest') const response = require('../../test-helpers/context').response const Koa = require('../..') describe('res.header', () => { it('should return the response header object', () =...
javascript
MIT
fecd464ae7be82bd71b275c1faa746dd1c45ef5b
2026-01-04T15:00:14.872427Z
false
koajs/koa
https://github.com/koajs/koa/blob/fecd464ae7be82bd71b275c1faa746dd1c45ef5b/__tests__/response/writable.test.js
__tests__/response/writable.test.js
'use strict' const { describe, it } = require('node:test') const assert = require('node:assert/strict') const Koa = require('../../') const net = require('net') const { once } = require('events') describe('res.writable', () => { describe('when continuous requests in one persistent connection', () => { it('shoul...
javascript
MIT
fecd464ae7be82bd71b275c1faa746dd1c45ef5b
2026-01-04T15:00:14.872427Z
false
koajs/koa
https://github.com/koajs/koa/blob/fecd464ae7be82bd71b275c1faa746dd1c45ef5b/__tests__/response/back.test.js
__tests__/response/back.test.js
'use strict' const { describe, it } = require('node:test') const assert = require('node:assert/strict') const context = require('../../test-helpers/context') describe('ctx.back([alt])', () => { it('should redirect to Referrer', () => { const ctx = context({ url: '/', headers: { host: 'example.com' } }) ctx....
javascript
MIT
fecd464ae7be82bd71b275c1faa746dd1c45ef5b
2026-01-04T15:00:14.872427Z
false
koajs/koa
https://github.com/koajs/koa/blob/fecd464ae7be82bd71b275c1faa746dd1c45ef5b/__tests__/response/length.test.js
__tests__/response/length.test.js
'use strict' const { describe, it } = require('node:test') const response = require('../../test-helpers/context').response const assert = require('node:assert/strict') const fs = require('fs') describe('res.length', () => { describe('when Content-Length is defined', () => { it('should return a number', () => { ...
javascript
MIT
fecd464ae7be82bd71b275c1faa746dd1c45ef5b
2026-01-04T15:00:14.872427Z
false
koajs/koa
https://github.com/koajs/koa/blob/fecd464ae7be82bd71b275c1faa746dd1c45ef5b/__tests__/response/inspect.test.js
__tests__/response/inspect.test.js
'use strict' const { describe, it } = require('node:test') const response = require('../../test-helpers/context').response const assert = require('node:assert/strict') const util = require('util') describe('res.inspect()', () => { describe('with no response.res present', () => { it('should return null', () => {...
javascript
MIT
fecd464ae7be82bd71b275c1faa746dd1c45ef5b
2026-01-04T15:00:14.872427Z
false
koajs/koa
https://github.com/koajs/koa/blob/fecd464ae7be82bd71b275c1faa746dd1c45ef5b/__tests__/response/is.test.js
__tests__/response/is.test.js
'use strict' const { describe, it } = require('node:test') const context = require('../../test-helpers/context') const assert = require('node:assert/strict') describe('response.is(type)', () => { it('should ignore params', () => { const res = context().response res.type = 'text/html; charset=utf-8' ass...
javascript
MIT
fecd464ae7be82bd71b275c1faa746dd1c45ef5b
2026-01-04T15:00:14.872427Z
false
koajs/koa
https://github.com/koajs/koa/blob/fecd464ae7be82bd71b275c1faa746dd1c45ef5b/__tests__/response/status.test.js
__tests__/response/status.test.js
'use strict' const { describe, it, beforeEach } = require('node:test') const response = require('../../test-helpers/context').response const request = require('supertest') const statuses = require('statuses') const assert = require('node:assert/strict') const Koa = require('../..') describe('res.status=', () => { d...
javascript
MIT
fecd464ae7be82bd71b275c1faa746dd1c45ef5b
2026-01-04T15:00:14.872427Z
false
koajs/koa
https://github.com/koajs/koa/blob/fecd464ae7be82bd71b275c1faa746dd1c45ef5b/__tests__/response/type.test.js
__tests__/response/type.test.js
'use strict' const { describe, it } = require('node:test') const context = require('../../test-helpers/context') const assert = require('node:assert/strict') describe('ctx.type=', () => { describe('with a mime', () => { it('should set the Content-Type', () => { const ctx = context() ctx.type = 'text...
javascript
MIT
fecd464ae7be82bd71b275c1faa746dd1c45ef5b
2026-01-04T15:00:14.872427Z
false
koajs/koa
https://github.com/koajs/koa/blob/fecd464ae7be82bd71b275c1faa746dd1c45ef5b/__tests__/response/etag.test.js
__tests__/response/etag.test.js
'use strict' const { describe, it } = require('node:test') const assert = require('node:assert/strict') const response = require('../../test-helpers/context').response describe('res.etag=', () => { it('should not modify an etag with quotes', () => { const res = response() res.etag = '"asdf"' assert.stri...
javascript
MIT
fecd464ae7be82bd71b275c1faa746dd1c45ef5b
2026-01-04T15:00:14.872427Z
false
koajs/koa
https://github.com/koajs/koa/blob/fecd464ae7be82bd71b275c1faa746dd1c45ef5b/__tests__/response/socket.test.js
__tests__/response/socket.test.js
'use strict' const { describe, it } = require('node:test') const assert = require('node:assert/strict') const response = require('../../test-helpers/context').response const Stream = require('stream') describe('res.socket', () => { it('should return the request socket object', () => { const res = response() ...
javascript
MIT
fecd464ae7be82bd71b275c1faa746dd1c45ef5b
2026-01-04T15:00:14.872427Z
false
koajs/koa
https://github.com/koajs/koa/blob/fecd464ae7be82bd71b275c1faa746dd1c45ef5b/__tests__/response/append.test.js
__tests__/response/append.test.js
'use strict' const { describe, it } = require('node:test') const assert = require('node:assert/strict') const context = require('../../test-helpers/context') describe('ctx.append(name, val)', () => { it('should append multiple headers', () => { const ctx = context() ctx.append('x-foo', 'bar1') ctx.appen...
javascript
MIT
fecd464ae7be82bd71b275c1faa746dd1c45ef5b
2026-01-04T15:00:14.872427Z
false
koajs/koa
https://github.com/koajs/koa/blob/fecd464ae7be82bd71b275c1faa746dd1c45ef5b/__tests__/response/set.test.js
__tests__/response/set.test.js
'use strict' const { describe, it } = require('node:test') const assert = require('node:assert/strict') const context = require('../../test-helpers/context') describe('ctx.set(name, val)', () => { it('should set a field value', () => { const ctx = context() ctx.set('x-foo', 'bar') assert.strictEqual(ctx...
javascript
MIT
fecd464ae7be82bd71b275c1faa746dd1c45ef5b
2026-01-04T15:00:14.872427Z
false
koajs/koa
https://github.com/koajs/koa/blob/fecd464ae7be82bd71b275c1faa746dd1c45ef5b/__tests__/response/has.test.js
__tests__/response/has.test.js
'use strict' const { describe, it } = require('node:test') const assert = require('node:assert/strict') const context = require('../../test-helpers/context') describe('ctx.response.has(name)', () => { it('should check a field value, case insensitive way', () => { const ctx = context() ctx.set('X-Foo', '') ...
javascript
MIT
fecd464ae7be82bd71b275c1faa746dd1c45ef5b
2026-01-04T15:00:14.872427Z
false
koajs/koa
https://github.com/koajs/koa/blob/fecd464ae7be82bd71b275c1faa746dd1c45ef5b/__tests__/request/origin.test.js
__tests__/request/origin.test.js
'use strict' const { describe, it } = require('node:test') const assert = require('node:assert/strict') const Stream = require('stream') const context = require('../../test-helpers/context') describe('ctx.origin', () => { it('should return the origin of url', () => { const socket = new Stream.Duplex() const...
javascript
MIT
fecd464ae7be82bd71b275c1faa746dd1c45ef5b
2026-01-04T15:00:14.872427Z
false
koajs/koa
https://github.com/koajs/koa/blob/fecd464ae7be82bd71b275c1faa746dd1c45ef5b/__tests__/request/querystring.test.js
__tests__/request/querystring.test.js
'use strict' const { describe, it } = require('node:test') const assert = require('node:assert/strict') const context = require('../../test-helpers/context') const parseurl = require('parseurl') describe('ctx.querystring', () => { it('should return the querystring', () => { const ctx = context({ url: '/store/sh...
javascript
MIT
fecd464ae7be82bd71b275c1faa746dd1c45ef5b
2026-01-04T15:00:14.872427Z
false
koajs/koa
https://github.com/koajs/koa/blob/fecd464ae7be82bd71b275c1faa746dd1c45ef5b/__tests__/request/whatwg-url.test.js
__tests__/request/whatwg-url.test.js
'use strict' const { describe, it } = require('node:test') const request = require('../../test-helpers/context').request const assert = require('node:assert/strict') describe('req.URL', () => { it('should not throw when host is void', () => { // Accessing the URL should not throw. request().URL // eslint-di...
javascript
MIT
fecd464ae7be82bd71b275c1faa746dd1c45ef5b
2026-01-04T15:00:14.872427Z
false
koajs/koa
https://github.com/koajs/koa/blob/fecd464ae7be82bd71b275c1faa746dd1c45ef5b/__tests__/request/acceptsEncodings.test.js
__tests__/request/acceptsEncodings.test.js
'use strict' const { describe, it } = require('node:test') const assert = require('node:assert/strict') const context = require('../../test-helpers/context') describe('ctx.acceptsEncodings()', () => { describe('with no arguments', () => { describe('when Accept-Encoding is populated', () => { it('should re...
javascript
MIT
fecd464ae7be82bd71b275c1faa746dd1c45ef5b
2026-01-04T15:00:14.872427Z
false
koajs/koa
https://github.com/koajs/koa/blob/fecd464ae7be82bd71b275c1faa746dd1c45ef5b/__tests__/request/headers.test.js
__tests__/request/headers.test.js
'use strict' const { describe, it } = require('node:test') const assert = require('node:assert/strict') const request = require('../../test-helpers/context').request describe('req.headers', () => { it('should return the request header object', () => { const req = request() assert.deepStrictEqual(req.headers...
javascript
MIT
fecd464ae7be82bd71b275c1faa746dd1c45ef5b
2026-01-04T15:00:14.872427Z
false
koajs/koa
https://github.com/koajs/koa/blob/fecd464ae7be82bd71b275c1faa746dd1c45ef5b/__tests__/request/stale.test.js
__tests__/request/stale.test.js
'use strict' const { describe, it } = require('node:test') const assert = require('node:assert/strict') const context = require('../../test-helpers/context') describe('req.stale', () => { it('should be the inverse of req.fresh', () => { const ctx = context() ctx.status = 200 ctx.method = 'GET' ctx.r...
javascript
MIT
fecd464ae7be82bd71b275c1faa746dd1c45ef5b
2026-01-04T15:00:14.872427Z
false
koajs/koa
https://github.com/koajs/koa/blob/fecd464ae7be82bd71b275c1faa746dd1c45ef5b/__tests__/request/get.test.js
__tests__/request/get.test.js
'use strict' const { describe, it } = require('node:test') const assert = require('node:assert/strict') const context = require('../../test-helpers/context') describe('ctx.get(name)', () => { it('should return the field value', () => { const ctx = context() ctx.req.headers.host = 'http://google.com' ctx...
javascript
MIT
fecd464ae7be82bd71b275c1faa746dd1c45ef5b
2026-01-04T15:00:14.872427Z
false
koajs/koa
https://github.com/koajs/koa/blob/fecd464ae7be82bd71b275c1faa746dd1c45ef5b/__tests__/request/hostname.test.js
__tests__/request/hostname.test.js
'use strict' const { describe, it } = require('node:test') const request = require('../../test-helpers/context').request const assert = require('node:assert/strict') describe('req.hostname', () => { it('should return hostname void of port', () => { const req = request() req.header.host = 'foo.com:3000' ...
javascript
MIT
fecd464ae7be82bd71b275c1faa746dd1c45ef5b
2026-01-04T15:00:14.872427Z
false
koajs/koa
https://github.com/koajs/koa/blob/fecd464ae7be82bd71b275c1faa746dd1c45ef5b/__tests__/request/acceptsCharsets.test.js
__tests__/request/acceptsCharsets.test.js
'use strict' const { describe, it } = require('node:test') const assert = require('node:assert/strict') const context = require('../../test-helpers/context') describe('ctx.acceptsCharsets()', () => { describe('with no arguments', () => { describe('when Accept-Charset is populated', () => { it('should retu...
javascript
MIT
fecd464ae7be82bd71b275c1faa746dd1c45ef5b
2026-01-04T15:00:14.872427Z
false
koajs/koa
https://github.com/koajs/koa/blob/fecd464ae7be82bd71b275c1faa746dd1c45ef5b/__tests__/request/fresh.test.js
__tests__/request/fresh.test.js
'use strict' const { describe, it } = require('node:test') const assert = require('node:assert/strict') const context = require('../../test-helpers/context') describe('ctx.fresh', () => { describe('the request method is not GET and HEAD', () => { it('should return false', () => { const ctx = context() ...
javascript
MIT
fecd464ae7be82bd71b275c1faa746dd1c45ef5b
2026-01-04T15:00:14.872427Z
false
koajs/koa
https://github.com/koajs/koa/blob/fecd464ae7be82bd71b275c1faa746dd1c45ef5b/__tests__/request/idempotent.test.js
__tests__/request/idempotent.test.js
'use strict' const { describe, it } = require('node:test') const assert = require('node:assert/strict') const request = require('../../test-helpers/context').request describe('ctx.idempotent', () => { describe('when the request method is idempotent', () => { it('should return true', () => { ['GET', 'HEAD'...
javascript
MIT
fecd464ae7be82bd71b275c1faa746dd1c45ef5b
2026-01-04T15:00:14.872427Z
false
koajs/koa
https://github.com/koajs/koa/blob/fecd464ae7be82bd71b275c1faa746dd1c45ef5b/__tests__/request/subdomains.test.js
__tests__/request/subdomains.test.js
'use strict' const { describe, it } = require('node:test') const assert = require('node:assert/strict') const request = require('../../test-helpers/context').request describe('req.subdomains', () => { it('should return subdomain array', () => { const req = request() req.header.host = 'tobi.ferrets.example.c...
javascript
MIT
fecd464ae7be82bd71b275c1faa746dd1c45ef5b
2026-01-04T15:00:14.872427Z
false
koajs/koa
https://github.com/koajs/koa/blob/fecd464ae7be82bd71b275c1faa746dd1c45ef5b/__tests__/request/header.test.js
__tests__/request/header.test.js
'use strict' const { describe, it } = require('node:test') const assert = require('node:assert/strict') const request = require('../../test-helpers/context').request describe('req.header', () => { it('should return the request header object', () => { const req = request() assert.deepStrictEqual(req.header, ...
javascript
MIT
fecd464ae7be82bd71b275c1faa746dd1c45ef5b
2026-01-04T15:00:14.872427Z
false
koajs/koa
https://github.com/koajs/koa/blob/fecd464ae7be82bd71b275c1faa746dd1c45ef5b/__tests__/request/accept.test.js
__tests__/request/accept.test.js
'use strict' const { describe, it } = require('node:test') const Accept = require('accepts') const assert = require('node:assert/strict') const context = require('../../test-helpers/context') describe('ctx.accept', () => { it('should return an Accept instance', () => { const ctx = context() ctx.req.headers....
javascript
MIT
fecd464ae7be82bd71b275c1faa746dd1c45ef5b
2026-01-04T15:00:14.872427Z
false
koajs/koa
https://github.com/koajs/koa/blob/fecd464ae7be82bd71b275c1faa746dd1c45ef5b/__tests__/request/acceptsLanguages.test.js
__tests__/request/acceptsLanguages.test.js
'use strict' const { describe, it } = require('node:test') const assert = require('node:assert/strict') const context = require('../../test-helpers/context') describe('ctx.acceptsLanguages(langs)', () => { describe('with no arguments', () => { describe('when Accept-Language is populated', () => { it('shou...
javascript
MIT
fecd464ae7be82bd71b275c1faa746dd1c45ef5b
2026-01-04T15:00:14.872427Z
false
koajs/koa
https://github.com/koajs/koa/blob/fecd464ae7be82bd71b275c1faa746dd1c45ef5b/__tests__/request/length.test.js
__tests__/request/length.test.js
'use strict' const { describe, it } = require('node:test') const request = require('../../test-helpers/context').request const assert = require('node:assert/strict') describe('ctx.length', () => { it('should return length in content-length', () => { const req = request() req.header['content-length'] = '10' ...
javascript
MIT
fecd464ae7be82bd71b275c1faa746dd1c45ef5b
2026-01-04T15:00:14.872427Z
false
koajs/koa
https://github.com/koajs/koa/blob/fecd464ae7be82bd71b275c1faa746dd1c45ef5b/__tests__/request/inspect.test.js
__tests__/request/inspect.test.js
'use strict' const { describe, it } = require('node:test') const request = require('../../test-helpers/context').request const assert = require('node:assert/strict') const util = require('util') describe('req.inspect()', () => { describe('with no request.req present', () => { it('should return null', () => { ...
javascript
MIT
fecd464ae7be82bd71b275c1faa746dd1c45ef5b
2026-01-04T15:00:14.872427Z
false
koajs/koa
https://github.com/koajs/koa/blob/fecd464ae7be82bd71b275c1faa746dd1c45ef5b/__tests__/request/is.test.js
__tests__/request/is.test.js
'use strict' const { describe, it } = require('node:test') const context = require('../../test-helpers/context') const assert = require('node:assert/strict') describe('ctx.is(type)', () => { it('should ignore params', () => { const ctx = context() ctx.header['content-type'] = 'text/html; charset=utf-8' ...
javascript
MIT
fecd464ae7be82bd71b275c1faa746dd1c45ef5b
2026-01-04T15:00:14.872427Z
false
koajs/koa
https://github.com/koajs/koa/blob/fecd464ae7be82bd71b275c1faa746dd1c45ef5b/__tests__/request/accepts.test.js
__tests__/request/accepts.test.js
'use strict' const { describe, it } = require('node:test') const assert = require('node:assert/strict') const context = require('../../test-helpers/context') describe('ctx.accepts(types)', () => { describe('with no arguments', () => { describe('when Accept is populated', () => { it('should return all acce...
javascript
MIT
fecd464ae7be82bd71b275c1faa746dd1c45ef5b
2026-01-04T15:00:14.872427Z
false
koajs/koa
https://github.com/koajs/koa/blob/fecd464ae7be82bd71b275c1faa746dd1c45ef5b/__tests__/request/path.test.js
__tests__/request/path.test.js
'use strict' const { describe, it } = require('node:test') const assert = require('node:assert/strict') const context = require('../../test-helpers/context') const parseurl = require('parseurl') describe('ctx.path', () => { it('should return the pathname', () => { const ctx = context() ctx.url = '/login?nex...
javascript
MIT
fecd464ae7be82bd71b275c1faa746dd1c45ef5b
2026-01-04T15:00:14.872427Z
false
koajs/koa
https://github.com/koajs/koa/blob/fecd464ae7be82bd71b275c1faa746dd1c45ef5b/__tests__/request/secure.test.js
__tests__/request/secure.test.js
'use strict' const { describe, it } = require('node:test') const assert = require('node:assert/strict') const request = require('../../test-helpers/context').request describe('req.secure', () => { it('should return true when encrypted', () => { const req = request() req.req.socket = { encrypted: true } ...
javascript
MIT
fecd464ae7be82bd71b275c1faa746dd1c45ef5b
2026-01-04T15:00:14.872427Z
false
koajs/koa
https://github.com/koajs/koa/blob/fecd464ae7be82bd71b275c1faa746dd1c45ef5b/__tests__/request/href.test.js
__tests__/request/href.test.js
'use strict' const { describe, it } = require('node:test') const assert = require('node:assert/strict') const Stream = require('stream') const request = require('supertest') const Koa = require('../../') const context = require('../../test-helpers/context') describe('ctx.href', () => { it('should return the full re...
javascript
MIT
fecd464ae7be82bd71b275c1faa746dd1c45ef5b
2026-01-04T15:00:14.872427Z
false
koajs/koa
https://github.com/koajs/koa/blob/fecd464ae7be82bd71b275c1faa746dd1c45ef5b/__tests__/request/type.test.js
__tests__/request/type.test.js
'use strict' const { describe, it } = require('node:test') const request = require('../../test-helpers/context').request const assert = require('node:assert/strict') describe('req.type', () => { it('should return type void of parameters', () => { const req = request() req.header['content-type'] = 'text/html...
javascript
MIT
fecd464ae7be82bd71b275c1faa746dd1c45ef5b
2026-01-04T15:00:14.872427Z
false
koajs/koa
https://github.com/koajs/koa/blob/fecd464ae7be82bd71b275c1faa746dd1c45ef5b/__tests__/request/ips.test.js
__tests__/request/ips.test.js
'use strict' const { describe, it } = require('node:test') const assert = require('node:assert/strict') const request = require('../../test-helpers/context').request describe('req.ips', () => { describe('when X-Forwarded-For is present', () => { describe('and proxy is not trusted', () => { it('should be i...
javascript
MIT
fecd464ae7be82bd71b275c1faa746dd1c45ef5b
2026-01-04T15:00:14.872427Z
false
koajs/koa
https://github.com/koajs/koa/blob/fecd464ae7be82bd71b275c1faa746dd1c45ef5b/__tests__/request/protocol.test.js
__tests__/request/protocol.test.js
'use strict' const { describe, it } = require('node:test') const assert = require('node:assert/strict') const request = require('../../test-helpers/context').request describe('req.protocol', () => { describe('when encrypted', () => { it('should return "https"', () => { const req = request() req.req....
javascript
MIT
fecd464ae7be82bd71b275c1faa746dd1c45ef5b
2026-01-04T15:00:14.872427Z
false
koajs/koa
https://github.com/koajs/koa/blob/fecd464ae7be82bd71b275c1faa746dd1c45ef5b/__tests__/request/query.test.js
__tests__/request/query.test.js
'use strict' const { describe, it } = require('node:test') const assert = require('node:assert/strict') const context = require('../../test-helpers/context') describe('ctx.query', () => { describe('when missing', () => { it('should return an empty object', () => { const ctx = context({ url: '/' }) a...
javascript
MIT
fecd464ae7be82bd71b275c1faa746dd1c45ef5b
2026-01-04T15:00:14.872427Z
false
koajs/koa
https://github.com/koajs/koa/blob/fecd464ae7be82bd71b275c1faa746dd1c45ef5b/__tests__/request/charset.test.js
__tests__/request/charset.test.js
'use strict' const { describe, it } = require('node:test') const request = require('../../test-helpers/context').request const assert = require('node:assert/strict') describe('req.charset', () => { describe('with no content-type present', () => { it('should return ""', () => { const req = request() ...
javascript
MIT
fecd464ae7be82bd71b275c1faa746dd1c45ef5b
2026-01-04T15:00:14.872427Z
false
koajs/koa
https://github.com/koajs/koa/blob/fecd464ae7be82bd71b275c1faa746dd1c45ef5b/__tests__/request/search.test.js
__tests__/request/search.test.js
'use strict' const { describe, it } = require('node:test') const assert = require('node:assert/strict') const context = require('../../test-helpers/context') describe('ctx.search=', () => { it('should replace the search', () => { const ctx = context({ url: '/store/shoes' }) ctx.search = '?page=2&color=blue'...
javascript
MIT
fecd464ae7be82bd71b275c1faa746dd1c45ef5b
2026-01-04T15:00:14.872427Z
false
koajs/koa
https://github.com/koajs/koa/blob/fecd464ae7be82bd71b275c1faa746dd1c45ef5b/__tests__/request/host.test.js
__tests__/request/host.test.js
'use strict' const { describe, it } = require('node:test') const request = require('../../test-helpers/context').request const assert = require('node:assert/strict') describe('req.host', () => { it('should return host with port', () => { const req = request() req.header.host = 'foo.com:3000' assert.stri...
javascript
MIT
fecd464ae7be82bd71b275c1faa746dd1c45ef5b
2026-01-04T15:00:14.872427Z
false
koajs/koa
https://github.com/koajs/koa/blob/fecd464ae7be82bd71b275c1faa746dd1c45ef5b/__tests__/request/ip.test.js
__tests__/request/ip.test.js
'use strict' const { describe, it } = require('node:test') const assert = require('node:assert/strict') const Stream = require('stream') const Koa = require('../..') const Request = require('../../test-helpers/context').request describe('req.ip', () => { describe('with req.ips present', () => { it('should retur...
javascript
MIT
fecd464ae7be82bd71b275c1faa746dd1c45ef5b
2026-01-04T15:00:14.872427Z
false
koajs/koa
https://github.com/koajs/koa/blob/fecd464ae7be82bd71b275c1faa746dd1c45ef5b/__tests__/context/cookies.test.js
__tests__/context/cookies.test.js
'use strict' const { describe, it } = require('node:test') const assert = require('node:assert/strict') const request = require('supertest') const Koa = require('../..') describe('ctx.cookies', () => { describe('ctx.cookies.set()', () => { it('should set an unsigned cookie', async () => { const app = new ...
javascript
MIT
fecd464ae7be82bd71b275c1faa746dd1c45ef5b
2026-01-04T15:00:14.872427Z
false
koajs/koa
https://github.com/koajs/koa/blob/fecd464ae7be82bd71b275c1faa746dd1c45ef5b/__tests__/context/state.test.js
__tests__/context/state.test.js
'use strict' const { describe, it } = require('node:test') const request = require('supertest') const assert = require('node:assert/strict') const Koa = require('../..') describe('ctx.state', () => { it('should provide a ctx.state namespace', () => { const app = new Koa() app.use(ctx => { assert.deep...
javascript
MIT
fecd464ae7be82bd71b275c1faa746dd1c45ef5b
2026-01-04T15:00:14.872427Z
false
koajs/koa
https://github.com/koajs/koa/blob/fecd464ae7be82bd71b275c1faa746dd1c45ef5b/__tests__/context/throw.test.js
__tests__/context/throw.test.js
'use strict' const { describe, it } = require('node:test') const context = require('../../test-helpers/context') const assert = require('node:assert/strict') describe('ctx.throw(msg)', () => { it('should set .status to 500', () => { const ctx = context() try { ctx.throw('boom') } catch (err) { ...
javascript
MIT
fecd464ae7be82bd71b275c1faa746dd1c45ef5b
2026-01-04T15:00:14.872427Z
false
koajs/koa
https://github.com/koajs/koa/blob/fecd464ae7be82bd71b275c1faa746dd1c45ef5b/__tests__/context/toJSON.test.js
__tests__/context/toJSON.test.js
'use strict' const { describe, it } = require('node:test') const assert = require('node:assert/strict') const context = require('../../test-helpers/context') describe('ctx.toJSON()', () => { it('should return a json representation', () => { const ctx = context() ctx.req.method = 'POST' ctx.req.url = '/...
javascript
MIT
fecd464ae7be82bd71b275c1faa746dd1c45ef5b
2026-01-04T15:00:14.872427Z
false
koajs/koa
https://github.com/koajs/koa/blob/fecd464ae7be82bd71b275c1faa746dd1c45ef5b/__tests__/context/onerror.test.js
__tests__/context/onerror.test.js
'use strict' const { describe, it } = require('node:test') const assert = require('node:assert/strict') const request = require('supertest') const Koa = require('../..') const context = require('../../test-helpers/context') describe('ctx.onerror(err)', () => { it('should respond', () => { const app = new Koa() ...
javascript
MIT
fecd464ae7be82bd71b275c1faa746dd1c45ef5b
2026-01-04T15:00:14.872427Z
false
koajs/koa
https://github.com/koajs/koa/blob/fecd464ae7be82bd71b275c1faa746dd1c45ef5b/__tests__/context/inspect.test.js
__tests__/context/inspect.test.js
'use strict' const { describe, it } = require('node:test') const prototype = require('../../lib/context') const assert = require('node:assert/strict') const util = require('util') const context = require('../../test-helpers/context') describe('ctx.inspect()', () => { it('should return a json representation', () => ...
javascript
MIT
fecd464ae7be82bd71b275c1faa746dd1c45ef5b
2026-01-04T15:00:14.872427Z
false
koajs/koa
https://github.com/koajs/koa/blob/fecd464ae7be82bd71b275c1faa746dd1c45ef5b/__tests__/context/assert.test.js
__tests__/context/assert.test.js
'use strict' const { describe, it } = require('node:test') const context = require('../../test-helpers/context') const assert = require('node:assert/strict') describe('ctx.assert(value, status)', () => { it('should throw an error', () => { const ctx = context() let assertionRan = false try { ctx....
javascript
MIT
fecd464ae7be82bd71b275c1faa746dd1c45ef5b
2026-01-04T15:00:14.872427Z
false
koajs/koa
https://github.com/koajs/koa/blob/fecd464ae7be82bd71b275c1faa746dd1c45ef5b/lib/application.js
lib/application.js
'use strict' /** * Module dependencies. */ const util = require('node:util') const debug = util.debuglog('koa:application') const Emitter = require('node:events') const Stream = require('node:stream') const http = require('node:http') const { AsyncLocalStorage } = require('node:async_hooks') const onFinished = requ...
javascript
MIT
fecd464ae7be82bd71b275c1faa746dd1c45ef5b
2026-01-04T15:00:14.872427Z
false
koajs/koa
https://github.com/koajs/koa/blob/fecd464ae7be82bd71b275c1faa746dd1c45ef5b/lib/search-params.js
lib/search-params.js
const URLSearchParams = require('url').URLSearchParams module.exports = { stringify: (obj) => { const searchParams = new URLSearchParams() const addKey = (k, v, params) => { const val = typeof v === 'string' || typeof v === 'number' ? v : '' params.append(k, val) } for (const [key, value...
javascript
MIT
fecd464ae7be82bd71b275c1faa746dd1c45ef5b
2026-01-04T15:00:14.872427Z
false
koajs/koa
https://github.com/koajs/koa/blob/fecd464ae7be82bd71b275c1faa746dd1c45ef5b/lib/only.js
lib/only.js
module.exports = (obj, keys) => { const ret = {} for (let i = 0; i < keys.length; i++) { const key = keys[i] if (obj[key] == null) continue ret[key] = obj[key] } return ret }
javascript
MIT
fecd464ae7be82bd71b275c1faa746dd1c45ef5b
2026-01-04T15:00:14.872427Z
false
koajs/koa
https://github.com/koajs/koa/blob/fecd464ae7be82bd71b275c1faa746dd1c45ef5b/lib/context.js
lib/context.js
'use strict' /** * Module dependencies. */ const util = require('util') const createError = require('http-errors') const httpAssert = require('http-assert') const delegate = require('delegates') const statuses = require('statuses') const Cookies = require('cookies') const COOKIES = Symbol('context#cookies') /** ...
javascript
MIT
fecd464ae7be82bd71b275c1faa746dd1c45ef5b
2026-01-04T15:00:14.872427Z
false
koajs/koa
https://github.com/koajs/koa/blob/fecd464ae7be82bd71b275c1faa746dd1c45ef5b/lib/is-stream.js
lib/is-stream.js
'use strict' const Stream = require('stream') // TODO: use a third party library for this module.exports = (stream) => { return ( stream instanceof Stream || (stream !== null && typeof stream === 'object' && !!stream.readable && typeof stream.pipe === 'function' && typeof stream.rea...
javascript
MIT
fecd464ae7be82bd71b275c1faa746dd1c45ef5b
2026-01-04T15:00:14.872427Z
false
koajs/koa
https://github.com/koajs/koa/blob/fecd464ae7be82bd71b275c1faa746dd1c45ef5b/lib/request.js
lib/request.js
'use strict' /** * Module dependencies. */ const URL = require('url').URL const net = require('net') const accepts = require('accepts') const contentType = require('content-type') const stringify = require('url').format const parse = require('parseurl') const sp = require('./search-params.js') const typeis = requi...
javascript
MIT
fecd464ae7be82bd71b275c1faa746dd1c45ef5b
2026-01-04T15:00:14.872427Z
false
koajs/koa
https://github.com/koajs/koa/blob/fecd464ae7be82bd71b275c1faa746dd1c45ef5b/lib/response.js
lib/response.js
'use strict' /** * Module dependencies. */ const assert = require('node:assert') const extname = require('node:path').extname const util = require('node:util') const contentDisposition = require('content-disposition') const onFinish = require('on-finished') const escape = require('escape-html') const typeis = requ...
javascript
MIT
fecd464ae7be82bd71b275c1faa746dd1c45ef5b
2026-01-04T15:00:14.872427Z
false
nwjs/nw.js
https://github.com/nwjs/nw.js/blob/90c8693ed8bcaf5f41db42eec810e56de36516b3/src/api/screen/screen.js
src/api/screen/screen.js
// Copyright (c) 2012 Intel Corp // Copyright (c) 2014 The Chromium Authors // // Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and associated documentation files (the "Software"), to deal // in the Software without restriction, including without limitation the rights...
javascript
MIT
90c8693ed8bcaf5f41db42eec810e56de36516b3
2026-01-04T14:59:04.900678Z
false
nwjs/nw.js
https://github.com/nwjs/nw.js/blob/90c8693ed8bcaf5f41db42eec810e56de36516b3/src/api/tray/tray.js
src/api/tray/tray.js
// Copyright (c) 2012 Intel Corp // Copyright (c) 2012 The Chromium Authors // // Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and associated documentation files (the "Software"), to deal // in the Software without restriction, including without limitation the rights...
javascript
MIT
90c8693ed8bcaf5f41db42eec810e56de36516b3
2026-01-04T14:59:04.900678Z
false
nwjs/nw.js
https://github.com/nwjs/nw.js/blob/90c8693ed8bcaf5f41db42eec810e56de36516b3/src/api/app/app.js
src/api/app/app.js
// Copyright (c) 2012 Intel Corp // Copyright (c) 2012 The Chromium Authors // // Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and associated documentation files (the "Software"), to deal // in the Software without restriction, including without limitation the rights...
javascript
MIT
90c8693ed8bcaf5f41db42eec810e56de36516b3
2026-01-04T14:59:04.900678Z
false
nwjs/nw.js
https://github.com/nwjs/nw.js/blob/90c8693ed8bcaf5f41db42eec810e56de36516b3/src/api/base/base.js
src/api/base/base.js
// Copyright (c) 2012 Intel Corp // Copyright (c) 2012 The Chromium Authors // // Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and associated documentation files (the "Software"), to deal // in the Software without restriction, including without limitation the rights...
javascript
MIT
90c8693ed8bcaf5f41db42eec810e56de36516b3
2026-01-04T14:59:04.900678Z
false
nwjs/nw.js
https://github.com/nwjs/nw.js/blob/90c8693ed8bcaf5f41db42eec810e56de36516b3/src/api/menuitem/menuitem.js
src/api/menuitem/menuitem.js
// Copyright (c) 2012 Intel Corp // Copyright (c) 2012 The Chromium Authors // // Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and associated documentation files (the "Software"), to deal // in the Software without restriction, including without limitation the rights...
javascript
MIT
90c8693ed8bcaf5f41db42eec810e56de36516b3
2026-01-04T14:59:04.900678Z
false
nwjs/nw.js
https://github.com/nwjs/nw.js/blob/90c8693ed8bcaf5f41db42eec810e56de36516b3/src/api/clipboard/clipboard.js
src/api/clipboard/clipboard.js
// Copyright (c) 2012 Intel Corp // Copyright (c) 2012 The Chromium Authors // // Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and associated documentation files (the "Software"), to deal // in the Software without restriction, including without limitation the rights...
javascript
MIT
90c8693ed8bcaf5f41db42eec810e56de36516b3
2026-01-04T14:59:04.900678Z
false
nwjs/nw.js
https://github.com/nwjs/nw.js/blob/90c8693ed8bcaf5f41db42eec810e56de36516b3/src/api/shortcut/shorcut.js
src/api/shortcut/shorcut.js
// Copyright (c) 2014 Intel Corp // Copyright (c) 2014 The Chromium Authors // // Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and associated documentation files (the "Software"), to deal // in the Software without restriction, including without limitation the rights ...
javascript
MIT
90c8693ed8bcaf5f41db42eec810e56de36516b3
2026-01-04T14:59:04.900678Z
false
nwjs/nw.js
https://github.com/nwjs/nw.js/blob/90c8693ed8bcaf5f41db42eec810e56de36516b3/src/api/menu/menu.js
src/api/menu/menu.js
// Copyright (c) 2012 Intel Corp // Copyright (c) 2012 The Chromium Authors // // Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and associated documentation files (the "Software"), to deal // in the Software without restriction, including without limitation the rights...
javascript
MIT
90c8693ed8bcaf5f41db42eec810e56de36516b3
2026-01-04T14:59:04.900678Z
false
nwjs/nw.js
https://github.com/nwjs/nw.js/blob/90c8693ed8bcaf5f41db42eec810e56de36516b3/src/api/shell/shell.js
src/api/shell/shell.js
// Copyright (c) 2012 Intel Corp // Copyright (c) 2012 The Chromium Authors // // Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and associated documentation files (the "Software"), to deal // in the Software without restriction, including without limitation the rights...
javascript
MIT
90c8693ed8bcaf5f41db42eec810e56de36516b3
2026-01-04T14:59:04.900678Z
false
nwjs/nw.js
https://github.com/nwjs/nw.js/blob/90c8693ed8bcaf5f41db42eec810e56de36516b3/src/resources/nw_pre13_shim.js
src/resources/nw_pre13_shim.js
(function() { // detect `nw` object of NW13 if (!(self.nw && self.nw.require)) return; var realrequire = nw.require; self.require = function() { if (arguments[0] === 'nw.gui') { return nw; } else { return realrequire.apply(self, [].slice.call(arguments, 0)); } }; self.require.cache...
javascript
MIT
90c8693ed8bcaf5f41db42eec810e56de36516b3
2026-01-04T14:59:04.900678Z
false
nwjs/nw.js
https://github.com/nwjs/nw.js/blob/90c8693ed8bcaf5f41db42eec810e56de36516b3/src/resources/api_nw_clipboard.js
src/resources/api_nw_clipboard.js
var forEach = require('utils').forEach; var nwClipboardBinding; apiBridge.registerCustomHook(function(bindingsAPI) { var apiFunctions = bindingsAPI.apiFunctions; nwClipboardBinding = bindingsAPI.compiledApi; ['clearSync', 'setListSync'].forEach(function(nwSyncAPIName) { apiFunctions.setHandleRequest(nwSyncAP...
javascript
MIT
90c8693ed8bcaf5f41db42eec810e56de36516b3
2026-01-04T14:59:04.900678Z
false
nwjs/nw.js
https://github.com/nwjs/nw.js/blob/90c8693ed8bcaf5f41db42eec810e56de36516b3/src/resources/api_nw_app.js
src/resources/api_nw_app.js
var nwNatives = requireNative('nw_natives'); var fullArgv = null; var dataPath; var eventsMap = { 'open': 'onOpen', 'reopen': 'onReopen' }; var filteredArgv = [ /^--url=/, /^--remote-debugging-port=/, /^--renderer-cmd-prefix=/, /^--nwapp=/ ]; apiBridge.registerCustomHook(function(b...
javascript
MIT
90c8693ed8bcaf5f41db42eec810e56de36516b3
2026-01-04T14:59:04.900678Z
false
nwjs/nw.js
https://github.com/nwjs/nw.js/blob/90c8693ed8bcaf5f41db42eec810e56de36516b3/src/resources/api_nw_test.js
src/resources/api_nw_test.js
var nwNatives = requireNative('nw_natives'); apiBridge.registerCustomHook(function(bindingsAPI) { var apiFunctions = bindingsAPI.apiFunctions; apiFunctions.setHandleRequest('crashRenderer', function() { nwNatives.crashRenderer(); }); apiFunctions.setHandleRequest('done', function() { nw.process.exit(0)...
javascript
MIT
90c8693ed8bcaf5f41db42eec810e56de36516b3
2026-01-04T14:59:04.900678Z
false
nwjs/nw.js
https://github.com/nwjs/nw.js/blob/90c8693ed8bcaf5f41db42eec810e56de36516b3/src/resources/api_nw_shortcut.js
src/resources/api_nw_shortcut.js
var EventEmitter = nw.require('events').EventEmitter; var OPTION_INVALID = 'Invalid option.'; var OPTION_KEY_REQUIRED = "Shortcut requires 'key' to specify key combinations."; var OPTION_KEY_INVALID = "Invalid 'key' format."; var OPTION_ACTIVE_INVALID = "'active' must be a valid function."; var OPTION_FAILED_INVALID =...
javascript
MIT
90c8693ed8bcaf5f41db42eec810e56de36516b3
2026-01-04T14:59:04.900678Z
false
nwjs/nw.js
https://github.com/nwjs/nw.js/blob/90c8693ed8bcaf5f41db42eec810e56de36516b3/src/resources/api_nw_screen.js
src/resources/api_nw_screen.js
var EventEmitter = nw.require('events').EventEmitter; var nwScreenBinding; // Hook Sync API calls apiBridge.registerCustomHook(function(bindingsAPI) { var apiFunctions = bindingsAPI.apiFunctions; nwScreenBinding = bindingsAPI.compiledApi; ['getScreens', 'initEventListeners', 'startMonitor', 'stopMonitor', 'isMon...
javascript
MIT
90c8693ed8bcaf5f41db42eec810e56de36516b3
2026-01-04T14:59:04.900678Z
false
nwjs/nw.js
https://github.com/nwjs/nw.js/blob/90c8693ed8bcaf5f41db42eec810e56de36516b3/src/resources/api_nw_menu.js
src/resources/api_nw_menu.js
var forEach = require('utils').forEach; var nwNative = requireNative('nw_natives'); var messagingNatives = requireNative('messaging_natives'); function Menu (option) { if (!(this instanceof Menu)) { return new Menu(option); } if (typeof option != 'object' || !option) option = { type: 'contextmenu' }; ...
javascript
MIT
90c8693ed8bcaf5f41db42eec810e56de36516b3
2026-01-04T14:59:04.900678Z
false
nwjs/nw.js
https://github.com/nwjs/nw.js/blob/90c8693ed8bcaf5f41db42eec810e56de36516b3/src/resources/api_nw_tray.js
src/resources/api_nw_tray.js
var forEach = require('utils').forEach; var nwNative = requireNative('nw_natives'); var messagingNatives = requireNative('messaging_natives'); var util = nw.require('util'); var EventEmitter = nw.require('events').EventEmitter; var trayEvents = { objs: {}, clickEvent: {} }; trayEvents.clickEvent = bindingUtil.createC...
javascript
MIT
90c8693ed8bcaf5f41db42eec810e56de36516b3
2026-01-04T14:59:04.900678Z
false
nwjs/nw.js
https://github.com/nwjs/nw.js/blob/90c8693ed8bcaf5f41db42eec810e56de36516b3/src/resources/api_nw_window.js
src/resources/api_nw_window.js
var nwNatives = requireNative('nw_natives'); var forEach = require('utils').forEach; var runtimeNatives = requireNative('runtime'); var renderFrameObserverNatives = requireNative('renderFrameObserverNatives'); var appWindowNatives = requireNative('app_window_natives'); var GetExtensionViews = runtimeNatives.GetExtensi...
javascript
MIT
90c8693ed8bcaf5f41db42eec810e56de36516b3
2026-01-04T14:59:04.900678Z
false
nwjs/nw.js
https://github.com/nwjs/nw.js/blob/90c8693ed8bcaf5f41db42eec810e56de36516b3/src/resources/api_nw_shell.js
src/resources/api_nw_shell.js
apiBridge.registerCustomHook(function(bindingsAPI) { var apiFunctions = bindingsAPI.apiFunctions; apiFunctions.setHandleRequest('openExternal', function() { bindingUtil.sendRequestSync('nw.Shell.openExternal', $Array.from(arguments), undefined, undefined); }); apiFunctions.setHandleRequest('openItem', funct...
javascript
MIT
90c8693ed8bcaf5f41db42eec810e56de36516b3
2026-01-04T14:59:04.900678Z
false
nwjs/nw.js
https://github.com/nwjs/nw.js/blob/90c8693ed8bcaf5f41db42eec810e56de36516b3/src/resources/api_nw_newwin.js
src/resources/api_nw_newwin.js
var nwNatives = requireNative('nw_natives'); var forEach = require('utils').forEach; var runtimeNatives = requireNative('runtime'); var renderFrameObserverNatives = requireNative('renderFrameObserverNatives'); var appWindowNatives = requireNative('app_window_natives'); var GetExtensionViews = runtimeNatives.GetExtensi...
javascript
MIT
90c8693ed8bcaf5f41db42eec810e56de36516b3
2026-01-04T14:59:04.900678Z
false
nwjs/nw.js
https://github.com/nwjs/nw.js/blob/90c8693ed8bcaf5f41db42eec810e56de36516b3/src/resources/api_nw_object.js
src/resources/api_nw_object.js
var forEach = require('utils').forEach; apiBridge.registerCustomHook(function(bindingsAPI) { var apiFunctions = bindingsAPI.apiFunctions; apiFunctions.setHandleRequest('allocateId', function() { return bindingUtil.sendRequestSync('nw.Obj.allocateId', $Array.from(arguments), undefined, undefined)[0]; }); ap...
javascript
MIT
90c8693ed8bcaf5f41db42eec810e56de36516b3
2026-01-04T14:59:04.900678Z
false
nwjs/nw.js
https://github.com/nwjs/nw.js/blob/90c8693ed8bcaf5f41db42eec810e56de36516b3/src/resources/api_nw_menuitem.js
src/resources/api_nw_menuitem.js
var forEach = require('utils').forEach; var nwNative = requireNative('nw_natives'); var messagingNatives = requireNative('messaging_natives'); var util = nw.require('util'); var EventEmitter = nw.require('events').EventEmitter; var menuItems = { objs : {}, clickEvent: {} }; menuItems.clickEvent = bindingUtil.createCus...
javascript
MIT
90c8693ed8bcaf5f41db42eec810e56de36516b3
2026-01-04T14:59:04.900678Z
false
nwjs/nw.js
https://github.com/nwjs/nw.js/blob/90c8693ed8bcaf5f41db42eec810e56de36516b3/src/resources/api_window_internal.js
src/resources/api_window_internal.js
apiBridge.registerCustomHook(function(bindingsAPI) { var apiFunctions = bindingsAPI.apiFunctions; apiFunctions.setHandleRequest('getCurrent', function() { return bindingUtil.sendRequestSync('nw.currentWindowInternal.getCurrent', $Array.from(arguments), undefined, undefined)[0]; }); apiFunctions.setHandleReq...
javascript
MIT
90c8693ed8bcaf5f41db42eec810e56de36516b3
2026-01-04T14:59:04.900678Z
false
nwjs/nw.js
https://github.com/nwjs/nw.js/blob/90c8693ed8bcaf5f41db42eec810e56de36516b3/src/resources/nwapp/background.js
src/resources/nwapp/background.js
//console.log("nwapp/background.js");
javascript
MIT
90c8693ed8bcaf5f41db42eec810e56de36516b3
2026-01-04T14:59:04.900678Z
false
nwjs/nw.js
https://github.com/nwjs/nw.js/blob/90c8693ed8bcaf5f41db42eec810e56de36516b3/test/node_modules/opener/opener.js
test/node_modules/opener/opener.js
#!/usr/bin/env node "use strict"; var childProcess = require("child_process"); function opener(args, options, callback) { // http://stackoverflow.com/q/1480971/3191, but see below for Windows. var command = process.platform === "win32" ? "cmd" : process.platform === "darwin" ? "open" : ...
javascript
MIT
90c8693ed8bcaf5f41db42eec810e56de36516b3
2026-01-04T14:59:04.900678Z
false
nwjs/nw.js
https://github.com/nwjs/nw.js/blob/90c8693ed8bcaf5f41db42eec810e56de36516b3/test/node_modules/http-server/test/http-server-test.js
test/node_modules/http-server/test/http-server-test.js
var assert = require('assert'), path = require('path'), fs = require('fs'), vows = require('vows'), request = require('request'), httpServer = require('../lib/http-server'); var root = path.join(__dirname, 'fixtures', 'root'); vows.describe('http-server').addBatch({ 'When http-server is listenin...
javascript
MIT
90c8693ed8bcaf5f41db42eec810e56de36516b3
2026-01-04T14:59:04.900678Z
false
nwjs/nw.js
https://github.com/nwjs/nw.js/blob/90c8693ed8bcaf5f41db42eec810e56de36516b3/test/node_modules/http-server/lib/http-server.js
test/node_modules/http-server/lib/http-server.js
'use strict'; var fs = require('fs'), union = require('union'), ecstatic = require('ecstatic'), httpProxy = require('http-proxy'), corser = require('corser'); // // Remark: backwards compatibility for previous // case convention of HTTP // exports.HttpServer = exports.HTTPServer = HttpServer; /** * ...
javascript
MIT
90c8693ed8bcaf5f41db42eec810e56de36516b3
2026-01-04T14:59:04.900678Z
false
nwjs/nw.js
https://github.com/nwjs/nw.js/blob/90c8693ed8bcaf5f41db42eec810e56de36516b3/test/node_modules/portfinder/lib/portfinder.js
test/node_modules/portfinder/lib/portfinder.js
/* * portfinder.js: A simple tool to find an open port on the current machine. * * (C) 2011, Charlie Robbins * */ "use strict"; var fs = require('fs'), os = require('os'), net = require('net'), path = require('path'), async = require('async'), debug = require('debug'), mkdirp = require('m...
javascript
MIT
90c8693ed8bcaf5f41db42eec810e56de36516b3
2026-01-04T14:59:04.900678Z
false
nwjs/nw.js
https://github.com/nwjs/nw.js/blob/90c8693ed8bcaf5f41db42eec810e56de36516b3/test/node_modules/ms/index.js
test/node_modules/ms/index.js
/** * Helpers. */ var s = 1000; var m = s * 60; var h = m * 60; var d = h * 24; var y = d * 365.25; /** * Parse or format the given `val`. * * Options: * * - `long` verbose formatting [false] * * @param {String|Number} val * @param {Object} [options] * @throws {Error} throw an error if val is not a non-em...
javascript
MIT
90c8693ed8bcaf5f41db42eec810e56de36516b3
2026-01-04T14:59:04.900678Z
false
nwjs/nw.js
https://github.com/nwjs/nw.js/blob/90c8693ed8bcaf5f41db42eec810e56de36516b3/test/node_modules/he/he.js
test/node_modules/he/he.js
/*! https://mths.be/he v1.1.1 by @mathias | MIT license */ ;(function(root) { // Detect free variables `exports`. var freeExports = typeof exports == 'object' && exports; // Detect free variable `module`. var freeModule = typeof module == 'object' && module && module.exports == freeExports && module; // Detec...
javascript
MIT
90c8693ed8bcaf5f41db42eec810e56de36516b3
2026-01-04T14:59:04.900678Z
true
nwjs/nw.js
https://github.com/nwjs/nw.js/blob/90c8693ed8bcaf5f41db42eec810e56de36516b3/test/node_modules/http-proxy/index.js
test/node_modules/http-proxy/index.js
/*! * Caron dimonio, con occhi di bragia * loro accennando, tutte le raccoglie; * batte col remo qualunque s’adagia * * Charon the demon, with the eyes of glede, * Beckoning to them, collects them all together, * Beats with his oar whoever lags behind * * Dante - The Divine Comedy (Canto II...
javascript
MIT
90c8693ed8bcaf5f41db42eec810e56de36516b3
2026-01-04T14:59:04.900678Z
false
nwjs/nw.js
https://github.com/nwjs/nw.js/blob/90c8693ed8bcaf5f41db42eec810e56de36516b3/test/node_modules/http-proxy/lib/http-proxy.js
test/node_modules/http-proxy/lib/http-proxy.js
// Use explicit /index.js to help browserify negociation in require '/lib/http-proxy' (!) var ProxyServer = require('./http-proxy/index.js').Server; /** * Creates the proxy server. * * Examples: * * httpProxy.createProxyServer({ .. }, 8000) * // => '{ web: [Function], ws: [Function] ... }' * * @param {...
javascript
MIT
90c8693ed8bcaf5f41db42eec810e56de36516b3
2026-01-04T14:59:04.900678Z
false
nwjs/nw.js
https://github.com/nwjs/nw.js/blob/90c8693ed8bcaf5f41db42eec810e56de36516b3/test/node_modules/http-proxy/lib/http-proxy/index.js
test/node_modules/http-proxy/lib/http-proxy/index.js
var httpProxy = module.exports, extend = require('util')._extend, parse_url = require('url').parse, EE3 = require('eventemitter3'), http = require('http'), https = require('https'), web = require('./passes/web-incoming'), ws = require('./passes/ws-incoming'); ...
javascript
MIT
90c8693ed8bcaf5f41db42eec810e56de36516b3
2026-01-04T14:59:04.900678Z
false
nwjs/nw.js
https://github.com/nwjs/nw.js/blob/90c8693ed8bcaf5f41db42eec810e56de36516b3/test/node_modules/http-proxy/lib/http-proxy/common.js
test/node_modules/http-proxy/lib/http-proxy/common.js
var common = exports, url = require('url'), extend = require('util')._extend, required = require('requires-port'); var upgradeHeader = /(^|,)\s*upgrade\s*($|,)/i, isSSL = /^https|wss/, cookieDomainRegex = /(;\s*domain=)([^;]+)/i; /** * Simple Regex for testing if protocol is https */ co...
javascript
MIT
90c8693ed8bcaf5f41db42eec810e56de36516b3
2026-01-04T14:59:04.900678Z
false
nwjs/nw.js
https://github.com/nwjs/nw.js/blob/90c8693ed8bcaf5f41db42eec810e56de36516b3/test/node_modules/http-proxy/lib/http-proxy/passes/web-outgoing.js
test/node_modules/http-proxy/lib/http-proxy/passes/web-outgoing.js
var url = require('url'), common = require('../common'); var redirectRegex = /^201|30(1|2|7|8)$/; /*! * Array of passes. * * A `pass` is just a function that is executed on `req, res, options` * so that you can easily add new checks while still keeping the base * flexible. */ module.exports = { // <-- ...
javascript
MIT
90c8693ed8bcaf5f41db42eec810e56de36516b3
2026-01-04T14:59:04.900678Z
false
nwjs/nw.js
https://github.com/nwjs/nw.js/blob/90c8693ed8bcaf5f41db42eec810e56de36516b3/test/node_modules/http-proxy/lib/http-proxy/passes/web-incoming.js
test/node_modules/http-proxy/lib/http-proxy/passes/web-incoming.js
var http = require('http'), https = require('https'), web_o = require('./web-outgoing'), common = require('../common'); web_o = Object.keys(web_o).map(function(pass) { return web_o[pass]; }); /*! * Array of passes. * * A `pass` is just a function that is executed on `req, res, options` * so that...
javascript
MIT
90c8693ed8bcaf5f41db42eec810e56de36516b3
2026-01-04T14:59:04.900678Z
false