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 |
|---|---|---|---|---|---|
'use strict';
describe('Directive: topHighlights', function () {
// load the directive's module
beforeEach(module('riplive'));
var element,
scope;
beforeEach(inject(function ($rootScope) {
scope = $rootScope.$new();
}));
it('should make hidden element visible', inject(function ($compile) {
... | ripliveit/riplive.it | test/spec/app/directives/top-highlights.js | JavaScript | mit | 507 |
// TODO: [P4] We are moving attachments related to Adaptive Cards out of "component"
// Later, we will rewrite these attachments without Adaptive Cards
// We are leaving the CSS here as-is for now
export default function AnimationCardAttachment() {
return {
// TODO: [P2] We should not set "display" i... | billba/botchat | packages/bundle/src/adaptiveCards/Styles/StyleSet/AnimationCardAttachment.js | JavaScript | mit | 665 |
SirTrevor.Block = (function(){
var Block = function(data, instance_id, sirTrevor) {
SirTrevor.SimpleBlock.apply(this, arguments);
};
var delete_template = [
"<div class='st-block__ui-delete-controls'>",
"<label class='st-block__delete-label'>",
"<%= i18n.t('general:delete') %>",
"</lab... | ansata-biz/sir-trevor-js | src/block.js | JavaScript | mit | 9,577 |
import 'kendo-ui/js/kendo.notification.min';
import './signalr';
export class BindingToSignalr {
constructor() {
this.hubUrl = 'http://kendo.jeroenvinke.nl/signalr';
this.connection = $.hubConnection(this.hubUrl, { useDefaultPath: false});
this.hub = this.connection.createHubProxy('productHub');
this... | smccrea/aurelia-kendoui-plugin | sample/src/samples/grid/binding-to-signalr.js | JavaScript | mit | 1,543 |
'use strict';
module.exports = {
colors: {
black: '#1D2021',
red: '#9D0006',
green: '#79740E',
yellow: '#B57614',
blue: '#076678',
magenta: '#8F3F71',
cyan: '#427B58',
white: '#F9F5D7',
lightBlack: '#928374',
lightRed: '#9D0006',
lightGreen: '#79740E',
lightYellow: '#B... | ooJerryLeeoo/hyper-material-box | scheme/gruvbox-light-hard.js | JavaScript | mit | 705 |
// Dependencies
var Overlap = require("overlap");
// Top Bottom Animation
module.exports = function (options) {
var box = options.box.toString()
, frames = []
, splits = options.rText.split("\n")
, x = options.box.settings.width / 2 - splits[0].length / 2
;
for (var y = 1; y < options.... | IonicaBizau/text-animation | lib/animations/top-bottom.js | JavaScript | mit | 577 |
module.exports = process.env.TEST
| makojs/mako | packages/js/test/fixtures/envvars/index.js | JavaScript | mit | 34 |
/**
* @ngdoc directive
* @name mdTabs
* @module material.components.tabs
*
* @restrict E
*
* @description
* The `<md-tabs>` directive serves as the container for 1..n `<md-tab>` child directives to produces a Tabs components.
* In turn, the nested `<md-tab>` directive is used to specify a tab label for the **h... | skeiter9/javascript-para-todo_demo | webapp/bower_components/material-0.8.3/src/components/tabs/js/tabsDirective.js | JavaScript | mit | 9,069 |
import { ADD_TODO, DELETE_TODO, COMPLETE_TODO, EDIT_TODO, CLEAR_COMPLETED, COMPLETE_ALL } from "../constants/actionType";
export function addTodo(text){
return {
type: ADD_TODO,
text
}
}
export function deleteTodo(id){
return {
type: DELETE_TODO,
id
}
}
export function... | fsy0718/study | libraries/redux/todomvc/actions/todo.js | JavaScript | mit | 673 |
import { connect } from 'react-redux';
import TopBarMenu from './TopBarMenu';
import {
dataDialogShowAction,
} from './../redux/actions';
const mapDispatchToProps = (dispatch) => ({
handleDataDialogShow: () => {
dispatch(dataDialogShowAction());
}
});
const TopBarMenuContainer = connect(null, mapDispatchTo... | Greynight/Exercises | src/components/TopBarMenuContainer.js | JavaScript | mit | 377 |
'use strict';
var path = require('path');
var assert = require('yeoman-assert');
var helpers = require('yeoman-test');
describe('generator-hacknight-web:app', function () {
before(function () {
return helpers.run(path.join(__dirname, '../generators/app'))
.toPromise();
});
it('creates files', function... | hacknightco/generator-hacknight-web | test/app.test.js | JavaScript | mit | 581 |
import React, { Component } from 'react';
import { Meteor } from 'meteor/meteor';
import slug from 'slug';
import Tags from '../../api/Tags/Tags';
import { Creatable as Select } from 'react-select';
import { withTracker } from 'meteor/react-meteor-data';
import { arrayDiff } from '../../modules/utils';
class ChartTags... | globeandmail/chart-tool | meteor/imports/ui/components/ChartTags.js | JavaScript | mit | 2,172 |
/**
*
* Retrieve a [cookie](https://code.google.com/p/selenium/wiki/JsonWireProtocol#Cookie_JSON_Object)
* visible to the current page. You can query a specific cookie by providing the cookie name or
* retrieve all.
*
* <example>
:getCookie.js
client
.setCookie({name: 'test', value: '123'})
... | Risto-Stevcev/webdriverio | lib/commands/getCookie.js | JavaScript | mit | 1,210 |
module.exports = {
API_ROOT: 'https://pure-crag-7012.herokuapp.com'
};
| edazdarevic/ch-client | app/config.js | JavaScript | mit | 73 |
"use strict";
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = void 0;
var _createSvgIcon = _interopRequireDefault(require("./utils/createSvgIcon"));
var _jsxRuntime = require("react/jsx-runtime")... | oliviertassinari/material-ui | packages/mui-icons-material/lib/AirlinesOutlined.js | JavaScript | mit | 611 |
/* global google */
import React from 'react'
import { withGoogleMap, GoogleMap, InfoWindow, Marker, Circle } from 'react-google-maps'
import { Modal, Button } from 'react-materialize'
import SingleThread from '../Threads/SingleThread'
import SearchBox from 'react-google-maps/lib/places/SearchBox'
const iconBullseye ... | Bullseyed/Bullseye | app/components/Map/Map.js | JavaScript | mit | 3,450 |
import React, {Component, PropTypes} from 'react';
import {connect} from 'react-redux';
import Helmet from 'react-helmet';
import * as authActions from 'redux/modules/auth';
@connect(
state => ({user: state.auth.user}),
authActions)
export default class Login extends Component {
static propTypes = {
user: Pr... | sunh11373/t648 | src/containers/Login/Login.js | JavaScript | mit | 1,529 |
module.exports = function(grunt){
grunt.loadNpmTasks('grunt-contrib-uglify');
grunt.loadNpmTasks('grunt-contrib-watch');
grunt.loadNpmTasks('grunt-contrib-compass');
grunt.initConfig({
uglify : {
my_target : {
files : {
'assets/dist/js/script.js' :... | abhisekz/sassy-web | Gruntfile.js | JavaScript | mit | 1,007 |
(function webpackUniversalModuleDefinition(root, factory) {
if(typeof exports === 'object' && typeof module === 'object')
module.exports = factory(require("Vue"));
else if(typeof define === 'function' && define.amd)
define(["Vue"], factory);
else if(typeof exports === 'object')
exports["VueHaruRipple"] = facto... | wsqviva/vue-haru-ripple | dist/ripple.js | JavaScript | mit | 33,189 |
version https://git-lfs.github.com/spec/v1
oid sha256:89ec4fd6ca92db04225a1fb74dd640a5fa634e67bd566991f1afecf1ab1c4bcb
size 27219
| yogeshsaroya/new-cdnjs | ajax/libs/jQuery.mmenu/4.5.7/js/jquery.mmenu.min.all.min.js | JavaScript | mit | 130 |
// JavaScript Olympics
// I paired with Kevin Huang on this challenge.
// This challenge took me 1.5 hours.
// Warm Up
function win (athlete) {
athlete.win = athlete.name + " won the " + athlete.event + "!";
console.log(athlete.win)
};
var sarah = {name: "sarah hughes", event: "ladies' singles"};
win(sarah... | msosland/phase-0 | week-7/javascript_olympics.js | JavaScript | mit | 2,861 |
/*
* cartModule
*/
angular.module('cartModule', [
'ngRoute',
'ngResource',
'coreModule',
'pdpModule',
'visitorModule',
'checkoutModule'
])
.config(['$routeProvider', '$locationProvider',
function($routeProvider, $locationProvider) {
$routeProvider
.when('/cart', {
... | ottemo/ultimo | src/app/cart/init.js | JavaScript | mit | 477 |
import ShiftItem from "component/scheduler/shiftitem";
var Row = {
controller: function(obj) {
return {
mode: "week",
type: "user"
};
},
view: function(ctrl, obj) {
return m(".scheduler-row", {class: "type-" + ctrl.type}, [
m(".row-info", [
... | dolfelt/scheduler-js | src/component/scheduler/row.js | JavaScript | mit | 1,281 |
define(["backbone", "Marionette"], function (backbone, Marionette) {
var Customizer = new backbone.Marionette.Application();
return Customizer;
});
| shawninder/cv.shawninder | src/client/modules/customizer/Customizer.js | JavaScript | mit | 152 |
"use strict";
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
return new (P || (P = Promise))(function (resolve, reject) {
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
function rejected(value) { try { step(gene... | hangilc/myclinic-records | browser-src/search-patient.js | JavaScript | mit | 2,385 |
/* Copyright (c) 2010-2011 Ricebridge */
var common = require('common');
var entity = require('entity');
var E = common.E;
var util = common.util
var eyes = common.eyes
var assert = common.assert
var gex = common.gex
var Entity = entity.Entity;
module.exports = {
utils: function() {
Entity.i... | cloudspace/seneca | test/entity.test.js | JavaScript | mit | 2,305 |
/**
* Route Mappings
* (sails.config.routes)
*
* Your routes map URLs to views and controllers.
*
* If Sails receives a URL that doesn't match any of the routes below,
* it will check for matching files (images, scripts, stylesheets, etc.)
* in your assets directory. e.g. `http://localhost:1337/images/foo.jpg`... | cashlzcj/QFJSPatch | jspatchserver/config/routes.js | JavaScript | mit | 2,446 |
import Marionette from 'backbone.marionette';
let Router = Marionette.AppRouter.extend({
appRoutes: {
"": "home",
"*notFound": "notFound"
},
});
export default Router; | Funkion/srt-editor | browserify/router.js | JavaScript | mit | 175 |
"use strict";
var PandaSchema = {
name: {
type: String,
required: true
},
mood : { type : String, "enum": ["happy", "hungry", "crazy"] },
pooCount : { type : Number, min: 10, max : 100 }
};
module.exports = PandaSchema; | peerigon/alamid | test/shared/Model/schemas/PandaSchema.js | JavaScript | mit | 253 |
/**
* @copyright 2015-present Prometheus Research, LLC
* @flow
*/
import type {CSSPropertySet} from './CSSType';
import type {Variant} from './Stylesheet';
import * as React from 'react';
import createStylesheet, {Stylesheet} from './Stylesheet';
import getComponentDisplayName from './getComponentDisplayName';
e... | prometheusresearch/react-stylesheet | src/style.js | JavaScript | mit | 2,863 |
var Quiz = function() {
this.currentQuestion = 0;
this.totalScore = {
extraversion: 0,
introversion: 0,
sensing: 0,
intuition: 0,
thinking: 0,
feeling: 0,
judging: 0,
perceiving: 0,
none: 0
};
this.questions = [
{
question: "You are almost never late for your appo... | wdi-hk-9/MBTI-GoT | js/questions.js | JavaScript | mit | 22,089 |
declare module 'react-dnd' {
declare function DropTarget<T: ReactClass<*>>(type: string|string[], spec?: Object, collect?: Object, options?: mixed): (component: T) => T;
declare function DragSource<T: ReactClass<*>>(type: string|string[], spec?: Object, collect?: Object, options?: mixed): (component: T) => T;
dec... | LegNeato/flow-typed | definitions/npm/react-dnd_v2.x.x/flow_>=v0.23.x/react-dnd_v2.x.x.js | JavaScript | mit | 526 |
describe('emailer module', function() {
beforeEach(module('emailer'));
var $controller;
var $http;
beforeEach(inject(function(_$controller_, _$http_) {
$controller = _$controller_;
$http = _$http_;
}));
var factory = null;
beforeEach(inject(function(emailer) {
factory = emailer;
}))
de... | christse02/project | app/shared/emailer/emailer.spec.js | JavaScript | mit | 1,091 |
/** Products Data Access Object. */
var db = require('../../lib/db.js');
/**
* Find all available products.
*
* @param {function} callback Callback function.
*/
exports.findAll = function(callback) {
let sql = 'SELECT * FROM product';
db.query(sql, [], function(rows) {
callback(rows);
});
}; | intentor/moip-integration-sample | service/dao/productDao.js | JavaScript | mit | 320 |
'use strict';
/*
* manuscript
* http://github.com/ecasilla
*
* Copyright (c) 2014 Ernie Casilla. All rights reserved.
*/
module.exports = function (grunt) {
grunt.initConfig({
jsbeautifier: {
files: ['<%= jshint.all %>'],
options: {
config: '.jsbeautify'
}
},
simplemocha: {
options: {
g... | ecasilla/code-challenge | Gruntfile.js | JavaScript | mit | 1,711 |
app.directive('connection', function () {
return {
restrict: 'E',
templateUrl: '../connection-interface.html'
};
});
| jenniferarnesen/top-trumps | components/connection.js | JavaScript | mit | 142 |
import * as babel from "@babel/core";
import assert from "assert-simple-tap";
import plugin from "./index";
const testGeneration = (message, code, expectedCode) => {
const transformedCode = babel.transform(code, {
babelrc: false,
plugins: [[plugin, { replacement: ".", original: "foobar" }]]
}).code;
asse... | laat/babel-plugin-transform-rename-import | src/babel7.spec.js | JavaScript | mit | 3,165 |
'use strict';
const { NativeModules } = require('react-native');
const RNPrintPDF = NativeModules.RNPrintPDF;
module.exports.PortablePrint = {
testPrint: (msg) => {
// console.log('NativeModules=testPrint=', NativeModules);
console.log('RNPrintPDF=RNPrintPDF=', RNPrintPDF);
return new Promise((resolve, rej... | chaorong2015/react-native-portable-print | index.js | JavaScript | mit | 1,274 |
'use strict';
define(function(require) {
var angular = require('angular');
require('common/services/displayServices');
require('actions/models');
var template = require('text!./actionButtons.tpl.html');
var ActionButtons = function($q, hotkeyFormatter, language) {
r... | scheunemann/KASPAR | kasparGUI/Web/gui/src/modules/interactions.dead/directives/ActionButtons.js | JavaScript | mit | 880 |
import { clearStyles } from '../util';
export default function () {
let jews = {};
jews.title = document.querySelector('.sub_contents>.article_cont .article_tit>h3').textContent;
jews.subtitle = undefined;
jews.timestamp = {
created: new Date(document.querySelector('.sub_contents>.article_cont ... | teslamint/jews | src/impl/스포츠동아.js | JavaScript | mit | 2,549 |
let screenStyle;
/*fonction pour le bouton poubelle du post-it*/
function Trash(id) {
document.getElementById(id).remove();
}
/*fonction pour le bouton plein écran du post-it*/
function fullscreen(element) {
if(Object.keys(element.classList).some(key => element.classList[key] == "full") === false) {
element.cla... | Adrylen/ubiquitous-giggle | js/buttons.js | JavaScript | mit | 2,300 |
// @flow
export default {
strike: {
textDecoration: 'line-through'
},
underline: {
textDecoration: 'underline'
},
no_underline: {
textDecoration: 'none'
}
}
| devilcoders/tachyons-for-js | src/text-decorators.js | JavaScript | mit | 181 |
function updateRender({ input, state }) {
if (!input.data.render.components.length) {
state.set('debugger.renders', []);
} else {
state.unshift('debugger.renders', input.data.render);
if (state.get('debugger.renders').length > 20) {
state.pop('debugger.renders');
}
}
}
export default update... | cerebral/cerebral-debugger-prototype | versions/v1/modules/Debugger/actions/updateRenders.js | JavaScript | mit | 328 |
const { Command } = require('discord.js-commando');
const { stripIndents } = require('common-tags');
const Blackjack = require('../../structures/games/Blackjack');
const Currency = require('../../structures/currency/Currency');
module.exports = class BlackjackCommand extends Command {
constructor(client) {
super(c... | finajo/timothy | commands/games/blackjack.js | JavaScript | mit | 7,686 |
/**
* Created by endre on 12.10.15.
*/
/**
* Created by endre on 12.10.15.
*/
var HeightMapMesh = function(heightMapGeometry, material) {
// Create the mesh as a widthSegements x heightSegments mesh, each cell is 1x1.
THREE.Mesh.call(this, heightMapGeometry, material);
this.type = 'HeightMapMesh';
... | chris2402/WebGL | three.js-heightmap-texture/src/HeightMapMesh.js | JavaScript | mit | 1,217 |
'use strict';
const FieldFlags = require('../constants/field_flags.js');
const Charsets = require('../constants/charsets.js');
const Types = require('../constants/types.js');
const helpers = require('../helpers');
const genFunc = require('generate-function');
const parserCache = require('./parser_cache.js');
const typ... | jacques/base-application | node_modules/mysql2/lib/parsers/binary_parser.js | JavaScript | mit | 6,244 |
'use strict';
/**
* Record all aspects of a chat user command interaction
*
* @param {Object} ctx Application context
* @param {Object} ctx.db Database context
* @param {Object} message Discord message
* @param {Object} command Command object
* @param {string} alias Command alias used
* @param {Object} result ... | steers/lanodized | src/lib/interaction.js | JavaScript | mit | 1,855 |
/*
* @Author: Nokey
* @Date: 2017-08-16 15:13:19
* @Last Modified by: Nokey
* @Last Modified time: 2017-08-23 21:19:44
*/
'use strict';
import { TimelineLite } from 'gsap'
// Style
import classNames from 'classnames/bind'
import styles from './page2-css'
let _s = classNames.bind(styles)
class Page2 extends Rea... | jkiss/Web-React-Boilerplate | src/pages/home/Page2.js | JavaScript | mit | 1,932 |
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
var androidTextsms = exports.androidTextsms = { "viewBox": "0 0 512 512", "children": [{ "name": "g", "attribs": {}, "children": [{ "name": "path", "attribs": { "d": "M408,64H96c-22.002,0-32,17.998-32,40v344l64-64h280c22.002,0,40-17.998,40-... | xuan6/admin_dashboard_local_dev | node_modules/react-icons-kit/ionicons/androidTextsms.js | JavaScript | mit | 743 |
/******************************************
* *
* Auth: green gerong *
* Date: 2014 *
* blog: http://greengerong.github.io/ *
* github: https://github.com/greengerong *
* *
***********... | greengerong/ng4java-seed | src/main/webapp/scripts/feature/order/controller/OrderCtrl.js | JavaScript | mit | 493 |
module.exports = {
cellDefinitions: {
main: {
children: [
{
children: [
{
extends: 'search'
}
]
}
],
classNames: {
cell: 'facets'
}
},
search: {
children: [
{
children: [
... | ciena-blueplanet/bunsen-core | tests/fixtures/class-name-view.js | JavaScript | mit | 704 |
/*! ngDebug v1.1.0 | (c) 2015 @YannickDot | https://github.com/YannickDot/ngDebug */
(function (root, factory) {
if (typeof define === 'function' && define.amd) {
define(factory);
} else if (typeof exports === 'object') {
module.exports = factory;
} else {
root.$A = factory();
root.ngDebug = root.... | YannickDot/ngDebug | dist/ngDebug.js | JavaScript | mit | 3,371 |
Auslastung.Model = new Class(); | coderbyheart/auslastung | htdocs/js/Auslastung/Model.js | JavaScript | mit | 31 |
Router.map(function () {
this.route('home', {
path: '/',
data: function () {
if (this.ready()) {
if (!Session.get('demoData')) {
var demoData = [];
for (var i = 0; i < 10; i++)
demoData.push(createDemoError());
Session.set('demoData', demoData);
... | AlexBeauchemin/jssavior-platform | meteor-app/client/views/home.js | JavaScript | mit | 1,628 |
import React from "react";
import EventWizardTabFrame from "./EventWizardTabFrame";
import SetupFrame from "./SetupFrame";
const EventWizardFrame = () => (
<div className="container">
<div className="row">
<div className="col-xs-12">
<h1 className="endheader">TBA Event Wizard</h1>
<p>
... | the-blue-alliance/the-blue-alliance | src/frontend/eventwizard/components/EventWizardFrame.js | JavaScript | mit | 959 |
import AppDispatcher from '../dispatchers/AppDispatcher';
class WarrantiesActions {
constructor() {
this.generateActions('setFields', 'postData');
}
}
export default AppDispatcher.createActions(WarrantiesActions);
| aries-auto/ariesautomotive | src/actions/WarrantiesActions.js | JavaScript | mit | 220 |
var C = require('./../module.js');
var zookeeper = require('node-zookeeper-client'),
config = require('./config.js');
var zkClient = zookeeper.createClient(config.addr, { retries : 2 });
C.setZKClient();
zkClient.once('connected', function () {
C.setZKClient( zkClient , 'xpush');
C.setConfig( "test1" , {da... | notdol/node_config_zookeeper | test/connection.js | JavaScript | mit | 439 |
import _extends from "@babel/runtime/helpers/extends";
import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/objectWithoutPropertiesLoose";
var _excluded = ["children", "href", "isSelected", "smallPadding", "className"],
_excluded2 = ["children", "className"];
import React from 'react';
import PropTypes... | KissKissBankBank/kitten | src/esm/components/navigation/header-nav/components/nav.js | JavaScript | mit | 1,589 |
import {combineReducers} from 'redux';
//
// Reducer imports
// -----------------------------------------------------------------------------
import user from './User';
import company from './Company';
//
// Reducer composite
// -----------------------------------------------------------------------------
export de... | alexpalombaro/react-redux-starter-kit | client/reducers/index.js | JavaScript | mit | 365 |
/**
* SoftLayer Documentation Node.js Parser
*
* Copyright (c) 2013 Yani Iliev <yani@iliev.me>
* Licensed under the MIT license.
*
* @author Yani Iliev <yani@iliev.me>
* @copyright 2013 Yani Iliev
* @license
* https://github.com/yani-/blog/master/softlayer-documentation-nodejs-parser
* @version GIT: 1.0.... | yani-/softlayer-documentation-nodejs-parser | lib/service.js | JavaScript | mit | 2,344 |
"use strict"
function draw () {
window.scene.render();
}
| Hatscat/gummy_drugs_attack_webgl | js/draw.js | JavaScript | mit | 59 |
var Init = require("truffle-init");
var MemoryLogger = require("../memorylogger");
var Commander = require("../../../lib/command");
var commands = require("../../../lib/commands");
var copy = require("../../../lib/copy");
var fs = require("fs");
var path = require("path");
var assert = require("assert");
var TestRPC = ... | prashantpawar/truffle | test/scenarios/solidity_testing/with_balances.js | JavaScript | mit | 1,687 |
import { DESCRIPTORS, GLOBAL, TYPED_ARRAYS } from '../helpers/constants';
if (DESCRIPTORS) QUnit.test('%TypedArrayPrototype%.toReversed', assert => {
// we can't implement %TypedArrayPrototype% in all engines, so run all tests for each typed array constructor
for (const name in TYPED_ARRAYS) {
const TypedArray... | zloirock/core-js | tests/tests/esnext.typed-array.to-reversed.js | JavaScript | mit | 1,225 |
'use strict';
/*eslint-disable no-console */
/*
* node examples/google/charts.js > qr.png
*/
var wrapi = require('../../index.js');
var endpoints = {
qr: {
method : 'GET',
path: '',
query: {
cht: 'qr'
},
options: {
encoding: null
}
},
ts: {
method : 'GET',
path: '',
... | palanik/wrapi | examples/google/charts.js | JavaScript | mit | 688 |
const mongoose = require('mongoose');
const Schema = mongoose.Schema;
const schema = new Schema({
name: {
type: String,
required: true
},
style: {
type: String
},
brewery: {
type: String,
required: true
},
abv: {
type: Number
}
});
module... | nthugon/beer-reviewed-journal | server/lib/models/beer.js | JavaScript | mit | 363 |
/**
* Using Rails-like standard naming convention for endpoints.
* GET /api/tasks -> index
* POST /api/tasks -> create
* GET /api/tasks/:id -> show
* PUT /api/tasks/:id -> update
* DELETE /api/tasks/:id -> destroy
*/
'use strict';
var _ ... | aladdin83/MCMS | server/api/task/task.controller.js | JavaScript | mit | 2,378 |
/**
* The quoter tool controller provides a number of functionality around generating quotes
* --------------------------------------
*
* GENERATE A NEW QUOTE, given a totalCost, description, and company information
*
* VIEW EXISTING QUOTE, given a quote ID
*
* EDIT AN EXISTING QUOTE, if user is still in the generate ... | brettshollenberger/mrl001 | client/app/scripts/controllers/tools/quoter/quoterToolController.js | JavaScript | mit | 14,740 |
'use strict';
exports.__esModule = true;
var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };
var _react = requi... | tkporter/react-big-calendar | lib/Week.js | JavaScript | mit | 2,318 |
/**
* 获取参数 key 的值
* @param {string} key
* @param {string} url
* @return {string} 该 key 对应的值
*/
export const getParam = (key, url = window.location.href) => {
const search = url.substring(url.indexOf('?') + 1)
if (search === '') {
return
}
const params = {}
const kvs = search.split('&')
for (const k... | dream-ui/dreamui-js | src/broswer/Url.js | JavaScript | mit | 1,126 |
#!/usr/bin/env node
import meow from 'meow';
import {npmRunPath} from 'npm-run-path';
meow(`
Example
$ export PATH="$(npm-run-path)"
`, {
importMeta: import.meta,
});
console.log(npmRunPath());
| sindresorhus/npm-run-path-cli | cli.js | JavaScript | mit | 201 |
'use strict';
// Requesting needed node modules
let express = require('express'),
bodyParser = require('body-parser'),
mongoose = require('mongoose');
// Connecting to local mongodb
//let connectionString = 'mongodb://127.0.0.1:27017/thestyle';
let connectionString = process.env.MONGOLAB_URI;
mongoose.connect... | veselints/TheStyleServer | app.js | JavaScript | mit | 1,213 |
// Invoke 'strict' JavaScript mode
'use strict';
// Load the module dependencies
var config = require('./config'),
cookieParser = require('cookie-parser'),
passport = require('passport');
// Define the Socket.io configuration method
module.exports = function(server, io, mongoStore) {
// Intercept Socket.io's... | tomato/Reto | config/socketio.js | JavaScript | mit | 1,599 |
//
// Client side boot loader
//
// This file initializes the ES6 System Loader,
// the ServiceWorker - if possible - and starts the initialize client code.
//
import * as path from 'path'
import { Loader } from './loader'
const { filter, shift } = Array.prototype
export default async function() {
// Lookup self s... | jgraichen/lively4-kernel | src/client.js | JavaScript | mit | 2,924 |
define([
'phaser',
'jquery'
], function(Phaser){
var size = {
width: parseInt($('body').width(), 10),
height: parseInt($('body').height(), 10)
};
var Game = new Phaser.Game(size.width, size.height, Phaser.CANVAS, 'demo', {
preload: preload,
create: create,
update: update
});
var preload = functio... | flavienliger/JsTool | wip/phaser/app/scripts/core/core.js | JavaScript | mit | 549 |
var toSpace = require('to-space-case');
/**
* Expose `toPascalCase`.
*/
module.exports = toPascalCase;
/**
* Convert a `string` to pascal case.
*
* @param {String} string
* @return {String}
*/
function toPascalCase (string) {
return toSpace(string).replace(/(?:^|\s)(\w)/g, function (matches, letter) {
... | johnruddell/Simple-Survey | node_modules/duo/node_modules/duo-test/node_modules/to-pascal-case/index.js | JavaScript | mit | 360 |
// @ts-check @flow
import { takeRight, dropRight } from 'lodash';
import * as t from 'babel-types';
import traverse from 'babel-traverse';
import template from 'babel-template';
import generate from 'babel-generator';
type JSASTNode = {
type: string;
key: ?JSASTNode;
value: any;
};
export class ASTStack {
// ... | linonetwo/COOL-to-JavaScript | src/JSASTBuilder.js | JavaScript | mit | 12,186 |
define([
'jquery',
'../constants/css-selectors',
'../constants/note-events'
], function (
jQuery,
cssSelectors,
noteEvents
) {
return function showNote (note) {
jQuery(cssSelectors.EDITOR).val(note ? note.content : '');
document.body.className = 'showing-form';
if (note) {
... | steveukx/mydev.notes | src/web/js/actions/show-note.js | JavaScript | mit | 386 |
const { expect } = require('chai');
const FilterStream = require('../lib/filter_stream');
const S3 = require('../lib/s3');
const ObjectStream = require('../lib/object_stream');
const config = {
Bucket: process.env.s3_bucket,
accessKeyId: process.env.s3_access_key,
secretAccessKey: process.env.s3_secret_access_ke... | MadKudu/kissmetrics-export | test/filter_stream.js | JavaScript | mit | 3,435 |
module.exports = function () {
return "cached subModule";
};
| interlockjs/plugins | packages/localstorage/example/app/cached-module-b.js | JavaScript | mit | 63 |
'use strict';
// Declare app level module which depends on views, and components
var myApp = angular.module('myApp', [
'ui.router',
'myApp.directives',
'myApp.controllers',
]);
myApp.config(function ($stateProvider, $urlRouterProvider) {
$urlRouterProvider.otherwise("/guide");
$stateProvider
.state("guid... | xiaoyangkuaipao/oxygenDepot | app/app.js | JavaScript | mit | 736 |
import {DEFAULTS, CullMode, Comparison} from "../Helix";
import {MaterialPass} from '../material/MaterialPass'
import {ShaderLibrary} from "../shader/ShaderLibrary";
import {RectMesh} from "../mesh/RectMesh";
import {VertexLayout} from "../mesh/VertexLayout";
import {Shader} from "../shader/Shader";
import {GL} from ".... | DerSchmale/helixjs | src/helix-core/effect/EffectPass.js | JavaScript | mit | 2,192 |
var fontlist = function(){ return {
"kind": "webfonts#webfontList",
"items": [
{
"kind": "webfonts#webfont",
"family": "Abel",
"variants": [
"regular"
],
"subsets": [
"latin"
]
},
{
"kind": "webfonts#webfont",
"family": "Abril Fatface",
"variants": [
"400"
],
"subset... | hryk/woffglitch.js | demo/ext/fonts.js | JavaScript | mit | 79,845 |
/*
* grunt-md5
* https://github.com/jney/grunt-md5
*
* Copyright (c) 2012 Jean-Sébastien Ney
* Licensed under the MIT license.
*/
/*global _:true, require:true*/
module.exports = function(grunt) {
'use strict';
// TODO: ditch this when grunt v0.4 is released
grunt.util = grunt.util || grunt.utils;
var... | adrianorsouza/grunt-md5 | tasks/grunt-md5.js | JavaScript | mit | 3,801 |
var functions = require('../../lib/functions.js');
module.exports = function(ds, req, res, next){
if(req.method=='POST' || req.method=='PUT'){
var configSettingId = false;
var urlParts = req.pathname.split('/');
if(urlParts.length==4 && urlParts[2]!=''){
configSettingId... | chromecide/http-flux | actions/config/save.js | JavaScript | mit | 1,508 |
(function (module) {
module.directive('keyPress', ['$rootScope', function ($rootScope) {
return {
restrict: 'A',
link: function (scope, elem) {
var elem = elem[0];
elem.addEventListener('keydown', function (ev) {
console.log(ev.ke... | ArnabBanerji/test_vod | src/scripts/directives/key_press.js | JavaScript | mit | 1,351 |
import React from 'react';
export default class NavBarTop extends React.Component {
constructor(props) {
super(props);
this.handleNavButtonClick = this.handleNavButtonClick.bind(this)
}
handleNavButtonClick(e) {
e.preventDefault()
var newView = e.target.getAttribute("name")
this.props.onT... | BenGoldstein88/portfolio | app/components/NavBarTop.js | JavaScript | mit | 1,460 |
// This is a manifest file that'll be compiled into application.js, which will include all the files
// listed below.
//
// Any JavaScript/Coffee file within this directory, lib/assets/javascripts, vendor/assets/javascripts,
// or vendor/assets/javascripts of plugins, if any, can be referenced here using a relative pat... | koblenski/moebica_app | app/assets/javascripts/application.js | JavaScript | mit | 750 |
require.config({
"paths": {
"jquery": "bower_components/jquery/dist/jquery",
"dataDisplay": "src/js/jquery.dataDisplay"
},
"shim": {
"jquery": { "exports": "$" }
}
});
| assetinfo/jquery.dataDisplay | config.js | JavaScript | mit | 188 |
/**
* Created by cold on 2/15/14.
*/
(function () {
'use strict';
var router;
/**
* The Application class
* For documentation about the URL : http://en.wikipedia.org/wiki/Uniform_resource_locator
*
* Definition of the URL parts
* scheme://domain:port/path?query_... | vincentdesmares/eiw | src/router.js | JavaScript | mit | 3,295 |
'use strict';
const React = require('react');
const App = require('../src/App');
const TodoContainer = require('./todo/TodoContainer');
const NotepadContainer = require('./notepad/NotepadContainer');
const TodoReducers = require('./todo/TodoReducers');
const NotepadReducers = require('./notepad/NotepadReducers');
c... | newtoncodes/react-redux-oop | example/ExampleApp.js | JavaScript | mit | 1,738 |
// Generated by CoffeeScript 1.9.1
/*
* @class Stackla.Base
*/
var Base;
Base = (function() {
function Base(options) {
var attrs, debug;
if (options == null) {
options = {};
}
debug = this.getParams('debug');
attrs = attrs || {};
if (debug) {
this.debug = debug === 'true' || de... | josephj/tagla | src/coffee/base.js | JavaScript | mit | 2,441 |
import Vue from 'vue'
import Router from 'vue-router'
import Home from 'views/home'
const routes = [
{
path: '/',
component: Home
}
]
Vue.use(Router)
export default new Router({ routes })
| xiaoyann/webpack-react-redux-es6-boilerplate | spa/src/router/index.js | JavaScript | mit | 203 |
"use strict";
/**
* Module dependencies.
*/
const mongoose = require('mongoose');
const Schema = mongoose.Schema;
var ExampleSchema = new Schema({});
ExampleSchema.methods = {
/**
* Schema Methods
*
* @param {String}
*
* @return {Boolean}
* @api public
*/
}
mongoose.model('Example', ExampleSchema... | pandaLv/kasweets-server | app/models/example.js | JavaScript | mit | 322 |
import React, { Component } from 'react';
import Button from 'material-ui/Button';
import TextField from 'material-ui/TextField';
import Input from 'material-ui/Input/Input';
import Paper from 'material-ui/Paper';
import Grid from 'material-ui/Grid';
import Typography from 'material-ui/Typography';
import Divider from ... | CiriousJoker/LegacyManager | src/screens/Settings.js | JavaScript | mit | 2,507 |
// ****************************************************************************
// *** this script just rescales some images (can come in handy some times) ***
// ****************************************************************************
var fs = require('fs');
var path = require('path');
var async = require('async'... | mixbe/kerstkaart2013 | app/rescale_images.js | JavaScript | mit | 1,433 |
import I18n from 'npm:i18n-js';
import { helper } from '@ember/component/helper';
import { merge } from '@ember/polyfills';
export function t(params, options) {
let key = params[0];
// The options is an EmptyObject instance, which doesn't respond to
// hasOwnProperty as I18n.t expects.
// https://github.com/em... | apinf/api-umbrella | src/api-umbrella/admin-ui/app/helpers/t.js | JavaScript | mit | 456 |
'use strict'
const test = require('tape-promise').default(require('tape'))
const Stream = require('stream')
const DelayedStream = require('delayed-stream')
const streamToPromise = require('./')
test('readable/emtpy', async function (t) {
const [readable, promise] = Readable()
readable.emit('end')
const buffer... | bendrucker/stream-to-promise | test-readable.js | JavaScript | mit | 2,335 |
/*
RequireJS 2.1.20 Copyright (c) 2010-2015, The Dojo Foundation All Rights Reserved.
Available via the MIT or new BSD license.
see: http://github.com/jrburke/requirejs for details
*/
var requirejs,require,define;
(function(ba){function G(b){return"[object Function]"===K.call(b)}function H(b){return"[object Array]"=... | M-Yankov/Experimental | Experimental/ModuleInNodeJS/libs/require.js | JavaScript | mit | 15,532 |
// @flow
const buildPaths = require('mwp-config').paths;
const path = require('path');
/*
* The service worker plugin will register a root-level route for serving the
* service worker script file.
*
* Disk location of the script file is determined by builder CLI config import.
*/
export function register(server: ... | meetup/meetup-web-platform | packages/mwp-sw-plugin/src/index.js | JavaScript | mit | 1,022 |
import Ember from 'ember';
import ENV from '../config/environment';
export default Ember.Service.extend({
langs: {},
load(lang) {
var _this = this;
return new Ember.RSVP.Promise(function(resolve, reject) {
Ember.$.getJSON(ENV.api + `/seqs/${lang}.list`).then(function(data) {
console.log("Loa... | wordset/wordset-ui | app/services/search.js | JavaScript | mit | 1,159 |