code stringlengths 2 1.05M | repo_name stringlengths 5 114 | path stringlengths 4 991 | language stringclasses 1
value | license stringclasses 15
values | size int32 2 1.05M |
|---|---|---|---|---|---|
/* ========================================================================
* DOM-based Routing
* Based on http://goo.gl/EUTi53 by Paul Irish
*
* Only fires on body classes that match. If a body class contains a dash,
* replace the dash with an underscore when adding it to the object below.
*
* .noConflict()
* ... | theimaginaire/theimaginaire | assets/scripts/main.js | JavaScript | mit | 2,791 |
/**
* @fileOverview
*
* 表示可以绘制的物件
*
* @author: techird
* @copyright: Baidu FEX, 2014
*/
function Drawable() {
this.state = Drawable.STATE_NORMAL;
}
Drawable.prototype.draw = function(canvasContext2D) {
/*<debug>*/
throw new Error('Not implement: draw()');
/*</debug>*/
};
Drawable.prototype.hot... | techird/ruler | src/steps/drawable.js | JavaScript | mit | 495 |
/**
* @module opcua.address_space.AlarmsAndConditions
*/
exports.install = function (AddressSpace) {
// └─ ConditionType
// ├─ DialogConditionType
// └─ AcknowledgeableConditionType
// └─ AlarmConditionType
// ├─ LimitAlarmType
// │ ├─ ExclusiveLimitAlarm... | kahveci/cherry-iot | node_modules/node-opcua/lib/address_space/alarms_and_conditions/install.js | JavaScript | mit | 6,521 |
module.exports = [{
"name":"team",
"title":"Nuestro equipo",
"subtitle":"en construcción",
"description":"",
"layout":"text"
}]; | Technogi/website | src/scripts/templates/team.js | JavaScript | mit | 139 |
import * as React from 'react';
import createSvgIcon from './utils/createSvgIcon';
export default createSvgIcon(
<path d="M11.99 2C6.47 2 2 6.48 2 12s4.47 10 9.99 10C17.52 22 22 17.52 22 12S17.52 2 11.99 2zm3.51 6c.83 0 1.5.67 1.5 1.5s-.67 1.5-1.5 1.5-1.5-.67-1.5-1.5.67-1.5 1.5-1.5zm-7 0c.83 0 1.5.67 1.5 1.5S9.33 11... | callemall/material-ui | packages/material-ui-icons/src/SentimentDissatisfiedRounded.js | JavaScript | mit | 582 |
var System = require('../dist/es6-module-loader.src');
System.transpiler = '6to5';
module.exports = {
Loader: global.LoaderPolyfill,
System: System
};
| douglasduteil/es6-module-loader | lib/index-6to5.js | JavaScript | mit | 157 |
module.exports = function(grunt) {
// Project configuration.
grunt.initConfig({
pkg: grunt.file.readJSON('package.json'),
sass: { // Task
dist: { // Target
options: { // Target options
style: 'expanded'
... | 123wowow123/PreFlopTrainer | Gruntfile.js | JavaScript | mit | 901 |
// Generated by CoffeeScript 1.3.3
(function() {
var LinkEnumerator;
LinkEnumerator = (function() {
function LinkEnumerator() {}
LinkEnumerator.newTab = function(href) {
return chrome.tabs.create({
url: href
});
};
LinkEnumerator.addLink = function(linkTag) {
var _class... | rgarner/link-browser | js/popup.js | JavaScript | mit | 2,034 |
/* Copyright (c) 2018 Looker Data Sciences, Inc. See https://github.com/looker-open-source/look-at-me-sideways/blob/master/LICENSE.txt */
const getExemption = require('../lib/get-exemption.js');
module.exports = function(
project,
) {
let messages = [];
let ruleIds = ['T2', 'T3', 'T4', 'T5', 'T6', 'T7', 'T8', 'T9',... | looker-open-source/look-at-me-sideways | rules/t2-10.js | JavaScript | mit | 9,068 |
var fs = require('fs');
var gulp = require('gulp');
var remove = require('rimraf');
var should = require('chai').should();
var Elixir = require('laravel-elixir');
var ElixirRequireJs = require('../../');
describe('RequireJS Task', function() {
beforeEach(() => {
Elixir.tasks = Elixir.config.tasks = ... | joecohens/laravel-elixir-requirejs | elixir-test-app/test/requirejs.js | JavaScript | mit | 2,297 |
import {injectable} from 'injectable-core'
export const getPosts = injectable({
name: 'getPosts',
injects: ['findAllPost'],
graphql: {
name: 'getPosts',
kind: 'query',
input: {likeName: 'String'},
payload: ['Post']
}
})((
{findAllPost},
args
) => {
const {likeName} = args
return findAllPost({filter: {l... | ron-liu/graphqlize.js | packages/graphqlize-server/src/__tests__/get-posts.biz.js | JavaScript | mit | 628 |
import { Widget } from 'jquery-widget'
import Header from '../components/Header'
import MainSection from '../components/MainSection'
class App extends Widget {
render() {
const { todos, actions } = this.options
return (
<div>
<Header addTodo={actions.addTodo} />
<MainSection todos={tod... | viclm/jquery-widget | example/redux-todomvc/containers/App.js | JavaScript | mit | 389 |
import React, { render, createElement, createFactory } from 'preact/compat';
import { setupScratch, teardown } from '../../../test/_util/helpers';
describe('createFactory', () => {
/** @type {HTMLDivElement} */
let scratch;
beforeEach(() => {
scratch = setupScratch();
});
afterEach(() => {
teardown(scratch)... | developit/preact | compat/test/browser/createFactory.test.js | JavaScript | mit | 765 |
'use strict';
var app = require('../../app');
var request = require('supertest');
var newLabRequest;
describe('LabRequest API:', function() {
describe('GET /api/lab_requests', function() {
var labRequests;
beforeEach(function(done) {
request(app)
.get('/api/lab_requests')
.expect(20... | aladdin83/MCMS | server/api/lab_request/lab_request.integration.js | JavaScript | mit | 3,563 |
// // Contact Form Scripts
// $(function() {
// $("#contactForm input,#contactForm textarea").jqBootstrapValidation({
// preventSubmit: true,
// submitError: function($form, event, errors) {
// // additional error messages or events
// },
// submitSuccess: function($for... | srividhyashanker/SIS-Website | js/contact_me.js | JavaScript | mit | 3,108 |
function(doc) {
if (doc._id.substr(0,2) == "o." ) {
emit([doc.user,doc.timeModified],null);
}
} | ondra-novak/quark | src/quark/designdocs/index.design/views/users/map.js | JavaScript | mit | 105 |
'use strict';
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.Image = undefined;
var _getPrototypeOf = require('babel-runtime/core-js/object/get-prototype-of');
var _getPrototypeOf2 = _interopRequireDefault(_getPrototypeOf);
var _classCallCheck2 = require('babel-runtime/helpers/classCallChe... | stylish/stylish | packages/skypager-project/lib/assets/image.js | JavaScript | mit | 1,365 |
[a, ...(b=c)] | PiotrDabkowski/pyjsparser | tests/pass/77db52b103913973.js | JavaScript | mit | 13 |
/**
* Wheel, copyright (c) 2020 - present by Arno van der Vegt
* Distributed under an MIT license: https://arnovandervegt.github.io/wheel/license.txt
**/
const dispatcher = require('../../lib/dispatcher').dispatcher;
const Tabs = require('../../lib/components/input/Tabs').Tabs;
const DOMNode ... | ArnoVanDerVegt/wheel | js/frontend/ide/properties/Properties.js | JavaScript | mit | 6,589 |
'use strict';
// ---------------------------------------------------------------------------
const Exchange = require ('./base/Exchange');
const { ArgumentsRequired, AuthenticationError, ExchangeError, InsufficientFunds, InvalidOrder, BadSymbol, PermissionDenied, BadRequest } = require ('./base/errors');
const { TIC... | ccxt/ccxt | js/ascendex.js | JavaScript | mit | 108,135 |
(function () {
'use strict';
angular.module('app.controllers')
.controller('PaymentController', PaymentController);
PaymentController.$inject = ['$scope', 'PaymentService', 'EmployeeService', 'toastr'];
function PaymentController ($scope, PaymentService, EmployeeService, toastr) {
$s... | SunTzu92/consorcio | src/js/controller/payment/payment.controller.js | JavaScript | mit | 1,782 |
'use strict';
var path = require('path');
var fs = require('fs');
var gulp = require('gulp');
var browserSync = require('browser-sync');
var reload = browserSync.reload;
var $ = require('gulp-load-plugins')();
var markJSON = require('markit-json');
var docUtil = require('amazeui-doc-util');
var through = require('thro... | pandoraui/docs-generator | gulpfile.js | JavaScript | mit | 6,450 |
/* eslint-env node */
'use strict';
module.exports = {
name: 'ember-cli-file-picker'
};
| funkensturm/ember-cli-file-picker | index.js | JavaScript | mit | 91 |
import EmberObject, { get } from '@ember/object';
export default EmberObject.extend({
arguments: null,
fields: null,
data: null,
/**
* This ember hook is used to fetch data or fields by name using `obj.get('data:insertName')` or
* `obj.get('field:insertName')` syntax.
* @param name
* @return {stri... | jbandura/ember-legit-forms | addon/utils/validator-object.js | JavaScript | mit | 705 |
import React, { PropTypes } from 'react';
import GrommetApp from 'grommet/components/App';
import Article from 'grommet/components/Article';
import Header from 'grommet/components/Header';
import Title from 'grommet/components/Title';
import Box from 'grommet/components/Box';
import Footer from 'grommet/components/Foot... | l337h4x0r/signalr-demo | App/containers/App.js | JavaScript | mit | 5,379 |
'use strict';
module.exports = function () {
angular.module('core.utils')
.factory('utils', utils);
// @ngInject
function utils($window) {
/**
* Exposes <a href="https://lodash.com/docs" target="_blank">lodash</a> object.
*
* @memberof utils
* @example... | vijaysarin/gulp-webpack-app-framework | app/core/components/utils/utils.js | JavaScript | mit | 5,105 |
'use strict';
let chai = require('chai');
let chaiHttp = require('chai-http');
chai.use(chaiHttp);
module.exports = function(app, agent) {
/**
* Creates an object using the API
* @param {ProductCategory} productCategory Product category to create
* @return {Promise} res R... | navingator/northwind-web-test | app/tests/routes/util/product-category-api.util.js | JavaScript | mit | 3,808 |
import DateFormat from "../utils/dateFormat";
import { UI } from "./ui";
export default class Results {
/**
* Load the results from the currect URI
* @returns {Promise<void>}
*/
static loadFromUri(showShareButton = true) {
const id = window.location.pathname.split('/').pop();
return new Promise((... | e7d/speedtest | packages/web/src/js/app/results.js | JavaScript | mit | 1,434 |
function sendRequest(params, channelName, button) {
var url = params.url;
var channel = channelName;
if (!url || !channel) {
console.error("Couldn't request review: missing URL or channel");
button.innerHTML = "Failed to send, check the console";
return;
}
// add hash to channel if it's not ther... | ronocod/slack-review | src/assets/js/github-button.js | JavaScript | mit | 2,686 |
'use strict'
// https://css-tricks.com/snippets/javascript/get-url-variables/
function queryString(variable){
try{
var q = location.search.substring(1);
var v = q.split("&");
for( var i = 0; i < v.length; i++ ){
var p = v[i].split("=");
if( p[0] == variable ){
... | planetarydev/json-sql-builder | docs/lib/main.js | JavaScript | mit | 6,435 |
import React, { Component } from 'react'
import Bugsnag from '@bugsnag/react-native'
import * as Scenarios from './Scenarios'
import {
View,
Text,
TextInput,
Button,
StyleSheet,
NativeModules
} from 'react-native'
export default class App extends Component {
constructor (props) {
super(props)
thi... | bugsnag/bugsnag-js | test/react-native/features/fixtures/app/scenario_js/app/App.js | JavaScript | mit | 5,149 |
// Copyright (C) 2013 Trevor McCauley
//
// 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
// to use, copy, modify, merge, publis... | stefcot/react-design-easier | src/freeTransformTool/Control.es6.js | JavaScript | mit | 5,975 |
const path = require('path');
const autoprefixer = require('autoprefixer');
const CommonsChunkPlugin = require('webpack/lib/optimize/CommonsChunkPlugin');
const ContextReplacementPlugin = require('webpack/lib/ContextReplacementPlugin');
const CopyWebpackPlugin = require('copy-webpack-plugin');
const DefinePlugin = req... | ar-insect/adminForNg2 | webpack.config.js | JavaScript | mit | 5,206 |
import { combineReducers } from 'redux'
import formReducer from './containers/Form/reducer'
import amountConverterReducer from './containers/AmountConverter/reducer'
export default combineReducers({
formReducer,
amountConverterReducer
})
| clementgarbay/ExpenseTracker | src/reducers.js | JavaScript | mit | 243 |
var Nightmare = require('nightmare');
//var path = require('path');
var config = require('../config')({dirname: __dirname});
var phantomPath = config.phantomPath;
var homepagePath = config.basePath({path: '/'});
var expect = require('chai').expect;
describe('test homepage', function() {
describe('user submits test-... | CilantroOrg/CilantroVegOrg | test/homepage/homepage-spec.js | JavaScript | mit | 4,470 |
function Page() {
"use strict";
var texts = module.texts;
var template = this.template;
this.prepare = function (done) {
var control = 'beyond-compile-library';
template.render({
'control': control,
'texts': texts
}).then(done);
};
this.show... | socites/beyond | application/libraries/compile/page/page.js | JavaScript | mit | 410 |
import { render, renderInstance, removeAll } from "./dom.js"
const updateBuffer = []
const routes = []
let needUpdate = false
let needUpdateRoute = false
let currRouteResult = []
let currRoute = null
let url = null
function Route(regexp, component, enterFunc, exitFunc, readyFunc) {
this.regexp = regexp
this.compone... | tenjou/wabi | src/renderer.js | JavaScript | mit | 2,720 |
var utils = require('../utils/utils');
function conditionExpression(condition) {
var val;
if(condition.isComplex) {
return conditionsExpression(condition.groups);
}
else {
if (condition.operation === 'exists') {
val = '';
}
else if (condition.valType === 'bo... | maneeshpal/Drata | utils/sqlgenerator.js | JavaScript | mit | 3,729 |
Package.describe({
name: 'rocketchat:logger',
version: '0.0.1',
summary: 'Logger for Rocket.Chat',
});
Package.onUse(function(api) {
api.use('mongo');
api.use('ecmascript');
api.use('random');
api.use('logging');
api.use('nooitaf:colors');
api.use('raix:eventemitter');
api.use('templating', 'client');
api.u... | pkgodara/Rocket.Chat | packages/rocketchat-logger/package.js | JavaScript | mit | 779 |
/**
* Created with IntelliJ IDEA.
* User: psmithiv
* Date: 7/3/14
* Time: 1:39 PM
* To change this template use File | Settings | File Templates.
*/
exports = module.exports = init;
/**
* Module initialization method
*/
function init() {
'use strict';
//dependencies
var express = inject('expre... | psmithiv/MENN | backend/app/controller/user.controller.js | JavaScript | mit | 1,377 |
export const decoupledRekapiNumberExport = {
"duration": 1000,
"actors": [
{
"start": 0,
"end": 1000,
"trackNames": [
"translateX",
"translateY",
"rotateZ"
],
"propertyTracks": {
"translateX": [
{
"millisecond": 0,
"... | jeremyckahn/rekapi-timeline | test/fixtures/decoupled-rekapi-number-export.js | JavaScript | mit | 1,533 |
import AbstractState from './Abstract'
import AssetLoader from '../objects/AssetLoader'
import Phaser from 'phaser'
import PlaygroundSelector from '../objects/Menu/PlaygroundSelector'
import PlayerSelector from '../objects/Menu/PlayerSelector'
import Keyboard from '../objects/Keyboard'
export default class extends Abs... | mmarica/noob-fighters | src/states/Menu.js | JavaScript | mit | 4,623 |
// See http://docs.sequelizejs.com/en/latest/docs/models-definition/
// for more of what you can do here.
import * as Sequelize from 'sequelize'
export default function (app) {
const sequelizeClient = app.get('sequelizeClient')
const <%= camelName %> = sequelizeClient.define('<%= kebabName %>', {
<% if(authentic... | gradealabs/generator-feathers | generators/service/templates/model/sequelize-user.js | JavaScript | mit | 993 |
import React, {Component, PropTypes} from 'react'
import markdown from 'tools/markdown'
const PostContent = ({value}) => {
const sandbox = $('<div></div>')
.html(value)
sandbox
.find('iframe')
.removeAttr('width')
.removeAttr('height')
.removeAttr('frameborder')
.wrap('<div class="ui embed... | adiachenko/catchy_web | src/screens/App/shared/components/PostContent.js | JavaScript | mit | 524 |
var utils = {
Form: {
_containerToJson : function(container) {
var param = {};
$('input,select,textarea', container).each(function() {
var name = $(this).attr('name');
if (!name) {
return true;
}
if ($(this).is(':disabled')) {
return true;
}
var val = param[name];
if (this... | wztao/log-component | src/main/webapp/shared-static/js/common.js | JavaScript | mit | 1,162 |
var Discordful = require('discordful');
var bot = new Discordful({ // Create a new discordful bot
// Accepts all the default Discordie class parameters, but not the sharding ones.
autoReconnect: true
});
bot.connect({ token: 'TOKEN_HERE' }); // Connect to the api with your token or email and password
bot.event('M... | Luxizzle/discordful | tutorials/t1.js | JavaScript | mit | 942 |
/*!
* SlickNav Responsive Mobile Menu v1.0.7
* (c) 2016 Josh Cope
* licensed under MIT
*/
;(function ($, document, window) {
var
// default settings object.
defaults = {
label: 'MENU',
duplicate: true,
duration: 200,
easingOpen: 'swing',
ea... | Mojo90/rund-um-den-kirchturm-heroes | views/js/libs/2a-jquery.slicknav.js | JavaScript | mit | 16,894 |
import { device } from 'tabris';
const platform = device.get("platform").toLowerCase();
export function getIconSrc(name, size) {
size = size || Math.min(Math.floor( device.get("scaleFactor") ) , 2);
var uri = getIcon(name,size);
return {src: uri, scale: size * 2}
};
function getIcon(name, size) {
var path = '... | eclipsesource/tabris-js-experiments | tabris-js-backendless/src/styles/icons.js | JavaScript | mit | 512 |
import thinky from '../utils/thinky';
import Cart from './Cart';
const type = thinky.type;
const Order = thinky.createModel('Order', {
id: type.string(),
createdAt: type.date().default(thinky.r.now()),
status: type.string().default('validating'),
userId: type.string(),
cartTotal: type.number().required()
});... | Justkant/WhatAShop | api/models/Order.js | JavaScript | mit | 440 |
var request = require('request');
module.exports = function digitalOceanReshotput(opts) {
var apiToken = opts.apiToken;
var dropletId = opts.dropletId;
var snapshotId = opts.snapshotId;
var api_endpoint = "https://api.digitalocean.com/v2/droplets/" +
dropletId + "/actions";
function sendReset(req, res,... | stuartpb/reshotput | lib/digitalOcean.js | JavaScript | mit | 1,178 |
var kateGame = new KateGame();
function preload(){
kateGame.preload();
}
function setup() {
kateGame.setup();
}
function draw() {
kateGame.run();
}
function keyPressed(){
kateGame.keyPressed(keyCode);
}
function keyReleased(){
kateGame.keyReleased();
}
| zanemountcastle/decoding-nature | final-project/subworlds/kateFinal/kateSketch.js | JavaScript | mit | 264 |
define([], function () {
'use strict';
var Materialize = {};
// Unique ID
Materialize.guid = (function () {
function s4() {
return Math.floor((1 + Math.random()) * 0x10000)
.toString(16)
.substring(1);
}
return function () {
return s4() + s4() + '-' + s4() + '-' + s4() + '-' +
s4() + '-' +... | InstaGIS/material_helper | src/material_unused/global.js | JavaScript | mit | 701 |
/* @flow */
import React from 'react';
import Dialog from 'material-ui/Dialog';
import FlatButton from 'material-ui/FlatButton';
import RaisedButton from 'material-ui/RaisedButton';
const actions = (handleClose, handleRemoveFields) => [
<FlatButton
label="Cancel"
onTouchTap={handleClose}
/>,
<RaisedButt... | rayrw/skygear-apitable | app/components/Table/Edit/RemoveFieldDialog/index.js | JavaScript | mit | 938 |
/**
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
* @emails react-core
* @jest-environment node
*/
'use strict';
let act;
let React;
let ReactNoop;
let ReactNoopFlightServer;
le... | facebook/react | packages/react-client/src/__tests__/ReactFlight-test.js | JavaScript | mit | 18,943 |
import Vue from 'vue'
import { createEmptyVNode } from 'core/vdom/vnode'
describe('Options functional', () => {
it('should work', done => {
const vm = new Vue({
data: { test: 'foo' },
template: '<div><wrap :msg="test">bar</wrap></div>',
components: {
wrap: {
functional: true,
... | cnchanning/vue | test/unit/features/options/functional.spec.js | JavaScript | mit | 8,879 |
/**
* Created by ionagamed on 8/23/16.
*/
import { Card } from '../../../Card';
const id = 'half-breed';
class _ extends Card {
constructor() {
super();
this.id = id;
this.pack = 'pack1';
this.kind = 'door';
this.type = 'half-breed';
this.wieldable = true;
}
... | ionagamed/munchkin | logic/packs/pack1/doors/half-breed.js | JavaScript | mit | 772 |
const KeyStore = require("../stores/key_store");
Number.prototype.formatThousands = function(c, d, t){
let n = this;
c = isNaN(c = Math.abs(c)) ? 2 : c;
d = d === undefined ? "." : d;
t = t === undefined ? "," : t;
let s = n < 0 ? "-" : "";
let i = parseInt(n = Math.abs(+n || 0).toFixed(c)) + "";
let j =... | pyreta/songrider | app/utils/method_module.js | JavaScript | mit | 2,371 |
'use strict';
(function() {
// Balls Controller Spec
describe('Balls Controller Tests', function() {
// Initialize global variables
var BallsController,
scope,
$httpBackend,
$stateParams,
$location;
// The $resource service augments the response object with methods for updating and deleting the resour... | helaili/humongolf | public/modules/balls/tests/balls.client.controller.test.js | JavaScript | mit | 4,879 |
import Adapter from '@wojtekmaj/enzyme-adapter-react-17';
import Enzyme, { shallow } from 'enzyme';
import React from 'react';
import { CloneView } from '../CloneView';
Enzyme.configure({ adapter: new Adapter() });
describe('(Component) CloneView', () => {
let _wrapper;
beforeEach(() => {
const props = {
... | City-of-Helsinki/helerm-ui | src/components/Tos/CloneView/__tests__/cloneView.spec.js | JavaScript | mit | 560 |
Package.describe({
name: 'caoliao:ui-chat',
version: '0.1.0',
// Brief, one-line summary of the package.
summary: '',
// URL to the Git repository containing the source code for this package.
git: '',
// By default, Meteor will default to using README.md for documentation.
// To avoid submitting documentation, ... | YY030913/tp | packages/caoliao-ui-chat/package.js | JavaScript | mit | 1,244 |
import PropTypes from "prop-types";
import React from "react";
import Icon from "react-fa";
import { times } from "lodash/util";
import { browserHistory } from "react-router";
import {
container,
userImage,
rating as ratingClassName
} from "./userOverview.css";
import Spinner from "../../spinner/Spinner";
const ... | lexnapoles/bayuk | src/components/user/userOverview/UserOverview.js | JavaScript | mit | 2,021 |
$.getJSON("/nodes.json").done(function(data){
nodes = data;
});
$.getJSON("/edges.json").done(function(data){
links = data;
});
var lastNodeId = 2;
var links = [
{source: nodes[0], target: nodes[1], left: false, right: true },
{source: nodes[1], target: nodes[2], left: false, right: tru... | OAGr/fermihub | vendor/assets/javascripts/extra.js | JavaScript | mit | 1,012 |
// Source : https://leetcode.com/problems/first-bad-version
// Author : Dean Shi
// Date : 2017-10-20
/***************************************************************************************
*
* You are a product manager and currently leading a team to develop a new product.
* Unfortunately, the latest version of... | dnshi/Leetcode | algorithms/FirstBadVersion.js | JavaScript | mit | 2,237 |
import { internalServerError, badRequest } from './http'
import * as githubAtom from 'gitpunch-lib/githubAtom'
export async function withTags (repos) {
repos = await Promise.all(
repos.map(
repo => githubAtom.fetchTags(repo.repo).then(tags => ({ ...repo, tags }), () => null)
)
)
return repos.filter... | vfeskov/win-a-beer | server/src/util/githubAtom.js | JavaScript | mit | 587 |
// Copyright (c) 2011+, HL7, Inc & The MITRE Corporation
// All rights reserved.
//
// Redistribution and use in source and binary forms, with or without modification,
// are permitted provided that the following conditions are met:
//
// * Redistributions of source code must retain the above copyright notice, t... | zelda/mongodb-for-fhir-resource | app/models/appointmentresponse.js | JavaScript | mit | 2,168 |
var sinon = require('sinon');
var assert = require('chai').assert;
var rewire = require('rewire');
describe('Admin Module:', function() {
var admin;
var clients;
var options;
var adminModule;
before(function() {
options = {
MATH_PROGRAM: "MyProgram"
};
adminModule = rewire('../lib/admin.js... | antonleykin/InteractiveShell | src/tests/admin.js | JavaScript | mit | 2,624 |
'use strict';
var Collection = require('backbone').Collection;
var Combination = require('../models/combination');
var CombinationCollection = Collection.extend({
model: Combination,
initialize: function(data) {
this.originalModels = data;
},
findByIngredient: function(query) {
this.reset(this.origin... | tamarasaurus/divinity-crafting | src/js/collections/combinations.js | JavaScript | mit | 711 |
import React from 'react';
import 'todomvc-app-css/index.css';
chrome.storage.local.get('state', (obj) => {
React.render(
<div />,
document.querySelector('#root')
);
}); | sskyy/orange-chrome-extension | chrome/app/popup/index.js | JavaScript | mit | 183 |
import warewolf from '../src/index';
let compose = [];
function checkComposer() {
let numberOfCycles = 1000000;
const ware = warewolf(
(one, two, next) => setImmediate(next),
(one, two, done) => {
done();
}
);
function run() {
ware(1, 2, () => {
if (numberOfCycles-- > 0) {
... | hixme/warewolf | test/memory-leak-check.js | JavaScript | mit | 676 |
/**
* jqnEaster v0.1.1 Plugin for jQuery
* Created by nquocnghia
*
* Allows the programmer to hide some easter eggs, e.g. Konami code, on the website.
*
* The plugin's default behavior can be configured with the parameters:
*
* - keySequence (Array of Strings): The sequence of input key that triggers the callba... | nquocnghia/jqnEaster | jqnEaster.js | JavaScript | mit | 2,865 |
(function (module) {
const nbbRequire = require('nodebb-plugin-require');
const db = require('./database');
const async = require('async');
const extend = require('extend');
const Data = require('../helpers/data');
// nbb-core
const Groups = nbbRequire('src/groups');
Groups.import = function () {
... | akhoury/nodebb-plugin-import | server/augmented/groups.js | JavaScript | mit | 3,080 |
var chai = require('chai')
var hasAccess = require('the code from the left panel')
var expect = chai.expect
describe('#hasAccess', function () {
context('when role is anonymous', function () {
it('disallows to write posts', function () {
expect(hasAccess('anonymous', 'post:write')).to.be.false
})
... | tommy-the-runner/tommy-api | fixtures/assertions/false_negative.spec.js | JavaScript | mit | 444 |
import isNil from "lodash/isNil";
import isArray from "lodash/isArray";
import isFunction from "lodash/isFunction";
import isObject from "lodash/isObject";
import mergeWith from "lodash/mergeWith";
import Fakerator from "lib/fakerator";
module.exports = function() {
let locale = require("lib/locales/cs-CZ");
let fb... | icebob/fakerator | lib/locales/cs-CZ/build.js | JavaScript | mit | 648 |
const express = require('express');
const app = express();
//设置路由之前,挂载中间件
app.use(myLogger);//每次对路由的请求都执行中间件函数
app.use(times);
app.use('/users/:id',function(req,res,next){
console.log(' this method is ' + req.method)
console.log(' this id is ' + req.params.id)
next()
},function(req,res,next){
console.log('this orig... | webcainiao/lianxi | rudiments/middleware.js | JavaScript | mit | 1,112 |
'use strict';
var Cmd = require('../src/commands').cmd,
Room = require('../src/rooms').room,
World = require('../src/world').world;
module.exports = {
name : 'The Great Valley',
id: 'the_great_valley',
defaultRoom: '1',
type : 'grasslands',
levels : 'All',
description : 'The second area.',
reloads: 0,
author: ... | PaulMulligan/chat-test | the_great_valley.js | JavaScript | mit | 4,536 |
//Configuration
var path = require("path");
var fs = require("fs");
var americano = {}
americano.generatorpath = path.join(path.dirname(fs.realpathSync(__filename)), '../..');
module.exports = americano;
| emumarketing/americano | core/generators/americano.js | JavaScript | mit | 206 |
// jscs:disable maximumLineLength
"use strict";
const path = require("path");
const runWebPlatformTest = require("./run-web-platform-test")(exports, path.resolve(__dirname, "tests"));
[
"dom/nodes/CharacterData-appendData.html",
"dom/nodes/CharacterData-deleteData.html",
"dom/nodes/CharacterData-insertData.html"... | Sebmaster/jsdom | test/web-platform-tests/index.js | JavaScript | mit | 18,054 |
let config = require('../../config');
let debug = require('debug')(config.logNamespace('ramblers:walksAndEventsManager'));
var url = require('url');
let _ = require('underscore');
let moment = require('moment-timezone');
let https = require('https');
let ramblersConfig = config.ramblers;
debug('Proxying requests at', ... | nbarrett/ekwg | lib/ramblers/walksAndEventsManager.js | JavaScript | mit | 2,866 |
var g = $.ergo({
etype: 'box',
renderTo: '#sample',
defaultItem: {
etype: 'icon',
states: {
// задаем набор состояний с группой 'fa'
fa: {
'icon1': 'cls:fa-calculator',
'icon2': 'cls:fa-calendar',
'icon3': 'cls:fa-calendar-o',
'icon4': 'cls:fa-camera',
'icon5': 'cls:fa-bug'
}
}
... | eliace/ergojs-site | samples/core/widget/states/states-groups.js | JavaScript | mit | 1,390 |
(function() {
"use strict";
// Hide the main menu to start
if(document.querySelector('#menu .menu-top') != null) {
// Add .hide to .menu-top when it's in .slideout-main-menu
if(document.querySelector('#menu .slideout-main-menu') != null) {
document.querySelector('#menu .menu-top... | waynestate/base-site | resources/js/modules/slideout-main-menu.js | JavaScript | mit | 2,551 |
describe('Component: Checkout', function() {
var scope,
q,
order;
beforeEach(module('orderCloud'));
beforeEach(module('orderCloud.sdk'));
beforeEach(inject(function ($q, $rootScope) {
q = $q;
scope = $rootScope.$new();
order = {
ID: "TestOrder123456789... | aisharagheb/fdxscn1 | src/app/checkout/tests/checkout.spec.js | JavaScript | mit | 9,253 |
/*
* This file can be used for general library features of noflo-canvas.
*
* The library features can be made available as CommonJS modules that the
* components in this project utilize.
*/
exports.canvas = require("canvas");
| noflo/noflo-canvas | index.js | JavaScript | mit | 231 |
const http = require('http');
const fs = require('fs');
const querystring = require('querystring');
const urlLib = require('url');
var users = { 'stark': '123456', 'lishuang': '654321', 'xiaorong': '783821', 'shudong': 'sbsb250250' }
const server = http.createServer(function(req, res) {
var str = '';
// res.... | 7fe/guide | nodejs/demo2/login/app.js | JavaScript | mit | 2,268 |
'use strict';
var util = require('util');
var models = require('./index');
/**
* @class
* Initializes a new instance of the SampleResourceGroup class.
* @constructor
*/
function SampleResourceGroup() { }
/**
* Validate the payload against the SampleResourceGroup schema
*
* @param {JSON} payload
*
*/
Sample... | vasanthangel4/autorest | AutoRest/Generators/NodeJS/Azure.NodeJS.Tests/Expected/SwaggerBat/SubscriptionIdApiVersion/models/sampleResourceGroup.js | JavaScript | mit | 1,063 |
import Ember from 'ember';
export function setProperty([__this, name, value]) {
__this.set(name, value);
}
export default Ember.Helper.helper(setProperty);
| toejiang/synology-dsm-gallery | app/helpers/set-property.js | JavaScript | mit | 160 |
const express = require('express');
const path = require('path');
const webpack = require('webpack');
const webpackMiddleware = require('webpack-dev-middleware');
const webpackHotMiddleware = require('webpack-hot-middleware');
const webpackConfig = require('../../webpack.config');
const app = express();
app.use('/'... | ayeniblessing101/Post_It | app/server/app.js | JavaScript | mit | 1,453 |
const expect = require('chai').expect
const extractor = require('../src/extractor')
const cjsRecursiveFixtures = require('./extractor-fixtures/cjs-recursive.json')
const cjsFlatFixtures = require('./extractor-fixtures/cjs-flat.json')
const amdRecursiveFixtures = require('./extractor-fixtures/amd-recursive.json')
const ... | sverweij/js-makedepend | test/extractor-composite.spec.js | JavaScript | mit | 1,299 |
'use strict';
angular.module('beers').factory('Beer', ['$http',
function($http) {
// Public API
return {
getData: function(beerId){
return $http.get('/beer/' + beerId);
}
};
}
]); | JulieMarie/on-tapp | public/modules/beers/services/beer.client.service.js | JavaScript | mit | 210 |
var game = {};
require('./game.core.js');
window.onload = function(){
game = new GameCore();
game.viewport = document.getElementById('viewport');
game.viewport.offset_top = game.viewport.offsetTop;
game.viewport.offset_left = game.viewport.offsetLeft;
game.ctx = game.viewport.getContext('2d');
game.ctx.font = '11... | jensa/paint-shooters-2 | client.js | JavaScript | mit | 378 |
/* eslint-env mocha */
/* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Welcome Reducer - Test
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
import chai, { expect } from 'chai';
import chaiImmutable from 'chai-immutable';
import { fromJS } from 'i... | bulicmatko/firepack-app | test/reducer/welcome/index.js | JavaScript | mit | 1,248 |
var preStyles = {
"line-height": "1.4",
"font-family": "Monaco, 'Courier New', Courier",
"font-size": "0.75em",
"border-top-style": "solid",
"border-right-style": "solid",
"border-bottom-style": "solid",
"border-left-style": "solid",
"border-top-width": "1px",
"border-right-width": "1px",
"border-bottom-width... | dylanb/dylanb.github.io | javascripts/periodic-1.1.js | JavaScript | mit | 5,676 |
var bitcore = require('bitcore');
// Configure the bitcoin network to use - this drives other config
var bitcoinNetwork = bitcore.Networks.testnet; // change to livenet if in production
// Set default values for livenet
var currentConnectionString = 'mongodb://localhost/microtrxgateway';
var navigationBarColor = '#0... | pooleja/microtrxgateway | config/env.js | JavaScript | mit | 661 |
'use strict';
var passport = require('passport');
var _ = require('lodash');
// These are different types of authentication strategies that can be used with Passport.
var LocalStrategy = require('passport-local').Strategy;
/*
var TwitterStrategy = require('passport-twitter').Strategy;
var FacebookStrategy = require('p... | beeva-vicentehidalgo/api_main | config/passport.js | JavaScript | mit | 4,735 |
/* */
var verror = require('../lib/verror');
var opname = 'read';
var err = new verror.VError('"%s" operation failed', opname);
console.log(err.message);
console.log(err.stack);
| elingan/riotjs-app-starter | src/jspm_packages/npm/verror@1.3.6/examples/varargs.js | JavaScript | mit | 179 |
import { applyMiddleware, createStore, compose } from 'redux'
import { routerMiddleware } from 'react-router-redux'
import { hashHistory } from 'react-router'
import throttle from 'lodash/throttle'
import { loadState, saveState } from './electronStorage'
import thunk from 'redux-thunk'
import rootReducer from '../re... | DmytroVasin/ListenChartsOnElectron | browser-app/src/js/config/configureStore.js | JavaScript | mit | 808 |
wsdlutils -l es6client -i sample.wsdl -n RemoteClient -o remoteclient.js -s sample.js
remoteclient.js:
let SoapClient = require("soapclient");
class RemoteClient {
constructor(url, authentication) {
this.client = new SoapClient("sample.wsdl");
//this.client.setEndpoint(url); if url set
//... | tlbdk/wsdl2ts | design.js | JavaScript | mit | 1,745 |
const test = require('ava');
const avaRuleTester = require('eslint-ava-rule-tester');
const rule = require('../rules/use-test');
const ruleTester = avaRuleTester(test, {
env: {
es6: true
},
parserOptions: {
sourceType: 'module'
}
});
const errors = [{}];
ruleTester.run('use-test', rule, {
valid: [
{code: ... | sindresorhus/eslint-plugin-ava | test/use-test.js | JavaScript | mit | 3,327 |
import { browserHistory } from 'react-router';
import fetch from 'isomorphic-fetch';
function logOutAttempt() {
return {
type: 'LOGOUT_ATTEMPT'
}
}
function logoutSuccess() {
return {
type: 'LOGOUT_SUCCESS'
}
}
export default function logout() {
return function(dispatch) {
dispatch(logOutAttemp... | D3VBAS3/DevBase | client/js/actions/logout.js | JavaScript | mit | 575 |
#!/usr/bin/env node
/**
* web-server.js Borrowed from angularjs.org tutorial
* modified to allow posting
*/
var util = require('util'),
http = require('http'),
fs = require('fs'),
url = require('url'),
events = require('events');
var DEFAULT_PORT = 8000;
function main(argv) {
new HttpServer(... | SaberZA/TriviaApp | scripts/web-server.js | JavaScript | mit | 12,498 |
var Diavolo = (function () {
'use strict';
function calculateCostAndTime(size) {
switch (size) {
case 'Small':
return { cost: '6.3', time: 6300 };
case 'Medium':
return { cost: '7.2', time: 7200 };
case 'Large':
return { cost: '8', time: 8000 };
}
}
var NAME =... | slbedu/front-end-web-2015 | exercises/05-javascript-es2015/pizzeria-es5/src/diavolo.js | JavaScript | mit | 607 |