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
evaera/RoVer
https://github.com/evaera/RoVer/blob/49c55be0089433a15cee544d86d7d845532f6092/src/commands/rover/ReverseLookupCommand.js
src/commands/rover/ReverseLookupCommand.js
const Command = require("../Command") const request = require("request-promise") const config = require("../../data/client.json") module.exports = class LookupCommand extends Command { constructor(client) { super(client, { name: "reverselookup", properName: "Reverse Lookup", aliases: ["rlookup"...
javascript
Apache-2.0
49c55be0089433a15cee544d86d7d845532f6092
2026-01-05T03:37:01.581873Z
false
evaera/RoVer
https://github.com/evaera/RoVer/blob/49c55be0089433a15cee544d86d7d845532f6092/src/commands/rover/UpdateCommand.js
src/commands/rover/UpdateCommand.js
const Command = require("../Command") const DiscordServer = require("../../DiscordServer") const { Role } = require("discord.js") const config = require("../../data/client.json") async function recursiveUpdate(memberArray, server, msg) { const nextMember = memberArray.pop() if (!nextMember) { return msg ...
javascript
Apache-2.0
49c55be0089433a15cee544d86d7d845532f6092
2026-01-05T03:37:01.581873Z
false
evaera/RoVer
https://github.com/evaera/RoVer/blob/49c55be0089433a15cee544d86d7d845532f6092/src/commands/rover/JoinMessageCommand.js
src/commands/rover/JoinMessageCommand.js
const config = require("../../data/client.json") const Command = require("../Command") module.exports = class JoinMessageCommand extends Command { constructor(client) { super(client, { name: "joindm", properName: "JoinDM", aliases: ["roverjoindm"], description: "`<on|off>` Set whe...
javascript
Apache-2.0
49c55be0089433a15cee544d86d7d845532f6092
2026-01-05T03:37:01.581873Z
false
evaera/RoVer
https://github.com/evaera/RoVer/blob/49c55be0089433a15cee544d86d7d845532f6092/src/commands/rover/VerifyChannelCommand.js
src/commands/rover/VerifyChannelCommand.js
const Command = require("../Command") const config = require("../../data/client.json") module.exports = class VerifyChannelCommand extends Command { constructor(client) { super(client, { name: "verifychannel", properName: "VerifyChannel", aliases: ["roververifychannel", "verificationchannel"], ...
javascript
Apache-2.0
49c55be0089433a15cee544d86d7d845532f6092
2026-01-05T03:37:01.581873Z
false
agenda/agenda-rest
https://github.com/agenda/agenda-rest/blob/45ff9a847c7e1f3bfdda11ed3227be77d83cd8eb/cli.js
cli.js
#!/usr/bin/env node const program = require("commander"); program .option("-u, --dburi <dburi>", "[optional] Full Mongo connection string") .option("-d, --dbname <dbname>", "[optional] Name of the Mongo database") .option("-h, --dbhost <dbhost>", "[optional] Mongo instance's IP") .option( "-p, --port <por...
javascript
MIT
45ff9a847c7e1f3bfdda11ed3227be77d83cd8eb
2026-01-05T03:37:01.539124Z
false
agenda/agenda-rest
https://github.com/agenda/agenda-rest/blob/45ff9a847c7e1f3bfdda11ed3227be77d83cd8eb/.eslintrc.js
.eslintrc.js
module.exports = { "env": { "browser": true, "es6": true }, "globals": { "Atomics": "readonly", "SharedArrayBuffer": "readonly" }, "parserOptions": { "ecmaVersion": 2018, "sourceType": "module" }, "rules": { } };
javascript
MIT
45ff9a847c7e1f3bfdda11ed3227be77d83cd8eb
2026-01-05T03:37:01.539124Z
false
agenda/agenda-rest
https://github.com/agenda/agenda-rest/blob/45ff9a847c7e1f3bfdda11ed3227be77d83cd8eb/test.js
test.js
import { promisify } from "util"; import test from "ava"; import request from "supertest"; import { bootstrapKoaApp, oncePerKey, AsyncCounter, buildUrlWithParams, buildUrlWithQuery, } from "./src/util"; const agendaAppUrl = "http://localhost:4041"; const testAppUrl = "http://localhost:4042"; const { app: tes...
javascript
MIT
45ff9a847c7e1f3bfdda11ed3227be77d83cd8eb
2026-01-05T03:37:01.539124Z
false
agenda/agenda-rest
https://github.com/agenda/agenda-rest/blob/45ff9a847c7e1f3bfdda11ed3227be77d83cd8eb/webpack.config.js
webpack.config.js
const path = require("path"); const fs = require("fs"); const mods = {}; fs.readdirSync("node_modules") .concat(["../settings"]) .filter((x) => ![".bin"].includes(x)) .forEach((mod) => { mods[mod] = "commonjs " + mod; }); const plugins = []; const config = { target: "node", entry: { "./dist/test"...
javascript
MIT
45ff9a847c7e1f3bfdda11ed3227be77d83cd8eb
2026-01-05T03:37:01.539124Z
false
agenda/agenda-rest
https://github.com/agenda/agenda-rest/blob/45ff9a847c7e1f3bfdda11ed3227be77d83cd8eb/settings.js
settings.js
let dbname = process.env.DB_NAME || "agenda"; let dbhost = process.env.DB_HOST || "localhost"; let dburi = process.env.DB_URI || null; let appId = process.env.API_KEY; let collection = "agendaJobs"; let definitions = "jobDefinitions"; let timeout = 5000; const settings = { get agendaMongoUrl() { return dburi ? d...
javascript
MIT
45ff9a847c7e1f3bfdda11ed3227be77d83cd8eb
2026-01-05T03:37:01.539124Z
false
agenda/agenda-rest
https://github.com/agenda/agenda-rest/blob/45ff9a847c7e1f3bfdda11ed3227be77d83cd8eb/src/index.js
src/index.js
import { promisify } from "util"; import Agenda from "agenda"; import settings from "../settings"; import { bootstrapKoaApp } from "./util"; import { defineJob, jobOperations, jobAssertions, promiseJobOperation, } from "./job"; const { app, router } = bootstrapKoaApp(); const agenda = new Agenda({ db: { ...
javascript
MIT
45ff9a847c7e1f3bfdda11ed3227be77d83cd8eb
2026-01-05T03:37:01.539124Z
false
agenda/agenda-rest
https://github.com/agenda/agenda-rest/blob/45ff9a847c7e1f3bfdda11ed3227be77d83cd8eb/src/job.js
src/job.js
import rp from "request-promise"; import settings from "../settings"; import { isValidDate, buildUrlWithParams, buildUrlWithQuery } from "./util"; const getCheckJobFormatFunction = (jobProperty, defaultJob = {}) => (job) => { if (!job.name || (jobProperty && !job[jobProperty])) { throw new Error( `expected...
javascript
MIT
45ff9a847c7e1f3bfdda11ed3227be77d83cd8eb
2026-01-05T03:37:01.539124Z
false
agenda/agenda-rest
https://github.com/agenda/agenda-rest/blob/45ff9a847c7e1f3bfdda11ed3227be77d83cd8eb/src/util.js
src/util.js
import Koa from "koa"; import logger from "koa-logger"; import Router from "koa-router"; import bodyParser from "koa-bodyparser"; import { items } from "pythonic"; import querystring from "querystring"; const bootstrapKoaApp = () => { const app = new Koa(); const router = new Router(); app.use(logger()); app.u...
javascript
MIT
45ff9a847c7e1f3bfdda11ed3227be77d83cd8eb
2026-01-05T03:37:01.539124Z
false
omnidan/redux-recycle
https://github.com/omnidan/redux-recycle/blob/0b1d646fed572fb9d73a4edc75bd8d4a6229b01e/src/index.js
src/index.js
// redux-recycle higher order reducer export default function recycleState (reducer, actions, initialState, config = {}) { const getInitialState = (typeof initialState === 'function') ? initialState : () => initialState const recycleActionType = (typeof config.recycleActionType === 'undefined') ? '@@redux-recycle/I...
javascript
MIT
0b1d646fed572fb9d73a4edc75bd8d4a6229b01e
2026-01-05T03:37:04.248539Z
false
omnidan/redux-recycle
https://github.com/omnidan/redux-recycle/blob/0b1d646fed572fb9d73a4edc75bd8d4a6229b01e/test/index.spec.js
test/index.spec.js
import { expect } from 'chai' import recycleState from '../src' describe('recycleState', () => { let reducer = function (state = 'INITIAL_STATE', action) { if (['KNOWN_ACTION', '@@redux-recycle/INIT', 'SPECIAL_RECYCLE_ACTION_NAME'].indexOf(action.type) > -1) { return { state, type: action.t...
javascript
MIT
0b1d646fed572fb9d73a4edc75bd8d4a6229b01e
2026-01-05T03:37:04.248539Z
false
cybercase/google-forms-html-exporter
https://github.com/cybercase/google-forms-html-exporter/blob/5d7bec825d7daf52b7ca245a6a56607150ddf6bb/gulpfile.js
gulpfile.js
// generated on 2017-06-08 using generator-webapp 3.0.0 const gulp = require('gulp'); const gulpLoadPlugins = require('gulp-load-plugins'); const browserSync = require('browser-sync').create(); const del = require('del'); const wiredep = require('wiredep').stream; const runSequence = require('run-sequence'); const $ =...
javascript
BSD-3-Clause
5d7bec825d7daf52b7ca245a6a56607150ddf6bb
2026-01-05T03:37:02.196288Z
false
cybercase/google-forms-html-exporter
https://github.com/cybercase/google-forms-html-exporter/blob/5d7bec825d7daf52b7ca245a6a56607150ddf6bb/app/scripts/main.js
app/scripts/main.js
$(function () { // enable bootstrap tooltips $('[data-toggle="tooltip"]').tooltip({trigger: 'manual'}) }) $('#example-action').click((event) => { event.preventDefault() let exampleUrl = $('#example-url').attr('href'); $('#input-url').val(exampleUrl) }) $('#input-url').keypress((event) => { if ...
javascript
BSD-3-Clause
5d7bec825d7daf52b7ca245a6a56607150ddf6bb
2026-01-05T03:37:02.196288Z
false
cybercase/google-forms-html-exporter
https://github.com/cybercase/google-forms-html-exporter/blob/5d7bec825d7daf52b7ca245a6a56607150ddf6bb/app/scripts/config.js
app/scripts/config.js
window.config = { serverAddress: 'https://lobster-app-wkszu.ondigitalocean.app' }
javascript
BSD-3-Clause
5d7bec825d7daf52b7ca245a6a56607150ddf6bb
2026-01-05T03:37:02.196288Z
false
cybercase/google-forms-html-exporter
https://github.com/cybercase/google-forms-html-exporter/blob/5d7bec825d7daf52b7ca245a6a56607150ddf6bb/app/scripts/templates.js
app/scripts/templates.js
const FieldTypes = [ 'short', // 0 'paragraph', // 1 'choices', // 2 'dropdown', // 3 'checkboxes', // 4 'linear', // 5 'title', // 6 'grid', // 7 'section', // 8 'date', // 9 'time', // 10 'image', // 11 'video', // 12 'upload', // 13 ] Handlebars.registerHelper...
javascript
BSD-3-Clause
5d7bec825d7daf52b7ca245a6a56607150ddf6bb
2026-01-05T03:37:02.196288Z
false
cybercase/google-forms-html-exporter
https://github.com/cybercase/google-forms-html-exporter/blob/5d7bec825d7daf52b7ca245a6a56607150ddf6bb/test/spec/test.js
test/spec/test.js
(function () { 'use strict'; describe('Give it some context', function () { describe('maybe a bit more context here', function () { it('should run here few assertions', function () { }); }); }); })();
javascript
BSD-3-Clause
5d7bec825d7daf52b7ca245a6a56607150ddf6bb
2026-01-05T03:37:02.196288Z
false
cybercase/google-forms-html-exporter
https://github.com/cybercase/google-forms-html-exporter/blob/5d7bec825d7daf52b7ca245a6a56607150ddf6bb/docs/scripts/vendor.js
docs/scripts/vendor.js
if(function(e,t){"use strict";"object"==typeof module&&"object"==typeof module.exports?module.exports=e.document?t(e,!0):function(e){if(!e.document)throw new Error("jQuery requires a window with a document");return t(e)}:t(e)}("undefined"!=typeof window?window:this,function(e,t){"use strict";function n(e,t,n){n=n||be;v...
javascript
BSD-3-Clause
5d7bec825d7daf52b7ca245a6a56607150ddf6bb
2026-01-05T03:37:02.196288Z
true
cybercase/google-forms-html-exporter
https://github.com/cybercase/google-forms-html-exporter/blob/5d7bec825d7daf52b7ca245a6a56607150ddf6bb/docs/scripts/plugins.js
docs/scripts/plugins.js
+function(t){"use strict";function e(e){return this.each(function(){var o=t(this),n=o.data("bs.tooltip"),s="object"==typeof e&&e;!n&&/destroy|hide/.test(e)||(n||o.data("bs.tooltip",n=new i(this,s)),"string"==typeof e&&n[e]())})}var i=function(t,e){this.type=null,this.options=null,this.enabled=null,this.timeout=null,thi...
javascript
BSD-3-Clause
5d7bec825d7daf52b7ca245a6a56607150ddf6bb
2026-01-05T03:37:02.196288Z
false
cybercase/google-forms-html-exporter
https://github.com/cybercase/google-forms-html-exporter/blob/5d7bec825d7daf52b7ca245a6a56607150ddf6bb/docs/scripts/main.js
docs/scripts/main.js
"use strict";function _toConsumableArray(e){if(Array.isArray(e)){for(var t=0,n=Array(e.length);t<e.length;t++)n[t]=e[t];return n}return Array.from(e)}var FieldTypes=["short","paragraph","choices","dropdown","checkboxes","linear","title","grid","section","date","time","image","video","upload"];Handlebars.registerHelper(...
javascript
BSD-3-Clause
5d7bec825d7daf52b7ca245a6a56607150ddf6bb
2026-01-05T03:37:02.196288Z
false
cybercase/google-forms-html-exporter
https://github.com/cybercase/google-forms-html-exporter/blob/5d7bec825d7daf52b7ca245a6a56607150ddf6bb/docs/scripts/config.js
docs/scripts/config.js
"use strict";window.config={serverAddress:"https://lobster-app-wkszu.ondigitalocean.app"};
javascript
BSD-3-Clause
5d7bec825d7daf52b7ca245a6a56607150ddf6bb
2026-01-05T03:37:02.196288Z
false
cybercase/google-forms-html-exporter
https://github.com/cybercase/google-forms-html-exporter/blob/5d7bec825d7daf52b7ca245a6a56607150ddf6bb/docs/scripts/vendor/modernizr.js
docs/scripts/vendor/modernizr.js
window.Modernizr=function(e,t,n){function r(e){g.cssText=e}function o(e,t){return r(E.join(e+";")+(t||""))}function a(e,t){return typeof e===t}function i(e,t){return!!~(""+e).indexOf(t)}function c(e,t){for(var r in e){var o=e[r];if(!i(o,"-")&&g[o]!==n)return"pfx"!=t||o}return!1}function s(e,t,r){for(var o in e){var i=t...
javascript
BSD-3-Clause
5d7bec825d7daf52b7ca245a6a56607150ddf6bb
2026-01-05T03:37:02.196288Z
false
mathisonian/command-exists
https://github.com/mathisonian/command-exists/blob/742a73d75e6ff737c35aa7c88d0828cbb0455811/index.js
index.js
module.exports = require('./lib/command-exists');
javascript
MIT
742a73d75e6ff737c35aa7c88d0828cbb0455811
2026-01-05T03:37:07.487418Z
false
mathisonian/command-exists
https://github.com/mathisonian/command-exists/blob/742a73d75e6ff737c35aa7c88d0828cbb0455811/test/executable-script.js
test/executable-script.js
javascript
MIT
742a73d75e6ff737c35aa7c88d0828cbb0455811
2026-01-05T03:37:07.487418Z
false
mathisonian/command-exists
https://github.com/mathisonian/command-exists/blob/742a73d75e6ff737c35aa7c88d0828cbb0455811/test/test.js
test/test.js
'use strict'; var expect = require('expect.js'); var commandExists = require('..'); var commandExistsSync = commandExists.sync; var resolve = require('path').resolve; var isUsingWindows = process.platform == 'win32' describe('commandExists', function(){ describe('async - callback', function() { it('it sho...
javascript
MIT
742a73d75e6ff737c35aa7c88d0828cbb0455811
2026-01-05T03:37:07.487418Z
false
mathisonian/command-exists
https://github.com/mathisonian/command-exists/blob/742a73d75e6ff737c35aa7c88d0828cbb0455811/test/non-executable-script.js
test/non-executable-script.js
javascript
MIT
742a73d75e6ff737c35aa7c88d0828cbb0455811
2026-01-05T03:37:07.487418Z
false
mathisonian/command-exists
https://github.com/mathisonian/command-exists/blob/742a73d75e6ff737c35aa7c88d0828cbb0455811/lib/command-exists.js
lib/command-exists.js
'use strict'; var exec = require('child_process').exec; var execSync = require('child_process').execSync; var fs = require('fs'); var path = require('path'); var access = fs.access; var accessSync = fs.accessSync; var constants = fs.constants || fs; var isUsingWindows = process.platform == 'win32' var fileNotExists ...
javascript
MIT
742a73d75e6ff737c35aa7c88d0828cbb0455811
2026-01-05T03:37:07.487418Z
false
kolodny/zerobox
https://github.com/kolodny/zerobox/blob/63670d7d301ee16679fbdc47d22e9332952da324/zerobox.js
zerobox.js
/** * Zerobox - Lightweight lightbox plugin for jQuery * * @link https://github.com/kolodny/zerobox */ /* * Copyright (C) 2012 Moshe Kolodny * * 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...
javascript
MIT
63670d7d301ee16679fbdc47d22e9332952da324
2026-01-05T03:37:08.320011Z
false
kolodny/zerobox
https://github.com/kolodny/zerobox/blob/63670d7d301ee16679fbdc47d22e9332952da324/Gruntfile.js
Gruntfile.js
module.exports = function (grunt) { grunt.loadNpmTasks('grunt-contrib-uglify'); grunt.loadNpmTasks('grunt-contrib-copy'); grunt.loadNpmTasks('grunt-contrib-jshint'); grunt.loadNpmTasks('grunt-bumpup'); grunt.loadNpmTasks('grunt-jsdoc'); grunt.loadNpmTasks('grunt-tagrelease'); grunt.initConf...
javascript
MIT
63670d7d301ee16679fbdc47d22e9332952da324
2026-01-05T03:37:08.320011Z
false
meooow25/carrot
https://github.com/meooow25/carrot/blob/e615e1783d1f142829f018ea703c13a1abaa2c49/carrot/src/content/content.js
carrot/src/content/content.js
const PING_INTERVAL = 3 * 60 * 1000; // 3 minutes const PREDICT_TEXT_ID = 'carrot-predict-text'; const DISPLAY_NONE_CLS = 'carrot-display-none'; const Unicode = { BLACK_CURVED_RIGHTWARDS_AND_UPWARDS_ARROW: '\u2BAD', GREEK_CAPITAL_DELTA: '\u0394', GREEK_CAPITAL_PI: '\u03A0', INFINITY: '\u221E', SLANTED_NORT...
javascript
MIT
e615e1783d1f142829f018ea703c13a1abaa2c49
2026-01-05T03:37:08.979287Z
false
meooow25/carrot
https://github.com/meooow25/carrot/blob/e615e1783d1f142829f018ea703c13a1abaa2c49/carrot/src/util/conv.js
carrot/src/util/conv.js
/** * Performs convolution of real sequences using Cooley-Tukey FFT in O(n log n). * * >> const fftConv = new FFTConv(8); // Initialized with n = 8 * >> const a = [0.125, 0.25, 0.5]; * >> const b = [4, 3, 2, 1]; * >> const res = fftConv.convolve(a, b); // a.length + b.length - 1 must be <= n * >> // expected r...
javascript
MIT
e615e1783d1f142829f018ea703c13a1abaa2c49
2026-01-05T03:37:08.979287Z
false
meooow25/carrot
https://github.com/meooow25/carrot/blob/e615e1783d1f142829f018ea703c13a1abaa2c49/carrot/src/util/version-compare.js
carrot/src/util/version-compare.js
/** * Compares version strings that are '.'-separated integers. */ export default function compareVersions(version1, version2) { let s1 = version1.split('.'); let s2 = version2.split('.'); for (let i = 0; i < s1.length || i < s2.length; i++) { let v1 = Number(s1[i] || 0); let v2 = Number(s2[i] || 0); ...
javascript
MIT
e615e1783d1f142829f018ea703c13a1abaa2c49
2026-01-05T03:37:08.979287Z
false
meooow25/carrot
https://github.com/meooow25/carrot/blob/e615e1783d1f142829f018ea703c13a1abaa2c49/carrot/src/util/lock.js
carrot/src/util/lock.js
/** * A lock for async code. */ export default class Lock { constructor() { this.queue = []; this.locked = false; } async acquire() { if (this.locked) { await new Promise(resolve => { this.queue.push(resolve); }); } this.locked = true; } release() { if (!this.locked) { ...
javascript
MIT
e615e1783d1f142829f018ea703c13a1abaa2c49
2026-01-05T03:37:08.979287Z
false
meooow25/carrot
https://github.com/meooow25/carrot/blob/e615e1783d1f142829f018ea703c13a1abaa2c49/carrot/src/util/storage-wrapper.js
carrot/src/util/storage-wrapper.js
/** * Convenience wrapper around browser.storage. */ class StorageWrapper { constructor(storageName) { this.storageName = storageName; } async get(key, defaultValue) { const obj = await browser.storage[this.storageName].get(key); const value = obj[key]; return value !== undefined ? value : defa...
javascript
MIT
e615e1783d1f142829f018ea703c13a1abaa2c49
2026-01-05T03:37:08.979287Z
false
meooow25/carrot
https://github.com/meooow25/carrot/blob/e615e1783d1f142829f018ea703c13a1abaa2c49/carrot/src/util/settings.js
carrot/src/util/settings.js
import { SYNC } from './storage-wrapper.js'; /** * Exports utility functions to get or set user preferences to storage. */ function boolSetterGetter(key, defaultValue) { return async (value = undefined) => { if (value === undefined) { return await SYNC.get(key, !!defaultValue); } return await SY...
javascript
MIT
e615e1783d1f142829f018ea703c13a1abaa2c49
2026-01-05T03:37:08.979287Z
false
meooow25/carrot
https://github.com/meooow25/carrot/blob/e615e1783d1f142829f018ea703c13a1abaa2c49/carrot/src/util/binsearch.js
carrot/src/util/binsearch.js
/** * Binary search on integers in [left, right) for the first value for which predicate returns true. */ export default function binarySearch(left, right, predicate) { if (left > right) { throw new Error(`left ${left} must be <= right ${right}`); } while (left < right) { const mid = Math....
javascript
MIT
e615e1783d1f142829f018ea703c13a1abaa2c49
2026-01-05T03:37:08.979287Z
false
meooow25/carrot
https://github.com/meooow25/carrot/blob/e615e1783d1f142829f018ea703c13a1abaa2c49/carrot/src/background/predict-response.js
carrot/src/background/predict-response.js
import { Rank } from './rank.js'; class PredictResponseRow { constructor(delta, rank, performance, newRank, deltaReqForRankUp, nextRank) { this.delta = delta; this.rank = rank; this.performance = performance; // For FINAL this.newRank = newRank; // For PREDICTED this.deltaReqForRankUp =...
javascript
MIT
e615e1783d1f142829f018ea703c13a1abaa2c49
2026-01-05T03:37:08.979287Z
false
meooow25/carrot
https://github.com/meooow25/carrot/blob/e615e1783d1f142829f018ea703c13a1abaa2c49/carrot/src/background/predict.js
carrot/src/background/predict.js
import FFTConv from '../util/conv.js'; import binarySearch from '../util/binsearch.js' /** * Rating calculation code adapted from TLE at * https://github.com/cheran-senthil/TLE/blob/master/tle/util/ranklist/rating_calculator.py * originally developed by algmyr (https://github.com/algmyr) based on code by Mike Mirza...
javascript
MIT
e615e1783d1f142829f018ea703c13a1abaa2c49
2026-01-05T03:37:08.979287Z
false
meooow25/carrot
https://github.com/meooow25/carrot/blob/e615e1783d1f142829f018ea703c13a1abaa2c49/carrot/src/background/background.js
carrot/src/background/background.js
import { LOCAL } from '../util/storage-wrapper.js'; import * as settings from '../util/settings.js'; import Contests from './cache/contests.js'; import { Contest, ContestsComplete } from './cache/contests-complete.js'; import Ratings from './cache/ratings.js'; import TopLevelCache from './cache/top-level-cache.js'; imp...
javascript
MIT
e615e1783d1f142829f018ea703c13a1abaa2c49
2026-01-05T03:37:08.979287Z
false
meooow25/carrot
https://github.com/meooow25/carrot/blob/e615e1783d1f142829f018ea703c13a1abaa2c49/carrot/src/background/cf-api.js
carrot/src/background/cf-api.js
/** * Utility to fetch data from the Codeforces API. */ export class Api { constructor(fetchFromContentScript) { // We fetch from the content script as a workaround for CF putting API // endpoints behind a Cloudflare human check. The content script should // have the necessary cookies to get through and...
javascript
MIT
e615e1783d1f142829f018ea703c13a1abaa2c49
2026-01-05T03:37:08.979287Z
false
meooow25/carrot
https://github.com/meooow25/carrot/blob/e615e1783d1f142829f018ea703c13a1abaa2c49/carrot/src/background/rank.js
carrot/src/background/rank.js
/** * Encapsulates a Codeforces rank. */ export class Rank { constructor(name, abbr, low, high, colorClass) { this.name = name; this.abbr = abbr; this.low = low; this.high = high; this.colorClass = colorClass; } static forRating(rating) { if (rating == null) { return Rank.UNRATED;...
javascript
MIT
e615e1783d1f142829f018ea703c13a1abaa2c49
2026-01-05T03:37:08.979287Z
false
meooow25/carrot
https://github.com/meooow25/carrot/blob/e615e1783d1f142829f018ea703c13a1abaa2c49/carrot/src/background/cache/ratings.js
carrot/src/background/cache/ratings.js
import Lock from '../../util/lock.js'; const PREFETCH_INTERVAL = 60 * 60 * 1000; // 1 hour const RATINGS_TIMESTAMP = 'cache.ratings.timestamp'; const RATINGS = 'cache.ratings'; /** * Browser storage cache of user ratings. Ratings of all users are cached because user.info API * endpoint does not work with a large ...
javascript
MIT
e615e1783d1f142829f018ea703c13a1abaa2c49
2026-01-05T03:37:08.979287Z
false
meooow25/carrot
https://github.com/meooow25/carrot/blob/e615e1783d1f142829f018ea703c13a1abaa2c49/carrot/src/background/cache/top-level-cache.js
carrot/src/background/cache/top-level-cache.js
const TIMEOUT = 30 * 1000; // 30 seconds /** * Short time cache on the response to a prediction request. * Useful if the user repeatedly reloads a tab or opens multiple tabs to the same ranklist in a * short period of time, the same predictions will be sent to all. */ export default class TopLevelCache { constr...
javascript
MIT
e615e1783d1f142829f018ea703c13a1abaa2c49
2026-01-05T03:37:08.979287Z
false
meooow25/carrot
https://github.com/meooow25/carrot/blob/e615e1783d1f142829f018ea703c13a1abaa2c49/carrot/src/background/cache/contests.js
carrot/src/background/cache/contests.js
import Lock from '../../util/lock.js'; const REFRESH_INTERVAL = 6 * 60 * 60 * 1000; // 6 hours const CONTESTS_KEY = 'cache.contests'; const CONTESTS_LAST_ATTEMPT_TIME_KEY = 'cache.contests_last_attempt_time'; /** * Cache of contest infos. */ export default class Contests { constructor(api, storage) { this.a...
javascript
MIT
e615e1783d1f142829f018ea703c13a1abaa2c49
2026-01-05T03:37:08.979287Z
false
meooow25/carrot
https://github.com/meooow25/carrot/blob/e615e1783d1f142829f018ea703c13a1abaa2c49/carrot/src/background/cache/contests-complete.js
carrot/src/background/cache/contests-complete.js
/** * Wrapper for all useful contest data. */ export class Contest { constructor(contest, problems, rows, ratingChanges, oldRatings, fetchTime, isRated) { this.contest = contest; this.problems = problems; this.rows = rows; this.ratingChanges = ratingChanges; // undefined if isRated is not YES th...
javascript
MIT
e615e1783d1f142829f018ea703c13a1abaa2c49
2026-01-05T03:37:08.979287Z
false
meooow25/carrot
https://github.com/meooow25/carrot/blob/e615e1783d1f142829f018ea703c13a1abaa2c49/carrot/src/options/options.js
carrot/src/options/options.js
import * as settings from '../util/settings.js'; async function setup() { const predict = document.querySelector('#enable-predict-deltas'); const final = document.querySelector('#enable-final-deltas'); const prefetch = document.querySelector('#enable-prefetch-ratings'); async function update() { predict.c...
javascript
MIT
e615e1783d1f142829f018ea703c13a1abaa2c49
2026-01-05T03:37:08.979287Z
false
meooow25/carrot
https://github.com/meooow25/carrot/blob/e615e1783d1f142829f018ea703c13a1abaa2c49/carrot/src/popup/popup.js
carrot/src/popup/popup.js
import * as settings from '../util/settings.js'; const Unicode = { HORIZONTAL_ELLIPSIS: '\u2026', }; async function makeList(cols, changeCallback) { const ul = document.createElement('ul'); for (const col of cols) { const setterGetter = settings[col.setting]; const input = document.createElement('input...
javascript
MIT
e615e1783d1f142829f018ea703c13a1abaa2c49
2026-01-05T03:37:08.979287Z
false
arunoda/meteor-smart-collections
https://github.com/arunoda/meteor-smart-collections/blob/a41d13f49af5108b9ec4b0c13847dfab7b8b3912/package.js
package.js
Package.describe({ "summery": "Smart Mongo Collection Implementation" }); Npm.depends({ 'mongodb': '1.3.23', 'debug': '0.7.2' }); Package.on_use(function(api) { api.use(['minimongo', 'livedata', 'mongo-livedata', 'ejson', 'underscore'], ['client', 'server']); api.add_files([ 'lib/validator.js', 'lib...
javascript
MIT
a41d13f49af5108b9ec4b0c13847dfab7b8b3912
2026-01-05T03:37:12.054538Z
false
arunoda/meteor-smart-collections
https://github.com/arunoda/meteor-smart-collections/blob/a41d13f49af5108b9ec4b0c13847dfab7b8b3912/laika/tests/loader.js
laika/tests/loader.js
Npm = {require: require}; Meteor = {}; module.exports = function loader(module) { require('../../' + module); };
javascript
MIT
a41d13f49af5108b9ec4b0c13847dfab7b8b3912
2026-01-05T03:37:12.054538Z
false
arunoda/meteor-smart-collections
https://github.com/arunoda/meteor-smart-collections/blob/a41d13f49af5108b9ec4b0c13847dfab7b8b3912/laika/tests/common.js
laika/tests/common.js
doAutoPublish = function() { if(Meteor.default_server && Meteor.default_server.autopublish) { Meteor.default_server.autopublish(); } else { Package = {autopublish: true}; } emit('return'); }
javascript
MIT
a41d13f49af5108b9ec4b0c13847dfab7b8b3912
2026-01-05T03:37:12.054538Z
false
arunoda/meteor-smart-collections
https://github.com/arunoda/meteor-smart-collections/blob/a41d13f49af5108b9ec4b0c13847dfab7b8b3912/laika/tests/op_queue.js
laika/tests/op_queue.js
var assert = require('assert'); global._ = require('../../node_modules/underscore'); require('./loader')('lib/op_queue.js'); suite('OpQueue', function() { suite('IdUpdateQueue', function() { test('push and start', function(done) { var results = []; var invalidator = { _collection: {name: 'col...
javascript
MIT
a41d13f49af5108b9ec4b0c13847dfab7b8b3912
2026-01-05T03:37:12.054538Z
false
arunoda/meteor-smart-collections
https://github.com/arunoda/meteor-smart-collections/blob/a41d13f49af5108b9ec4b0c13847dfab7b8b3912/laika/tests/oplog.js
laika/tests/oplog.js
var assert = require('assert'); require('./loader')('lib/oplog.js'); suite('Oplog Processor', function() { test('insert', function(done) { var op = { "ns" : "db.aa", "op": 'i', "o" : { "_id" : 'the-id', "a" : 100 } }; Meteor.SmartCollection = { map: { ...
javascript
MIT
a41d13f49af5108b9ec4b0c13847dfab7b8b3912
2026-01-05T03:37:12.054538Z
false
arunoda/meteor-smart-collections
https://github.com/arunoda/meteor-smart-collections/blob/a41d13f49af5108b9ec4b0c13847dfab7b8b3912/laika/tests/observer.js
laika/tests/observer.js
var assert = require('assert'); suite('Observer', function() { suite('changes', function() { test('added', function(done, server) { var added = server.evalSync(function() { var added = []; var callbacks = { added: function(id, doc) { added.push([id, doc]); } ...
javascript
MIT
a41d13f49af5108b9ec4b0c13847dfab7b8b3912
2026-01-05T03:37:12.054538Z
false
arunoda/meteor-smart-collections
https://github.com/arunoda/meteor-smart-collections/blob/a41d13f49af5108b9ec4b0c13847dfab7b8b3912/laika/tests/validator.js
laika/tests/validator.js
var assert = require('assert'); require('./loader')('lib/validator'); suite('Validator', function() { test('logic - no deny - first allow', function() { var v = new Meteor.SmartValidator(); v.register('deny', function() { return false; }); v.register('deny', function() { return false; }); v.register(...
javascript
MIT
a41d13f49af5108b9ec4b0c13847dfab7b8b3912
2026-01-05T03:37:12.054538Z
false
arunoda/meteor-smart-collections
https://github.com/arunoda/meteor-smart-collections/blob/a41d13f49af5108b9ec4b0c13847dfab7b8b3912/laika/tests/query/callbacks.js
laika/tests/query/callbacks.js
var assert = require('assert'); suite('Query - Callback', function() { test('callback fires', function(done, server) { server.evalSync(function() { coll = new Meteor.SmartCollection('coll'); query = new Meteor.SmartQuery(coll, {}); coll.remove({tt: 0}); query.snapshot(function() { ...
javascript
MIT
a41d13f49af5108b9ec4b0c13847dfab7b8b3912
2026-01-05T03:37:12.054538Z
false
arunoda/meteor-smart-collections
https://github.com/arunoda/meteor-smart-collections/blob/a41d13f49af5108b9ec4b0c13847dfab7b8b3912/laika/tests/query/observers.js
laika/tests/query/observers.js
var assert = require('assert'); suite('Query - Observers', function() { // test('added', function(done, server) { // var results = server.evalSync(function() { // coll = new Meteor.SmartCollection('coll'); // query = new Meteor.SmartQuery(coll, {aa: '_aa'}); // coll.insert({_id: 'one', aa: '_a...
javascript
MIT
a41d13f49af5108b9ec4b0c13847dfab7b8b3912
2026-01-05T03:37:12.054538Z
false
arunoda/meteor-smart-collections
https://github.com/arunoda/meteor-smart-collections/blob/a41d13f49af5108b9ec4b0c13847dfab7b8b3912/laika/tests/query/cache.js
laika/tests/query/cache.js
var assert = require('assert'); suite('Query - Cache', function() { suite('._getChanges', function() { test('new fields in newDoc', function(done, server) { var changes = server.evalSync(function() { var oldDoc = {aa: 10}; var newDoc = {aa: 10, bb: 'cc'}; var changes = Meteor.Smart...
javascript
MIT
a41d13f49af5108b9ec4b0c13847dfab7b8b3912
2026-01-05T03:37:12.054538Z
false
arunoda/meteor-smart-collections
https://github.com/arunoda/meteor-smart-collections/blob/a41d13f49af5108b9ec4b0c13847dfab7b8b3912/laika/tests/query/limit_sort.js
laika/tests/query/limit_sort.js
var assert = require('assert'); suite('Query - Limit Sort', function() { test('sort properties', function(done, server) { var query = server.evalSync(function() { coll = new Meteor.SmartCollection('coll'); query = new Meteor.SmartQuery(coll, {}, {sort: {aa: 1, bb: -1}}); Meteor.setTimeout(fu...
javascript
MIT
a41d13f49af5108b9ec4b0c13847dfab7b8b3912
2026-01-05T03:37:12.054538Z
false
arunoda/meteor-smart-collections
https://github.com/arunoda/meteor-smart-collections/blob/a41d13f49af5108b9ec4b0c13847dfab7b8b3912/laika/tests/query/fields.js
laika/tests/query/fields.js
var assert = require('assert'); require('../common'); suite('Query - Fields Filtering', function() { suite('._raw*', function() { test('._rawAdded', function(done, server, client) { var docMap = server.evalSync(function() { var coll = new Meteor.SmartCollection('coll'); var query = new Mete...
javascript
MIT
a41d13f49af5108b9ec4b0c13847dfab7b8b3912
2026-01-05T03:37:12.054538Z
false
arunoda/meteor-smart-collections
https://github.com/arunoda/meteor-smart-collections/blob/a41d13f49af5108b9ec4b0c13847dfab7b8b3912/laika/tests/query/changes.js
laika/tests/query/changes.js
var assert = require('assert'); suite('Query - Changes', function() { test('added', function(done, server) { var results = server.evalSync(function() { coll = new Meteor.SmartCollection('coll'); query = new Meteor.SmartQuery(coll, {}); //just wait for getting connected coll.remove('no-id...
javascript
MIT
a41d13f49af5108b9ec4b0c13847dfab7b8b3912
2026-01-05T03:37:12.054538Z
false
arunoda/meteor-smart-collections
https://github.com/arunoda/meteor-smart-collections/blob/a41d13f49af5108b9ec4b0c13847dfab7b8b3912/laika/tests/query/limit_only.js
laika/tests/query/limit_only.js
var assert = require('assert'); suite('Query - Limit Only', function() { test('snapshot with limit', function(done, server) { var results = server.evalSync(function() { coll = new Meteor.SmartCollection('coll'); query = new Meteor.SmartQuery(coll, {}, {limit: 3}); coll.insert({_id: 'one', aa: ...
javascript
MIT
a41d13f49af5108b9ec4b0c13847dfab7b8b3912
2026-01-05T03:37:12.054538Z
false
arunoda/meteor-smart-collections
https://github.com/arunoda/meteor-smart-collections/blob/a41d13f49af5108b9ec4b0c13847dfab7b8b3912/laika/tests/query/snapshots.js
laika/tests/query/snapshots.js
var assert = require('assert'); suite('Query - Snapshots', function() { test('adding new observer', function(done, server) { var results = server.evalSync(function() { coll = new Meteor.SmartCollection('coll'); query = new Meteor.SmartQuery(coll, {aa: '_aa'}); coll.insert({_id: 'one', aa: '_aa...
javascript
MIT
a41d13f49af5108b9ec4b0c13847dfab7b8b3912
2026-01-05T03:37:12.054538Z
false
arunoda/meteor-smart-collections
https://github.com/arunoda/meteor-smart-collections/blob/a41d13f49af5108b9ec4b0c13847dfab7b8b3912/laika/tests/query/static.js
laika/tests/query/static.js
var assert = require('assert'); suite('Query - Static', function() { test('with pending observer', function(done, server) { var count = server.evalSync(function() { coll = new Meteor.SmartCollection('coll'); query = new Meteor.SmartQuery(coll, {}); var afterSnapshotCallback; query.snapsh...
javascript
MIT
a41d13f49af5108b9ec4b0c13847dfab7b8b3912
2026-01-05T03:37:12.054538Z
false
arunoda/meteor-smart-collections
https://github.com/arunoda/meteor-smart-collections/blob/a41d13f49af5108b9ec4b0c13847dfab7b8b3912/laika/tests/query/projection/filter.js
laika/tests/query/projection/filter.js
var assert = require('assert'); require('../../common'); global._ = require('../../../../node_modules/underscore'); require('../../loader')('lib/projector'); suite('Projecor.filter', function() { test('without field filtering', function() { var projector = new Meteor.SmartProjector({}); var filetedObject = p...
javascript
MIT
a41d13f49af5108b9ec4b0c13847dfab7b8b3912
2026-01-05T03:37:12.054538Z
false
arunoda/meteor-smart-collections
https://github.com/arunoda/meteor-smart-collections/blob/a41d13f49af5108b9ec4b0c13847dfab7b8b3912/laika/tests/query/projection/compileFields.js
laika/tests/query/projection/compileFields.js
var assert = require('assert'); require('../../common'); suite('Projecor._compileFields', function() { test('with inclusion', function(done, server) { var info = server.evalSync(function() { var info = Meteor.SmartProjector.prototype._compileFields({aa: 1, bb: 1}); emit('return', info); }); ...
javascript
MIT
a41d13f49af5108b9ec4b0c13847dfab7b8b3912
2026-01-05T03:37:12.054538Z
false
arunoda/meteor-smart-collections
https://github.com/arunoda/meteor-smart-collections/blob/a41d13f49af5108b9ec4b0c13847dfab7b8b3912/laika/tests/query/projection/coverage.js
laika/tests/query/projection/coverage.js
var assert = require('assert'); suite('Projection - Coverage', function() { suite('supported', function() { test('top level fields', function(done, server) { server.evalSync(function() { var projection = {'aa': 1, 'bb': 1}; var coll = new Meteor.SmartCollection('coll'); coll.find({}...
javascript
MIT
a41d13f49af5108b9ec4b0c13847dfab7b8b3912
2026-01-05T03:37:12.054538Z
false
arunoda/meteor-smart-collections
https://github.com/arunoda/meteor-smart-collections/blob/a41d13f49af5108b9ec4b0c13847dfab7b8b3912/laika/tests/cursor/publish.js
laika/tests/cursor/publish.js
var assert = require('assert'); suite('Cursor - Publish', function() { test('send new docs', function(done, server, client) { server.evalSync(function() { coll = new Meteor.SmartCollection('coll'); Meteor.publish('smart-data', function() { return coll.find(); }); emit('return'); ...
javascript
MIT
a41d13f49af5108b9ec4b0c13847dfab7b8b3912
2026-01-05T03:37:12.054538Z
false
arunoda/meteor-smart-collections
https://github.com/arunoda/meteor-smart-collections/blob/a41d13f49af5108b9ec4b0c13847dfab7b8b3912/laika/tests/cursor/static_methods.js
laika/tests/cursor/static_methods.js
var assert = require('assert'); createCollWithData = function(data) { var Fibers = Npm.require('fibers'); Fibers(function() { coll = new Meteor.SmartCollection('abc'); for(var lc =0; lc<data.length; lc++) { coll.insert(data[lc]); } emit('return'); }).run(); } suite('Cursor - Static Methods...
javascript
MIT
a41d13f49af5108b9ec4b0c13847dfab7b8b3912
2026-01-05T03:37:12.054538Z
false
arunoda/meteor-smart-collections
https://github.com/arunoda/meteor-smart-collections/blob/a41d13f49af5108b9ec4b0c13847dfab7b8b3912/laika/tests/cursor/observations.js
laika/tests/cursor/observations.js
var assert = require('assert'); createCollWithData = function(data) { var Fibers = Npm.require('fibers'); Fibers(function() { coll = new Meteor.SmartCollection('abc'); for(var lc =0; lc<data.length; lc++) { coll.insert(data[lc]); } emit('return'); }).run(); } suite('Cursor - .observeChange...
javascript
MIT
a41d13f49af5108b9ec4b0c13847dfab7b8b3912
2026-01-05T03:37:12.054538Z
false
arunoda/meteor-smart-collections
https://github.com/arunoda/meteor-smart-collections/blob/a41d13f49af5108b9ec4b0c13847dfab7b8b3912/laika/tests/client_collection/write_operations.js
laika/tests/client_collection/write_operations.js
var assert = require('assert'); suite('Client Collection - Write Operations', function() { suite('insert', function() { test('correct insert', function(done, server, client) { server.evalSync(function() { Meteor.Collection.insecure = true; coll = new Meteor.SmartCollection('coll'); ...
javascript
MIT
a41d13f49af5108b9ec4b0c13847dfab7b8b3912
2026-01-05T03:37:12.054538Z
false
arunoda/meteor-smart-collections
https://github.com/arunoda/meteor-smart-collections/blob/a41d13f49af5108b9ec4b0c13847dfab7b8b3912/laika/tests/client_collection/session_view.js
laika/tests/client_collection/session_view.js
/* We need to make sure when two subscription sending `added` twice. Client must not get it twice, rather it should receive changes in the second time */ var assert = require('assert'); suite('Session View', function() { test('two subscriptions', function(done, server, client) { server.evalSync(function() {...
javascript
MIT
a41d13f49af5108b9ec4b0c13847dfab7b8b3912
2026-01-05T03:37:12.054538Z
false
arunoda/meteor-smart-collections
https://github.com/arunoda/meteor-smart-collections/blob/a41d13f49af5108b9ec4b0c13847dfab7b8b3912/laika/tests/client_collection/permissions.js
laika/tests/client_collection/permissions.js
var assert = require('assert'); suite('Client Collection - Permissions(no insecure)', function() { suite('insert', function() { test('access granted', function(done, server, client) { server.evalSync(function() { coll = new Meteor.SmartCollection('coll'); coll.allow({ insert: func...
javascript
MIT
a41d13f49af5108b9ec4b0c13847dfab7b8b3912
2026-01-05T03:37:12.054538Z
false
arunoda/meteor-smart-collections
https://github.com/arunoda/meteor-smart-collections/blob/a41d13f49af5108b9ec4b0c13847dfab7b8b3912/laika/tests/client_collection/simulations.js
laika/tests/client_collection/simulations.js
var assert = require('assert'); suite('Client Collection - Simulations', function() { test('insert simulations', function(done, server, client) { server.evalSync(function() { coll = new Meteor.SmartCollection('aa'); Meteor.publish('coll', function() { return coll.find(); }); Mete...
javascript
MIT
a41d13f49af5108b9ec4b0c13847dfab7b8b3912
2026-01-05T03:37:12.054538Z
false
arunoda/meteor-smart-collections
https://github.com/arunoda/meteor-smart-collections/blob/a41d13f49af5108b9ec4b0c13847dfab7b8b3912/laika/tests/client_collection/subscribing.js
laika/tests/client_collection/subscribing.js
var assert = require('assert'); suite('Client Collection - Find and Client Cursors', function() { test('send new docs', function(done, server, client) { server.evalSync(function() { coll = new Meteor.SmartCollection('coll'); Meteor.publish('smart-data', function() { return coll.find(); ...
javascript
MIT
a41d13f49af5108b9ec4b0c13847dfab7b8b3912
2026-01-05T03:37:12.054538Z
false
arunoda/meteor-smart-collections
https://github.com/arunoda/meteor-smart-collections/blob/a41d13f49af5108b9ec4b0c13847dfab7b8b3912/laika/tests/invalidator/invalidations.js
laika/tests/invalidator/invalidations.js
var assert = require('assert'); suite('Invalidator - Invalidations', function() { suite('insert', function() { test('matched', function(done, server) { var doc = server.evalSync(function() { var coll = new Meteor.SmartCollection('coll'); var invalidator = new Meteor.SmartInvalidator(coll); ...
javascript
MIT
a41d13f49af5108b9ec4b0c13847dfab7b8b3912
2026-01-05T03:37:12.054538Z
false
arunoda/meteor-smart-collections
https://github.com/arunoda/meteor-smart-collections/blob/a41d13f49af5108b9ec4b0c13847dfab7b8b3912/laika/tests/invalidator/query.js
laika/tests/invalidator/query.js
var assert = require('assert'); suite('Invalidator - Query', function() { test('single query', function(done, server) { var results = server.evalSync(function() { var coll = {dumb: true}; var invalidator = new Meteor.SmartInvalidator(coll); var query = invalidator.initiateQuery({aa: 10}); ...
javascript
MIT
a41d13f49af5108b9ec4b0c13847dfab7b8b3912
2026-01-05T03:37:12.054538Z
false
arunoda/meteor-smart-collections
https://github.com/arunoda/meteor-smart-collections/blob/a41d13f49af5108b9ec4b0c13847dfab7b8b3912/laika/tests/invalidator/update_modifier_to_fields.js
laika/tests/invalidator/update_modifier_to_fields.js
var assert = require('assert'); global._ = require('../../../node_modules/underscore'); require('../loader')('lib/invalidator.js'); suite('Invalidator - .updateModifierToFields()', function() { test('update only operations', function() { var modifier = {$set: {aa: 10, bb: 20}}; var fields = new Meteor.SmartI...
javascript
MIT
a41d13f49af5108b9ec4b0c13847dfab7b8b3912
2026-01-05T03:37:12.054538Z
false
arunoda/meteor-smart-collections
https://github.com/arunoda/meteor-smart-collections/blob/a41d13f49af5108b9ec4b0c13847dfab7b8b3912/laika/tests/transform/client.js
laika/tests/transform/client.js
var assert = require('assert'); suite('Transform - Client', function() { suite('Collection Level', function() { test('fetch', function(done, server, client) { server.evalSync(function() { coll = new Meteor.SmartCollection('coll'); coll.insert({_id: 'pp', aa: 400}); Meteor.publish('s...
javascript
MIT
a41d13f49af5108b9ec4b0c13847dfab7b8b3912
2026-01-05T03:37:12.054538Z
false
arunoda/meteor-smart-collections
https://github.com/arunoda/meteor-smart-collections/blob/a41d13f49af5108b9ec4b0c13847dfab7b8b3912/laika/tests/transform/server.js
laika/tests/transform/server.js
var assert = require('assert'); suite('Transform Server', function() { suite('Collection Level', function() { test('findOne', function(done, server, client) { var doc = server.evalSync(function() { cx = new Meteor.SmartCollection('cx'); cx.insert({_id: 'aa', aa: 20}); coll = new Me...
javascript
MIT
a41d13f49af5108b9ec4b0c13847dfab7b8b3912
2026-01-05T03:37:12.054538Z
false
arunoda/meteor-smart-collections
https://github.com/arunoda/meteor-smart-collections/blob/a41d13f49af5108b9ec4b0c13847dfab7b8b3912/laika/tests/server_collection/public_methods.js
laika/tests/server_collection/public_methods.js
var assert = require('assert'); getDoc = function (query) { coll._collection.findOne(query, function(err, data) { emit('return', data); }); } suite('Server Public Methods', function() { test('insert', function(done, server) { var error = server.evalSync(function() { coll = new Meteor.SmartCollecti...
javascript
MIT
a41d13f49af5108b9ec4b0c13847dfab7b8b3912
2026-01-05T03:37:12.054538Z
false
arunoda/meteor-smart-collections
https://github.com/arunoda/meteor-smart-collections/blob/a41d13f49af5108b9ec4b0c13847dfab7b8b3912/laika/tests/server_collection/normalize_selectors.js
laika/tests/server_collection/normalize_selectors.js
var assert = require('assert'); suite('Normalize Selectors', function() { test('null', function(done, server) { var result = server.evalSync(function() { coll = new Meteor.SmartCollection('coll'); var rtn = coll._normalizeSelector(null); emit('return', rtn); }); assert.deepEqual(result...
javascript
MIT
a41d13f49af5108b9ec4b0c13847dfab7b8b3912
2026-01-05T03:37:12.054538Z
false
arunoda/meteor-smart-collections
https://github.com/arunoda/meteor-smart-collections/blob/a41d13f49af5108b9ec4b0c13847dfab7b8b3912/laika/tests/server_collection/observing.js
laika/tests/server_collection/observing.js
var assert = require('assert'); suite('Collection - Observing(Integration)', function() { test('insert doc', function(done, server) { server.evalSync(function() { var Fibers = Npm.require('fibers'); Fibers(function() { coll = new Meteor.SmartCollection('abccdef'); cursor = coll.find({...
javascript
MIT
a41d13f49af5108b9ec4b0c13847dfab7b8b3912
2026-01-05T03:37:12.054538Z
false
arunoda/meteor-smart-collections
https://github.com/arunoda/meteor-smart-collections/blob/a41d13f49af5108b9ec4b0c13847dfab7b8b3912/laika/tests/server_collection/nowrites.js
laika/tests/server_collection/nowrites.js
var assert = require('assert'); suite('No Writes', function() { //some times if there is a write op, nothing has been written, handle them test('correct update usind id string', function(done, server, client) { server.evalSync(function() { Meteor.Collection.insecure = true; Meteor.SmartMongo.oplog ...
javascript
MIT
a41d13f49af5108b9ec4b0c13847dfab7b8b3912
2026-01-05T03:37:12.054538Z
false
arunoda/meteor-smart-collections
https://github.com/arunoda/meteor-smart-collections/blob/a41d13f49af5108b9ec4b0c13847dfab7b8b3912/laika/tests/server_collection/autopublish.js
laika/tests/server_collection/autopublish.js
var assert = require('assert'); require('../common.js'); suite('Server Collection - AutoPublish', function() { test('without autopublish', function(done, server, client) { client.evalSync(function() { coll = new Meteor.SmartCollection('coll'); emit('return'); }); server.evalSync(function() {...
javascript
MIT
a41d13f49af5108b9ec4b0c13847dfab7b8b3912
2026-01-05T03:37:12.054538Z
false
arunoda/meteor-smart-collections
https://github.com/arunoda/meteor-smart-collections/blob/a41d13f49af5108b9ec4b0c13847dfab7b8b3912/laika/tests/latency/error.js
laika/tests/latency/error.js
var assert = require('assert'); require('../common.js'); suite('Latency - Error', function() { test('insert', function(done, server, client) { server.evalSync(doAutoPublish); server.evalSync(function() { coll = new Meteor.SmartCollection('coll'); coll.allow({ insert: function() {return tr...
javascript
MIT
a41d13f49af5108b9ec4b0c13847dfab7b8b3912
2026-01-05T03:37:12.054538Z
false
arunoda/meteor-smart-collections
https://github.com/arunoda/meteor-smart-collections/blob/a41d13f49af5108b9ec4b0c13847dfab7b8b3912/laika/tests/latency/success.js
laika/tests/latency/success.js
var assert = require('assert'); require('../common.js'); suite('Latency - Success', function() { test('insert', function(done, server, client) { server.evalSync(doAutoPublish); server.evalSync(function() { coll = new Meteor.SmartCollection('coll'); coll.allow({ insert: function() {return ...
javascript
MIT
a41d13f49af5108b9ec4b0c13847dfab7b8b3912
2026-01-05T03:37:12.054538Z
false
arunoda/meteor-smart-collections
https://github.com/arunoda/meteor-smart-collections/blob/a41d13f49af5108b9ec4b0c13847dfab7b8b3912/node_modules/underscore/index.js
node_modules/underscore/index.js
module.exports = require('./underscore');
javascript
MIT
a41d13f49af5108b9ec4b0c13847dfab7b8b3912
2026-01-05T03:37:12.054538Z
false
arunoda/meteor-smart-collections
https://github.com/arunoda/meteor-smart-collections/blob/a41d13f49af5108b9ec4b0c13847dfab7b8b3912/node_modules/underscore/underscore.js
node_modules/underscore/underscore.js
// Underscore.js 1.5.1 // http://underscorejs.org // (c) 2009-2013 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors // Underscore may be freely distributed under the MIT license. (function() { // Baseline setup // -------------- // Establish the root object, `window` in the ...
javascript
MIT
a41d13f49af5108b9ec4b0c13847dfab7b8b3912
2026-01-05T03:37:12.054538Z
true
arunoda/meteor-smart-collections
https://github.com/arunoda/meteor-smart-collections/blob/a41d13f49af5108b9ec4b0c13847dfab7b8b3912/node_modules/deep-equal/index.js
node_modules/deep-equal/index.js
var pSlice = Array.prototype.slice; var Object_keys = typeof Object.keys === 'function' ? Object.keys : function (obj) { var keys = []; for (var key in obj) keys.push(key); return keys; } ; var deepEqual = module.exports = function (actual, expected) { // 7.1. All identical values...
javascript
MIT
a41d13f49af5108b9ec4b0c13847dfab7b8b3912
2026-01-05T03:37:12.054538Z
false
arunoda/meteor-smart-collections
https://github.com/arunoda/meteor-smart-collections/blob/a41d13f49af5108b9ec4b0c13847dfab7b8b3912/node_modules/deep-equal/test/cmp.js
node_modules/deep-equal/test/cmp.js
var test = require('tap').test; var equal = require('../'); test('equal', function (t) { t.ok(equal( { a : [ 2, 3 ], b : [ 4 ] }, { a : [ 2, 3 ], b : [ 4 ] } )); t.end(); }); test('not equal', function (t) { t.notOk(equal( { x : 5, y : [6] }, { x : 5, y : 6 } )); ...
javascript
MIT
a41d13f49af5108b9ec4b0c13847dfab7b8b3912
2026-01-05T03:37:12.054538Z
false
arunoda/meteor-smart-collections
https://github.com/arunoda/meteor-smart-collections/blob/a41d13f49af5108b9ec4b0c13847dfab7b8b3912/node_modules/deep-equal/example/cmp.js
node_modules/deep-equal/example/cmp.js
var equal = require('../'); console.dir([ equal( { a : [ 2, 3 ], b : [ 4 ] }, { a : [ 2, 3 ], b : [ 4 ] } ), equal( { x : 5, y : [6] }, { x : 5, y : 6 } ) ]);
javascript
MIT
a41d13f49af5108b9ec4b0c13847dfab7b8b3912
2026-01-05T03:37:12.054538Z
false
arunoda/meteor-smart-collections
https://github.com/arunoda/meteor-smart-collections/blob/a41d13f49af5108b9ec4b0c13847dfab7b8b3912/node_modules/debug/index.js
node_modules/debug/index.js
if ('undefined' == typeof window) { module.exports = require('./lib/debug'); } else { module.exports = require('./debug'); }
javascript
MIT
a41d13f49af5108b9ec4b0c13847dfab7b8b3912
2026-01-05T03:37:12.054538Z
false
arunoda/meteor-smart-collections
https://github.com/arunoda/meteor-smart-collections/blob/a41d13f49af5108b9ec4b0c13847dfab7b8b3912/node_modules/debug/debug.js
node_modules/debug/debug.js
/** * Expose `debug()` as the module. */ module.exports = debug; /** * Create a debugger with the given `name`. * * @param {String} name * @return {Type} * @api public */ function debug(name) { if (!debug.enabled(name)) return function(){}; return function(fmt){ var curr = new Date; var ms = cu...
javascript
MIT
a41d13f49af5108b9ec4b0c13847dfab7b8b3912
2026-01-05T03:37:12.054538Z
false
arunoda/meteor-smart-collections
https://github.com/arunoda/meteor-smart-collections/blob/a41d13f49af5108b9ec4b0c13847dfab7b8b3912/node_modules/debug/example/wildcards.js
node_modules/debug/example/wildcards.js
var debug = { foo: require('../')('test:foo'), bar: require('../')('test:bar'), baz: require('../')('test:baz') }; debug.foo('foo') debug.bar('bar') debug.baz('baz')
javascript
MIT
a41d13f49af5108b9ec4b0c13847dfab7b8b3912
2026-01-05T03:37:12.054538Z
false
arunoda/meteor-smart-collections
https://github.com/arunoda/meteor-smart-collections/blob/a41d13f49af5108b9ec4b0c13847dfab7b8b3912/node_modules/debug/example/app.js
node_modules/debug/example/app.js
var debug = require('../')('http') , http = require('http') , name = 'My App'; // fake app debug('booting %s', name); http.createServer(function(req, res){ debug(req.method + ' ' + req.url); res.end('hello\n'); }).listen(3000, function(){ debug('listening'); }); // fake worker of some kind require('./wo...
javascript
MIT
a41d13f49af5108b9ec4b0c13847dfab7b8b3912
2026-01-05T03:37:12.054538Z
false
arunoda/meteor-smart-collections
https://github.com/arunoda/meteor-smart-collections/blob/a41d13f49af5108b9ec4b0c13847dfab7b8b3912/node_modules/debug/example/worker.js
node_modules/debug/example/worker.js
// DEBUG=* node example/worker // DEBUG=worker:* node example/worker // DEBUG=worker:a node example/worker // DEBUG=worker:b node example/worker var a = require('../')('worker:a') , b = require('../')('worker:b'); function work() { a('doing lots of uninteresting work'); setTimeout(work, Math.random() * 1000); ...
javascript
MIT
a41d13f49af5108b9ec4b0c13847dfab7b8b3912
2026-01-05T03:37:12.054538Z
false
arunoda/meteor-smart-collections
https://github.com/arunoda/meteor-smart-collections/blob/a41d13f49af5108b9ec4b0c13847dfab7b8b3912/node_modules/debug/lib/debug.js
node_modules/debug/lib/debug.js
/** * Module dependencies. */ var tty = require('tty'); /** * Expose `debug()` as the module. */ module.exports = debug; /** * Enabled debuggers. */ var names = [] , skips = []; (process.env.DEBUG || '') .split(/[\s,]+/) .forEach(function(name){ name = name.replace('*', '.*?'); if (name[0] ===...
javascript
MIT
a41d13f49af5108b9ec4b0c13847dfab7b8b3912
2026-01-05T03:37:12.054538Z
false
arunoda/meteor-smart-collections
https://github.com/arunoda/meteor-smart-collections/blob/a41d13f49af5108b9ec4b0c13847dfab7b8b3912/lib/invalidator.js
lib/invalidator.js
var util = Npm.require('util'); var EventEmitter = Npm.require('events').EventEmitter; var UPDATE_OPERATIONS = generateUpdateOperationsMap(); function Invalidator(collection, options) { this._debug = Npm.require('debug')('sc:inval:' + collection.name); this._collection = collection; this._options = options || {}...
javascript
MIT
a41d13f49af5108b9ec4b0c13847dfab7b8b3912
2026-01-05T03:37:12.054538Z
false