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
iondrimba/pwa-music-player
https://github.com/iondrimba/pwa-music-player/blob/2c0ae3151a963241c165e08c0f118ca720ac3b7e/src/pages/Detail/index.spec.js
src/pages/Detail/index.spec.js
import React from 'react'; import renderer from 'react-test-renderer'; import Detail from '.'; import { shallow } from 'enzyme'; const sampleTrack = { id: 1, 'artwork_url': 'artwork_url', title: 'title', artist: 'artist', percentage: 1, currentTime: 360, duration: 450, playing: false, paused: false, ...
javascript
MIT
2c0ae3151a963241c165e08c0f118ca720ac3b7e
2026-01-05T03:45:09.977208Z
false
iondrimba/pwa-music-player
https://github.com/iondrimba/pwa-music-player/blob/2c0ae3151a963241c165e08c0f118ca720ac3b7e/src/pages/Detail/index.js
src/pages/Detail/index.js
import React, { PureComponent, Fragment } from 'react'; import PropTypes from 'prop-types'; import ProgressBar from '../../components/ProgressBar'; import MediaButton from '../../components/MediaButton'; import AlbumCover from '../../components/AlbumCover'; import convertSecondsToMMss from '../../helpers/timer'; import...
javascript
MIT
2c0ae3151a963241c165e08c0f118ca720ac3b7e
2026-01-05T03:45:09.977208Z
false
iondrimba/pwa-music-player
https://github.com/iondrimba/pwa-music-player/blob/2c0ae3151a963241c165e08c0f118ca720ac3b7e/src/pages/List/index.spec.js
src/pages/List/index.spec.js
import React from 'react'; import renderer from 'react-test-renderer'; import List from '.'; import { shallow } from 'enzyme'; const track = { id: 1, artwork_url: 'artwork_url', title: 'title', artist: 'artist', percentage: 1 }; const tracks = [track]; const buildComponent = (tracks, track, click) => <List ...
javascript
MIT
2c0ae3151a963241c165e08c0f118ca720ac3b7e
2026-01-05T03:45:09.977208Z
false
iondrimba/pwa-music-player
https://github.com/iondrimba/pwa-music-player/blob/2c0ae3151a963241c165e08c0f118ca720ac3b7e/src/pages/List/index.js
src/pages/List/index.js
import React, { PureComponent, Fragment } from 'react'; import PropTypes from 'prop-types'; import ListItem from '../../components/ListItem'; import './style.scss'; class List extends PureComponent { constructor(props) { super(props); this.onClick = this.onClick.bind(this); } onClick(evt) { const i...
javascript
MIT
2c0ae3151a963241c165e08c0f118ca720ac3b7e
2026-01-05T03:45:09.977208Z
false
iondrimba/pwa-music-player
https://github.com/iondrimba/pwa-music-player/blob/2c0ae3151a963241c165e08c0f118ca720ac3b7e/src/pages/Home/index.js
src/pages/Home/index.js
import React, { Component, Fragment } from 'react'; import MediaButton from '../../components/MediaButton'; import { ReactComponent as Headphones } from '../../icons/headphones.svg'; import { ReactComponent as PlayButton } from '../../icons/play-arrow.svg'; import { ReactComponent as Soundcloud } from '../../icons/soun...
javascript
MIT
2c0ae3151a963241c165e08c0f118ca720ac3b7e
2026-01-05T03:45:09.977208Z
false
iondrimba/pwa-music-player
https://github.com/iondrimba/pwa-music-player/blob/2c0ae3151a963241c165e08c0f118ca720ac3b7e/src/pages/About/index.spec.js
src/pages/About/index.spec.js
import React from 'react'; import renderer from 'react-test-renderer'; import About from '.'; describe('About', () => { it('renders without errors', () => { const component = renderer.create(<About/>); const tree = component.toJSON(); expect(tree).toMatchSnapshot(); }); });
javascript
MIT
2c0ae3151a963241c165e08c0f118ca720ac3b7e
2026-01-05T03:45:09.977208Z
false
iondrimba/pwa-music-player
https://github.com/iondrimba/pwa-music-player/blob/2c0ae3151a963241c165e08c0f118ca720ac3b7e/src/pages/About/index.js
src/pages/About/index.js
import React, { PureComponent, Fragment } from 'react'; import { credits } from '../../data'; import './style.scss'; class About extends PureComponent { constructor() { super(); this.state = { credits }; } render() { return ( <Fragment> <div className="content"> <h1 tabIndex...
javascript
MIT
2c0ae3151a963241c165e08c0f118ca720ac3b7e
2026-01-05T03:45:09.977208Z
false
iondrimba/pwa-music-player
https://github.com/iondrimba/pwa-music-player/blob/2c0ae3151a963241c165e08c0f118ca720ac3b7e/src/components/MediaButton/index.spec.js
src/components/MediaButton/index.spec.js
import React from 'react'; import renderer from 'react-test-renderer'; import MediaButton from '.'; import { ReactComponent as RepeatButton } from '../../icons/repeat-arrows.svg'; import { shallow } from 'enzyme'; const buildComponent = (active = true) => <MediaButton name='click me' active={active} icon={<RepeatButton...
javascript
MIT
2c0ae3151a963241c165e08c0f118ca720ac3b7e
2026-01-05T03:45:09.977208Z
false
iondrimba/pwa-music-player
https://github.com/iondrimba/pwa-music-player/blob/2c0ae3151a963241c165e08c0f118ca720ac3b7e/src/components/MediaButton/index.js
src/components/MediaButton/index.js
import React, { Component } from 'react'; import PropTypes from 'prop-types'; import './style.scss'; class MediaButton extends Component { shouldComponentUpdate(prevProps) { return prevProps.active !== this.props.active || prevProps.tabEnabled !== this.props.tabEnabled; } render() { return ( <butt...
javascript
MIT
2c0ae3151a963241c165e08c0f118ca720ac3b7e
2026-01-05T03:45:09.977208Z
false
iondrimba/pwa-music-player
https://github.com/iondrimba/pwa-music-player/blob/2c0ae3151a963241c165e08c0f118ca720ac3b7e/src/components/ProgressBar/index.spec.js
src/components/ProgressBar/index.spec.js
import React from 'react'; import renderer from 'react-test-renderer'; import ProgressBar from '.'; import { shallow } from 'enzyme'; describe('ProgressBar', () => { it('renders defaultProps', () => { const component = renderer.create(<ProgressBar percent={1} />); const tree = component.toJSON(); expec...
javascript
MIT
2c0ae3151a963241c165e08c0f118ca720ac3b7e
2026-01-05T03:45:09.977208Z
false
iondrimba/pwa-music-player
https://github.com/iondrimba/pwa-music-player/blob/2c0ae3151a963241c165e08c0f118ca720ac3b7e/src/components/ProgressBar/index.js
src/components/ProgressBar/index.js
import React, { Component } from 'react'; import PropTypes from 'prop-types'; import './style.scss'; class ProgressBar extends Component { shouldComponentUpdate(prevProps) { return prevProps.percent !== this.props.percent; } render() { return ( <div className="progress-bar"> <div className...
javascript
MIT
2c0ae3151a963241c165e08c0f118ca720ac3b7e
2026-01-05T03:45:09.977208Z
false
iondrimba/pwa-music-player
https://github.com/iondrimba/pwa-music-player/blob/2c0ae3151a963241c165e08c0f118ca720ac3b7e/src/components/Menu/index.spec.js
src/components/Menu/index.spec.js
import React from 'react'; import renderer from 'react-test-renderer'; import Menu from '.'; import sleep from '../../helpers/sleep'; import { mount } from 'enzyme'; describe('Menu', () => { describe('componentDidMount', () => { it('adds class active to hidden elements', async () => { jest.spyOn(Menu.proto...
javascript
MIT
2c0ae3151a963241c165e08c0f118ca720ac3b7e
2026-01-05T03:45:09.977208Z
false
iondrimba/pwa-music-player
https://github.com/iondrimba/pwa-music-player/blob/2c0ae3151a963241c165e08c0f118ca720ac3b7e/src/components/Menu/index.js
src/components/Menu/index.js
import React, { PureComponent } from 'react'; import PropTypes from 'prop-types'; import { ReactComponent as HelpButton } from '../../icons/help-button.svg'; import { ReactComponent as BackButton } from '../../icons/left-arrow.svg'; import { ReactComponent as CloseButton } from '../../icons/close.svg'; import { addClas...
javascript
MIT
2c0ae3151a963241c165e08c0f118ca720ac3b7e
2026-01-05T03:45:09.977208Z
false
iondrimba/pwa-music-player
https://github.com/iondrimba/pwa-music-player/blob/2c0ae3151a963241c165e08c0f118ca720ac3b7e/src/components/Page/index.spec.js
src/components/Page/index.spec.js
import React from 'react'; import renderer from 'react-test-renderer'; import Page from '.'; describe('Page', () => { it('renders defaultProps', () => { const component = renderer.create(<Page active={true} className='home' children={<div>Hello</div>} />); const tree = component.toJSON...
javascript
MIT
2c0ae3151a963241c165e08c0f118ca720ac3b7e
2026-01-05T03:45:09.977208Z
false
iondrimba/pwa-music-player
https://github.com/iondrimba/pwa-music-player/blob/2c0ae3151a963241c165e08c0f118ca720ac3b7e/src/components/Page/index.js
src/components/Page/index.js
import React, { PureComponent } from 'react'; import PropTypes from 'prop-types'; import './style.scss'; class Page extends PureComponent { render() { return ( <section aria-hidden={!this.props.active} className={`${this.props.className} page ${this.props.active ? 'active' : 'unactive'}`}> {React.c...
javascript
MIT
2c0ae3151a963241c165e08c0f118ca720ac3b7e
2026-01-05T03:45:09.977208Z
false
iondrimba/pwa-music-player
https://github.com/iondrimba/pwa-music-player/blob/2c0ae3151a963241c165e08c0f118ca720ac3b7e/src/components/IconButton/index.spec.js
src/components/IconButton/index.spec.js
import React from 'react'; import renderer from 'react-test-renderer'; import { shallow } from 'enzyme'; import IconButton from '.'; import { ReactComponent as RepeatButton } from '../../icons/repeat-arrows.svg'; describe('IconButton', () => { it('renders defaultProps', () => { const component = renderer.create(...
javascript
MIT
2c0ae3151a963241c165e08c0f118ca720ac3b7e
2026-01-05T03:45:09.977208Z
false
iondrimba/pwa-music-player
https://github.com/iondrimba/pwa-music-player/blob/2c0ae3151a963241c165e08c0f118ca720ac3b7e/src/components/IconButton/index.js
src/components/IconButton/index.js
import React, { Component } from 'react'; import PropTypes from 'prop-types'; import './style.scss'; class IconButton extends Component { shouldComponentUpdate(prevProps) { return prevProps.tabEnabled !== this.props.tabEnabled || prevProps.className !== this.props.className; } render() { return ( ...
javascript
MIT
2c0ae3151a963241c165e08c0f118ca720ac3b7e
2026-01-05T03:45:09.977208Z
false
iondrimba/pwa-music-player
https://github.com/iondrimba/pwa-music-player/blob/2c0ae3151a963241c165e08c0f118ca720ac3b7e/src/components/ListItem/index.spec.js
src/components/ListItem/index.spec.js
import React from 'react'; import renderer from 'react-test-renderer'; import ListItem from '.'; import { shallow } from 'enzyme'; const buildComponent = () => <ListItem track={{ id: 1, artwork_url: '/john-doe.jpg', title: 'John Doe title', artist: 'John Doe', }} selectedTrack={{ id: 1, p...
javascript
MIT
2c0ae3151a963241c165e08c0f118ca720ac3b7e
2026-01-05T03:45:09.977208Z
false
iondrimba/pwa-music-player
https://github.com/iondrimba/pwa-music-player/blob/2c0ae3151a963241c165e08c0f118ca720ac3b7e/src/components/ListItem/index.js
src/components/ListItem/index.js
import React, { Component } from 'react'; import PropTypes from 'prop-types'; import ProgressBar from '../ProgressBar'; import albumThumbNail from '../../data/album-thumbnail.png'; import './style.scss'; class ListItem extends Component { shouldComponentUpdate(prevProps) { if(prevProps.selectedTrack.id === this....
javascript
MIT
2c0ae3151a963241c165e08c0f118ca720ac3b7e
2026-01-05T03:45:09.977208Z
false
iondrimba/pwa-music-player
https://github.com/iondrimba/pwa-music-player/blob/2c0ae3151a963241c165e08c0f118ca720ac3b7e/src/components/Loader/index.spec.js
src/components/Loader/index.spec.js
import React from 'react'; import renderer from 'react-test-renderer'; import Loader from '.'; import { mount } from 'enzyme'; describe('Loader', () => { it('renders defaultProps', () => { const component = renderer.create(<Loader />); const tree = component.toJSON(); expect(tree).toMatchSnapshot(); ...
javascript
MIT
2c0ae3151a963241c165e08c0f118ca720ac3b7e
2026-01-05T03:45:09.977208Z
false
iondrimba/pwa-music-player
https://github.com/iondrimba/pwa-music-player/blob/2c0ae3151a963241c165e08c0f118ca720ac3b7e/src/components/Loader/index.js
src/components/Loader/index.js
import React, { PureComponent } from 'react'; import './style.scss'; class Loader extends PureComponent { constructor() { super(); this.loader = React.createRef(); } _addActiveClass() { this.loader.current.classList.add('animate'); } componentDidMount() { const interval = setTimeout(this._...
javascript
MIT
2c0ae3151a963241c165e08c0f118ca720ac3b7e
2026-01-05T03:45:09.977208Z
false
iondrimba/pwa-music-player
https://github.com/iondrimba/pwa-music-player/blob/2c0ae3151a963241c165e08c0f118ca720ac3b7e/src/components/AlbumCover/index.spec.js
src/components/AlbumCover/index.spec.js
import React from 'react'; import renderer from 'react-test-renderer'; import AlbumCover from '.'; import sleep from '../../helpers/sleep'; import { mount } from 'enzyme'; describe('AlbumCover', () => { it('renders defaultProps', () => { const component = renderer.create(<AlbumCover src="/john-doe.jpg" alt="John...
javascript
MIT
2c0ae3151a963241c165e08c0f118ca720ac3b7e
2026-01-05T03:45:09.977208Z
false
iondrimba/pwa-music-player
https://github.com/iondrimba/pwa-music-player/blob/2c0ae3151a963241c165e08c0f118ca720ac3b7e/src/components/AlbumCover/index.js
src/components/AlbumCover/index.js
import React, { PureComponent } from 'react'; import PropTypes from 'prop-types'; import FastAverageColor from 'fast-average-color/dist/index'; import sleep from '../../helpers/sleep'; import { ReactComponent as PictureIcon } from '../../icons/picture.svg'; import './style.scss'; class AlbumCover extends PureComponent...
javascript
MIT
2c0ae3151a963241c165e08c0f118ca720ac3b7e
2026-01-05T03:45:09.977208Z
false
iondrimba/pwa-music-player
https://github.com/iondrimba/pwa-music-player/blob/2c0ae3151a963241c165e08c0f118ca720ac3b7e/src/data/index.js
src/data/index.js
const placeholderData = () => { return [...new Array(10)].map((index, i) => { return { id: i, title: 'loading...', artist: 'loading...', } }); } const credits = [ { label: 'Design inspired by', link: 'https://dribbble.com/shots/3000629-Music-Player-Sketch-Freebie', author: '...
javascript
MIT
2c0ae3151a963241c165e08c0f118ca720ac3b7e
2026-01-05T03:45:09.977208Z
false
iondrimba/pwa-music-player
https://github.com/iondrimba/pwa-music-player/blob/2c0ae3151a963241c165e08c0f118ca720ac3b7e/public/workbox-9cbc1cc6.js
public/workbox-9cbc1cc6.js
define(["exports"],(function(t){"use strict";try{self["workbox:core:6.5.1"]&&_()}catch(t){}const e=(t,...e)=>{let s=t;return e.length>0&&(s+=` :: ${JSON.stringify(e)}`),s};class s extends Error{constructor(t,s){super(e(t,s)),this.name=t,this.details=s}}try{self["workbox:routing:6.5.1"]&&_()}catch(t){}const n=t=>t&&"obj...
javascript
MIT
2c0ae3151a963241c165e08c0f118ca720ac3b7e
2026-01-05T03:45:09.977208Z
false
iondrimba/pwa-music-player
https://github.com/iondrimba/pwa-music-player/blob/2c0ae3151a963241c165e08c0f118ca720ac3b7e/public/workbox-4c782fb9.js
public/workbox-4c782fb9.js
define(["exports"],(function(t){"use strict";try{self["workbox:core:6.5.2"]&&_()}catch(t){}const e=(t,...e)=>{let s=t;return e.length>0&&(s+=` :: ${JSON.stringify(e)}`),s};class s extends Error{constructor(t,s){super(e(t,s)),this.name=t,this.details=s}}try{self["workbox:routing:6.5.2"]&&_()}catch(t){}const n=t=>t&&"obj...
javascript
MIT
2c0ae3151a963241c165e08c0f118ca720ac3b7e
2026-01-05T03:45:09.977208Z
false
iondrimba/pwa-music-player
https://github.com/iondrimba/pwa-music-player/blob/2c0ae3151a963241c165e08c0f118ca720ac3b7e/public/service-worker.js
public/service-worker.js
if(!self.define){let e,i={};const n=(n,c)=>(n=new URL(n+".js",c).href,i[n]||new Promise((i=>{if("document"in self){const e=document.createElement("script");e.src=n,e.onload=i,document.head.appendChild(e)}else e=n,importScripts(n),i()})).then((()=>{let e=i[n];if(!e)throw new Error(`Module ${n} didn’t register its module...
javascript
MIT
2c0ae3151a963241c165e08c0f118ca720ac3b7e
2026-01-05T03:45:09.977208Z
false
iondrimba/pwa-music-player
https://github.com/iondrimba/pwa-music-player/blob/2c0ae3151a963241c165e08c0f118ca720ac3b7e/build/workbox-9cbc1cc6.js
build/workbox-9cbc1cc6.js
define(["exports"],(function(t){"use strict";try{self["workbox:core:6.5.1"]&&_()}catch(t){}const e=(t,...e)=>{let s=t;return e.length>0&&(s+=` :: ${JSON.stringify(e)}`),s};class s extends Error{constructor(t,s){super(e(t,s)),this.name=t,this.details=s}}try{self["workbox:routing:6.5.1"]&&_()}catch(t){}const n=t=>t&&"obj...
javascript
MIT
2c0ae3151a963241c165e08c0f118ca720ac3b7e
2026-01-05T03:45:09.977208Z
false
iondrimba/pwa-music-player
https://github.com/iondrimba/pwa-music-player/blob/2c0ae3151a963241c165e08c0f118ca720ac3b7e/build/workbox-4c782fb9.js
build/workbox-4c782fb9.js
define(["exports"],(function(t){"use strict";try{self["workbox:core:6.5.2"]&&_()}catch(t){}const e=(t,...e)=>{let s=t;return e.length>0&&(s+=` :: ${JSON.stringify(e)}`),s};class s extends Error{constructor(t,s){super(e(t,s)),this.name=t,this.details=s}}try{self["workbox:routing:6.5.2"]&&_()}catch(t){}const n=t=>t&&"obj...
javascript
MIT
2c0ae3151a963241c165e08c0f118ca720ac3b7e
2026-01-05T03:45:09.977208Z
false
iondrimba/pwa-music-player
https://github.com/iondrimba/pwa-music-player/blob/2c0ae3151a963241c165e08c0f118ca720ac3b7e/build/service-worker.js
build/service-worker.js
if(!self.define){let e,i={};const n=(n,c)=>(n=new URL(n+".js",c).href,i[n]||new Promise((i=>{if("document"in self){const e=document.createElement("script");e.src=n,e.onload=i,document.head.appendChild(e)}else e=n,importScripts(n),i()})).then((()=>{let e=i[n];if(!e)throw new Error(`Module ${n} didn’t register its module...
javascript
MIT
2c0ae3151a963241c165e08c0f118ca720ac3b7e
2026-01-05T03:45:09.977208Z
false
iondrimba/pwa-music-player
https://github.com/iondrimba/pwa-music-player/blob/2c0ae3151a963241c165e08c0f118ca720ac3b7e/build/static/js/main.72ff8afd.js
build/static/js/main.72ff8afd.js
/*! For license information please see main.72ff8afd.js.LICENSE.txt */
javascript
MIT
2c0ae3151a963241c165e08c0f118ca720ac3b7e
2026-01-05T03:45:09.977208Z
true
iondrimba/pwa-music-player
https://github.com/iondrimba/pwa-music-player/blob/2c0ae3151a963241c165e08c0f118ca720ac3b7e/build/static/js/871.bcdc0eef.chunk.js
build/static/js/871.bcdc0eef.chunk.js
/*! For license information please see 871.bcdc0eef.chunk.js.LICENSE.txt */ (self.webpackChunkpwa_playlist=self.webpackChunkpwa_playlist||[]).push([[871],{179:function(e,t,r){"use strict";r.d(t,{Z:function(){return u}});var n=r(853),a=r(531),i=r(932),o=r(625),s=r(791),c=r(184),l=function(e){(0,i.Z)(r,e);var t=(0,o.Z)(r...
javascript
MIT
2c0ae3151a963241c165e08c0f118ca720ac3b7e
2026-01-05T03:45:09.977208Z
false
iondrimba/pwa-music-player
https://github.com/iondrimba/pwa-music-player/blob/2c0ae3151a963241c165e08c0f118ca720ac3b7e/build/static/js/11.840a1bdd.chunk.js
build/static/js/11.840a1bdd.chunk.js
"use strict";(self.webpackChunkpwa_playlist=self.webpackChunkpwa_playlist||[]).push([[11],{11:function(e,r,n){n.r(r),n.d(r,{default:function(){return h}});var t=n(853),s=n(531),i=n(932),a=n(625),l=n(791),c=n(612),u=n(184),h=function(e){(0,i.Z)(n,e);var r=(0,a.Z)(n);function n(){var e;return(0,t.Z)(this,n),(e=r.call(thi...
javascript
MIT
2c0ae3151a963241c165e08c0f118ca720ac3b7e
2026-01-05T03:45:09.977208Z
false
iondrimba/pwa-music-player
https://github.com/iondrimba/pwa-music-player/blob/2c0ae3151a963241c165e08c0f118ca720ac3b7e/build/static/js/460.72d718ff.chunk.js
build/static/js/460.72d718ff.chunk.js
"use strict";(self.webpackChunkpwa_playlist=self.webpackChunkpwa_playlist||[]).push([[460],{179:function(r,i,t){t.d(i,{Z:function(){return o}});var a=t(853),s=t(531),e=t(932),n=t(625),A=t(791),c=t(184),l=function(r){(0,e.Z)(t,r);var i=(0,n.Z)(t);function t(){return(0,a.Z)(this,t),i.apply(this,arguments)}return(0,s.Z)(t...
javascript
MIT
2c0ae3151a963241c165e08c0f118ca720ac3b7e
2026-01-05T03:45:09.977208Z
false
sequitur/improv
https://github.com/sequitur/improv/blob/ca58c74e12abc83b079e84f75b320be8ac196af5/gulpfile.js
gulpfile.js
'use strict'; const path = require('path'); const gulp = require('gulp'); const excludeGitignore = require('gulp-exclude-gitignore'); const mocha = require('gulp-mocha'); const istanbul = require('gulp-istanbul'); const nsp = require('gulp-nsp'); const plumber = require('gulp-plumber'); const babel = require('gulp-bab...
javascript
MIT
ca58c74e12abc83b079e84f75b320be8ac196af5
2026-01-05T03:45:17.452097Z
false
sequitur/improv
https://github.com/sequitur/improv/blob/ca58c74e12abc83b079e84f75b320be8ac196af5/test/template.js
test/template.js
import 'should'; import template from '../lib/template.js'; import simple from 'simple-mock'; describe('template', function () { it('returns a string without directives without touching it', function () { const str = 'This is a test string.'; template(str).should.equal(str); }); describe('directives', ...
javascript
MIT
ca58c74e12abc83b079e84f75b320be8ac196af5
2026-01-05T03:45:17.452097Z
false
sequitur/improv
https://github.com/sequitur/improv/blob/ca58c74e12abc83b079e84f75b320be8ac196af5/test/index.js
test/index.js
/* Main Improv file */ import 'should'; import Improv from '../lib'; import simple from 'simple-mock'; describe('improv', function () { const testSnippet = { 'test-snippet': { groups: [ { phrases: ['dog', 'cat', 'pig'] } ] }, 'binding-snippet': { bind: true, ...
javascript
MIT
ca58c74e12abc83b079e84f75b320be8ac196af5
2026-01-05T03:45:17.452097Z
false
sequitur/improv
https://github.com/sequitur/improv/blob/ca58c74e12abc83b079e84f75b320be8ac196af5/test/filters.js
test/filters.js
import should from 'should'; import filters from '../lib/filters.js'; describe('filters', function () { describe('mismatchFilter', function () { const mismatchFilter = filters.mismatchFilter(); const model = { tags: [ ['government', 'autocracy', 'monarchy', 'absolute'], ['economy', 'tou...
javascript
MIT
ca58c74e12abc83b079e84f75b320be8ac196af5
2026-01-05T03:45:17.452097Z
false
sequitur/improv
https://github.com/sequitur/improv/blob/ca58c74e12abc83b079e84f75b320be8ac196af5/lib/template.js
lib/template.js
const TEMPLATE_BUILTINS = { a (text) { if (text.match(/^[aeioAEIO]/)) return `an ${text}`; return `a ${text}`; }, an (text) { return this.a(text); }, cap (text) { return `${text[0].toUpperCase()}${text.slice(1)}`; }, A (text) { return this.cap(this.a(text)); }, // eslint-disable-next-line babel/...
javascript
MIT
ca58c74e12abc83b079e84f75b320be8ac196af5
2026-01-05T03:45:17.452097Z
false
sequitur/improv
https://github.com/sequitur/improv/blob/ca58c74e12abc83b079e84f75b320be8ac196af5/lib/index.js
lib/index.js
import template from './template.js'; import { merge } from 'lodash'; const defaults = { filters: [], reincorporate: false, persistence: true, audit: false, salienceFormula (a) { return a; }, submodeler () { return {}; } }; class Improv { constructor (snippets, options = {}) { /* Constructor for I...
javascript
MIT
ca58c74e12abc83b079e84f75b320be8ac196af5
2026-01-05T03:45:17.452097Z
false
sequitur/improv
https://github.com/sequitur/improv/blob/ca58c74e12abc83b079e84f75b320be8ac196af5/lib/filters.js
lib/filters.js
import { isEqual, partial } from 'lodash'; const TAG_COMPARISON = { TOTAL: Symbol(), PARTIAL: Symbol(), MISMATCH: Symbol() }; function compareTags (a, b) { /* Returns a TAG_COMPARISON value */ if (isEqual(a, b)) return TAG_COMPARISON.TOTAL; // If the tags are unequal but have the same length, it stands to...
javascript
MIT
ca58c74e12abc83b079e84f75b320be8ac196af5
2026-01-05T03:45:17.452097Z
false
sequitur/improv
https://github.com/sequitur/improv/blob/ca58c74e12abc83b079e84f75b320be8ac196af5/demo/hms_core.js
demo/hms_core.js
import Improv from './lib/index.js'; import jetpack from 'fs-jetpack'; function loadSpec () { const spec = {}; const snippetFiles = jetpack.find(`${__dirname}/hms_data`, { matching: '*.json' }); snippetFiles.forEach(function (filename) { const snippet = jetpack.read(filename, 'json'); if (typeof sn...
javascript
MIT
ca58c74e12abc83b079e84f75b320be8ac196af5
2026-01-05T03:45:17.452097Z
false
sequitur/improv
https://github.com/sequitur/improv/blob/ca58c74e12abc83b079e84f75b320be8ac196af5/demo/pets.js
demo/pets.js
import Improv from './lib/index.js'; const spec = { animal: { groups: [ { tags: [['class', 'mammal']], phrases: ['dog', 'cat'] }, { tags: [['class', 'bird']], phrases: ['parrot'] } ] }, root: { groups: [ { tags: [], phrases...
javascript
MIT
ca58c74e12abc83b079e84f75b320be8ac196af5
2026-01-05T03:45:17.452097Z
false
sequitur/improv
https://github.com/sequitur/improv/blob/ca58c74e12abc83b079e84f75b320be8ac196af5/demo/hms.js
demo/hms.js
import hms from './hms_core.js'; import _ from 'lodash'; function main () { console.log('\n---\n'); console.log(hms()); } _.times(10, main);
javascript
MIT
ca58c74e12abc83b079e84f75b320be8ac196af5
2026-01-05T03:45:17.452097Z
false
sequitur/improv
https://github.com/sequitur/improv/blob/ca58c74e12abc83b079e84f75b320be8ac196af5/demo/hms_audit.js
demo/hms_audit.js
import hms from './hms_core.js'; import _ from 'lodash'; function runGen () { hms.generator.gen('root', hms.newModel()); } _.times(1000, runGen); const auditResults = hms.generator.phraseAudit; const sortedSnippets = []; auditResults.forEach(function (_, key) { sortedSnippets.push(key); }); sortedSnippets.sort...
javascript
MIT
ca58c74e12abc83b079e84f75b320be8ac196af5
2026-01-05T03:45:17.452097Z
false
focallocal/fl-maps
https://github.com/focallocal/fl-maps/blob/4b43a50cb113f5dab03073cbba79aa00f3e317c9/jest.config.js
jest.config.js
module.exports = { setupFiles: ['<rootDir>/tests/unit-tests/testsSetup.js'], moduleNameMapper: { '^meteor/mdg:validated-method': '<rootDir>/tests/unit-tests/meteorMocks/validated-method.js', '^meteor/meteoreact:accounts': '<rootDir>/tests/unit-tests/meteorMocks/accounts.js', '^meteor/alanning:roles': '<...
javascript
MIT
4b43a50cb113f5dab03073cbba79aa00f3e317c9
2026-01-05T03:39:41.226936Z
false
focallocal/fl-maps
https://github.com/focallocal/fl-maps/blob/4b43a50cb113f5dab03073cbba79aa00f3e317c9/.deployment/brightertomorrowmap/mup.js
.deployment/brightertomorrowmap/mup.js
var secret = require('./mup-secrets.json') module.exports = { servers: { one: { host: '178.62.233.44', username: 'deploy', pem: './travis-ssh-key' } }, app: { name: 'brightertomorrowmap', path: '../../.', docker: { image: 'zodern/meteor:root' }, servers: { ...
javascript
MIT
4b43a50cb113f5dab03073cbba79aa00f3e317c9
2026-01-05T03:39:41.226936Z
false
focallocal/fl-maps
https://github.com/focallocal/fl-maps/blob/4b43a50cb113f5dab03073cbba79aa00f3e317c9/.deployment/testing/mup.js
.deployment/testing/mup.js
module.exports = { servers: { one: { host: '134.122.58.242', username: 'deploy', pem: './travis-ssh-key' } }, app: { name: 'testing.publichappinessmovement.com', path: '../../.', docker: { image: 'zodern/meteor:root' }, servers: { one: {} }, buildO...
javascript
MIT
4b43a50cb113f5dab03073cbba79aa00f3e317c9
2026-01-05T03:39:41.226936Z
false
focallocal/fl-maps
https://github.com/focallocal/fl-maps/blob/4b43a50cb113f5dab03073cbba79aa00f3e317c9/.deployment/publichappinessmovement/mup.js
.deployment/publichappinessmovement/mup.js
var secret = require('./mup-secrets.json') module.exports = { servers: { one: { host: '167.71.2.39', username: 'deploy', password: secret.password } }, app: { name: 'publichappinessmovement', path: '../../.', docker: { image: 'zodern/meteor:root' }, servers: { ...
javascript
MIT
4b43a50cb113f5dab03073cbba79aa00f3e317c9
2026-01-05T03:39:41.226936Z
false
focallocal/fl-maps
https://github.com/focallocal/fl-maps/blob/4b43a50cb113f5dab03073cbba79aa00f3e317c9/tests/unit-tests/testsSetup.js
tests/unit-tests/testsSetup.js
import './globalMocks' import * as enzyme from 'enzyme' import Adapter from 'enzyme-adapter-react-16' enzyme.configure({ adapter: new Adapter() }) // silence warnings global.console.warn = jest.fn()
javascript
MIT
4b43a50cb113f5dab03073cbba79aa00f3e317c9
2026-01-05T03:39:41.226936Z
false
focallocal/fl-maps
https://github.com/focallocal/fl-maps/blob/4b43a50cb113f5dab03073cbba79aa00f3e317c9/tests/unit-tests/helpers/uniformsSchema.js
tests/unit-tests/helpers/uniformsSchema.js
import SimpleSchema from 'simpl-schema' import createSchemaBridge from 'uniforms/createSchemaBridge' const createSchema = schema => createSchemaBridge(new SimpleSchema(schema)) export default createSchema
javascript
MIT
4b43a50cb113f5dab03073cbba79aa00f3e317c9
2026-01-05T03:39:41.226936Z
false
focallocal/fl-maps
https://github.com/focallocal/fl-maps/blob/4b43a50cb113f5dab03073cbba79aa00f3e317c9/tests/unit-tests/helpers/fakeData.js
tests/unit-tests/helpers/fakeData.js
import faker from 'faker' export function generateFakeEvents (length = 3) { return Array(length).fill(generateEvent()) } function generateEvent () { return { 'organiser': { _id: faker.random.uuid(), name: faker.name.findName() }, 'categories': [ { 'name': 'Pillow Fight 4Connection', ...
javascript
MIT
4b43a50cb113f5dab03073cbba79aa00f3e317c9
2026-01-05T03:39:41.226936Z
false
focallocal/fl-maps
https://github.com/focallocal/fl-maps/blob/4b43a50cb113f5dab03073cbba79aa00f3e317c9/tests/unit-tests/helpers/uniformsContext.js
tests/unit-tests/helpers/uniformsContext.js
import randomIds from 'uniforms/randomIds' import createSchema from './uniformsSchema' const randomId = randomIds() const createContext = (schema, context) => ({ context: { uniforms: { error: null, model: {}, name: [], onChange () {}, ...context, randomId, schema: cr...
javascript
MIT
4b43a50cb113f5dab03073cbba79aa00f3e317c9
2026-01-05T03:39:41.226936Z
false
focallocal/fl-maps
https://github.com/focallocal/fl-maps/blob/4b43a50cb113f5dab03073cbba79aa00f3e317c9/tests/unit-tests/globalMocks/GoogleMapsMock.js
tests/unit-tests/globalMocks/GoogleMapsMock.js
class GeocoderMock { geocode ({ address, placeId }, callback) { if (address) { this._geocodeAddress(address, callback) } else if (placeId) { this._geocodePlaceID(placeId, callback) } else { // callback({}, 'ZERO_RESULTS') } } _geocodeAddress (address, callback) { if (address...
javascript
MIT
4b43a50cb113f5dab03073cbba79aa00f3e317c9
2026-01-05T03:39:41.226936Z
false
focallocal/fl-maps
https://github.com/focallocal/fl-maps/blob/4b43a50cb113f5dab03073cbba79aa00f3e317c9/tests/unit-tests/globalMocks/index.js
tests/unit-tests/globalMocks/index.js
import './StorageMock' import './GoogleMapsMock' import './GeneralMocks'
javascript
MIT
4b43a50cb113f5dab03073cbba79aa00f3e317c9
2026-01-05T03:39:41.226936Z
false
focallocal/fl-maps
https://github.com/focallocal/fl-maps/blob/4b43a50cb113f5dab03073cbba79aa00f3e317c9/tests/unit-tests/globalMocks/GeneralMocks.js
tests/unit-tests/globalMocks/GeneralMocks.js
const geolocation = { getCurrentPosition: () => {} } global.navigator.geolocation = geolocation // Internals window.__setDocumentTitle = jest.fn()
javascript
MIT
4b43a50cb113f5dab03073cbba79aa00f3e317c9
2026-01-05T03:39:41.226936Z
false
focallocal/fl-maps
https://github.com/focallocal/fl-maps/blob/4b43a50cb113f5dab03073cbba79aa00f3e317c9/tests/unit-tests/globalMocks/StorageMock.js
tests/unit-tests/globalMocks/StorageMock.js
class LocalStorageMock { constructor () { this.store = {} } clear () { this.store = {} } getItem (key) { return this.store[key] || null } setItem (key, value) { this.store[key] = value.toString() } removeItem (key) { delete this.store[key] } } class SessionStorageMock { co...
javascript
MIT
4b43a50cb113f5dab03073cbba79aa00f3e317c9
2026-01-05T03:39:41.226936Z
false
focallocal/fl-maps
https://github.com/focallocal/fl-maps/blob/4b43a50cb113f5dab03073cbba79aa00f3e317c9/tests/unit-tests/meteorMocks/accounts.js
tests/unit-tests/meteorMocks/accounts.js
const Accounts = { call: jest.fn() } export { Accounts as default }
javascript
MIT
4b43a50cb113f5dab03073cbba79aa00f3e317c9
2026-01-05T03:39:41.226936Z
false
focallocal/fl-maps
https://github.com/focallocal/fl-maps/blob/4b43a50cb113f5dab03073cbba79aa00f3e317c9/tests/unit-tests/meteorMocks/validated-method.js
tests/unit-tests/meteorMocks/validated-method.js
const Roles = { call: jest.fn() } export { Roles as default }
javascript
MIT
4b43a50cb113f5dab03073cbba79aa00f3e317c9
2026-01-05T03:39:41.226936Z
false
focallocal/fl-maps
https://github.com/focallocal/fl-maps/blob/4b43a50cb113f5dab03073cbba79aa00f3e317c9/tests/unit-tests/meteorMocks/mongo.js
tests/unit-tests/meteorMocks/mongo.js
const Mongo = { Collection: function () { return { attachSchema: jest.fn() } } } export { Mongo }
javascript
MIT
4b43a50cb113f5dab03073cbba79aa00f3e317c9
2026-01-05T03:39:41.226936Z
false
focallocal/fl-maps
https://github.com/focallocal/fl-maps/blob/4b43a50cb113f5dab03073cbba79aa00f3e317c9/tests/unit-tests/meteorMocks/ddp-rate-limiter.js
tests/unit-tests/meteorMocks/ddp-rate-limiter.js
const DDPRateLimiter = { addRule: jest.fn(), setErrorMessage: jest.fn() } export { DDPRateLimiter }
javascript
MIT
4b43a50cb113f5dab03073cbba79aa00f3e317c9
2026-01-05T03:39:41.226936Z
false
focallocal/fl-maps
https://github.com/focallocal/fl-maps/blob/4b43a50cb113f5dab03073cbba79aa00f3e317c9/tests/unit-tests/meteorMocks/react-meteor-data.js
tests/unit-tests/meteorMocks/react-meteor-data.js
import React, { Component } from 'react' const withTracker = (options) => { let options_ = options if (typeof options === 'function') { options_ = options() } return (WrappedComponent) => ( class WrappingComponents extends Component { render () { return <WrappedComponent {...options_} />...
javascript
MIT
4b43a50cb113f5dab03073cbba79aa00f3e317c9
2026-01-05T03:39:41.226936Z
false
focallocal/fl-maps
https://github.com/focallocal/fl-maps/blob/4b43a50cb113f5dab03073cbba79aa00f3e317c9/tests/unit-tests/meteorMocks/roles.js
tests/unit-tests/meteorMocks/roles.js
const Roles = { call: jest.fn() } export { Roles as default }
javascript
MIT
4b43a50cb113f5dab03073cbba79aa00f3e317c9
2026-01-05T03:39:41.226936Z
false
focallocal/fl-maps
https://github.com/focallocal/fl-maps/blob/4b43a50cb113f5dab03073cbba79aa00f3e317c9/tests/unit-tests/meteorMocks/meteor.js
tests/unit-tests/meteorMocks/meteor.js
const Meteor = { absoluteUrl: jest.fn(), user: jest.fn(), userId: jest.fn(), call: jest.fn(), settings: { public: { gm: { key: '' } } } } export { Meteor as default, Meteor }
javascript
MIT
4b43a50cb113f5dab03073cbba79aa00f3e317c9
2026-01-05T03:39:41.226936Z
false
focallocal/fl-maps
https://github.com/focallocal/fl-maps/blob/4b43a50cb113f5dab03073cbba79aa00f3e317c9/server/main.js
server/main.js
import '/imports/both' import './development' import './methods' import './publications' import './docuss'
javascript
MIT
4b43a50cb113f5dab03073cbba79aa00f3e317c9
2026-01-05T03:39:41.226936Z
false
focallocal/fl-maps
https://github.com/focallocal/fl-maps/blob/4b43a50cb113f5dab03073cbba79aa00f3e317c9/server/methods/index.js
server/methods/index.js
import './events' import './general' import './admin' import './users'
javascript
MIT
4b43a50cb113f5dab03073cbba79aa00f3e317c9
2026-01-05T03:39:41.226936Z
false
focallocal/fl-maps
https://github.com/focallocal/fl-maps/blob/4b43a50cb113f5dab03073cbba79aa00f3e317c9/server/methods/admin/addRole.js
server/methods/admin/addRole.js
import { Roles } from 'meteor/alanning:roles' import { Meteor } from 'meteor/meteor' import { ValidatedMethod } from 'meteor/mdg:validated-method' import SimpleSchema from 'simpl-schema' import { logRateLimit } from '/server/security/rate-limiter' const name = 'Admin.addRole' const createAdmin = new ValidatedMethod({ ...
javascript
MIT
4b43a50cb113f5dab03073cbba79aa00f3e317c9
2026-01-05T03:39:41.226936Z
false
focallocal/fl-maps
https://github.com/focallocal/fl-maps/blob/4b43a50cb113f5dab03073cbba79aa00f3e317c9/server/methods/admin/getUsers.js
server/methods/admin/getUsers.js
import { Meteor } from 'meteor/meteor' import { ValidatedMethod } from 'meteor/mdg:validated-method' import SimpleSchema from 'simpl-schema' import { logRateLimit } from '/server/security/rate-limiter' const name = 'Admin.getUsers' const getUsers = new ValidatedMethod({ name, mixins: [], validate: new SimpleSche...
javascript
MIT
4b43a50cb113f5dab03073cbba79aa00f3e317c9
2026-01-05T03:39:41.226936Z
false
focallocal/fl-maps
https://github.com/focallocal/fl-maps/blob/4b43a50cb113f5dab03073cbba79aa00f3e317c9/server/methods/admin/deleteUser.js
server/methods/admin/deleteUser.js
import { Roles } from 'meteor/alanning:roles' import { Meteor } from 'meteor/meteor' import { ValidatedMethod } from 'meteor/mdg:validated-method' import SimpleSchema from 'simpl-schema' import { logRateLimit } from '/server/security/rate-limiter' const name = 'Admin.deleteUser' const createAdmin = new ValidatedMethod...
javascript
MIT
4b43a50cb113f5dab03073cbba79aa00f3e317c9
2026-01-05T03:39:41.226936Z
false
focallocal/fl-maps
https://github.com/focallocal/fl-maps/blob/4b43a50cb113f5dab03073cbba79aa00f3e317c9/server/methods/admin/mergeUsers.js
server/methods/admin/mergeUsers.js
import { Meteor } from 'meteor/meteor'; import { ValidatedMethod } from 'meteor/mdg:validated-method'; import { Roles } from 'meteor/alanning:roles'; import Events from '/imports/both/collections/events'; export const mergeUsers = new ValidatedMethod({ name: 'Admin.mergeUsers', validate({ sourceUserId, targetUs...
javascript
MIT
4b43a50cb113f5dab03073cbba79aa00f3e317c9
2026-01-05T03:39:41.226936Z
false
focallocal/fl-maps
https://github.com/focallocal/fl-maps/blob/4b43a50cb113f5dab03073cbba79aa00f3e317c9/server/methods/admin/deletePosts.js
server/methods/admin/deletePosts.js
import { Meteor } from 'meteor/meteor'; import { ValidatedMethod } from 'meteor/mdg:validated-method'; import { Roles } from 'meteor/alanning:roles'; import { Events } from '/imports/both/collections/events'; export const deletePosts = new ValidatedMethod({ name: 'Admin.deletePosts', validate(postIds) { if ...
javascript
MIT
4b43a50cb113f5dab03073cbba79aa00f3e317c9
2026-01-05T03:39:41.226936Z
false
focallocal/fl-maps
https://github.com/focallocal/fl-maps/blob/4b43a50cb113f5dab03073cbba79aa00f3e317c9/server/methods/admin/index.js
server/methods/admin/index.js
import './addRole' import './changeRole' import './checkPermissions' import './deleteUser' import './getUsers' import './getEvents' import './getPosts' import './deletePosts' import './searchUsers' import './deleteAllEvents' import './syncDiscourseUsers' import './mergeUsers'
javascript
MIT
4b43a50cb113f5dab03073cbba79aa00f3e317c9
2026-01-05T03:39:41.226936Z
false
focallocal/fl-maps
https://github.com/focallocal/fl-maps/blob/4b43a50cb113f5dab03073cbba79aa00f3e317c9/server/methods/admin/deleteAllEvents.js
server/methods/admin/deleteAllEvents.js
import { Meteor } from 'meteor/meteor' import { DDPRateLimiter } from 'meteor/ddp-rate-limiter' import { ValidatedMethod } from 'meteor/mdg:validated-method' import Events from '/imports/both/collections/events' import { logRateLimit } from '/server/security/rate-limiter' const name = 'Admin.deleteAllEvents' const new...
javascript
MIT
4b43a50cb113f5dab03073cbba79aa00f3e317c9
2026-01-05T03:39:41.226936Z
false
focallocal/fl-maps
https://github.com/focallocal/fl-maps/blob/4b43a50cb113f5dab03073cbba79aa00f3e317c9/server/methods/admin/checkPermissions.js
server/methods/admin/checkPermissions.js
import { Roles } from 'meteor/alanning:roles' import { Meteor } from 'meteor/meteor' import { ValidatedMethod } from 'meteor/mdg:validated-method' import SimpleSchema from 'simpl-schema' import { logRateLimit } from '/server/security/rate-limiter' const name = 'Admin.checkPermissions' const checkPermissions = new Vali...
javascript
MIT
4b43a50cb113f5dab03073cbba79aa00f3e317c9
2026-01-05T03:39:41.226936Z
false
focallocal/fl-maps
https://github.com/focallocal/fl-maps/blob/4b43a50cb113f5dab03073cbba79aa00f3e317c9/server/methods/admin/syncDiscourseUsers.js
server/methods/admin/syncDiscourseUsers.js
import { Meteor } from 'meteor/meteor'; import { Accounts } from 'meteor/accounts-base'; import { Roles } from 'meteor/alanning:roles'; /** * Syncs users from Discourse to the fl-maps database. * Since Discourse SSO already handles user authentication and profile data, * this method now updates existing users' prof...
javascript
MIT
4b43a50cb113f5dab03073cbba79aa00f3e317c9
2026-01-05T03:39:41.226936Z
false
focallocal/fl-maps
https://github.com/focallocal/fl-maps/blob/4b43a50cb113f5dab03073cbba79aa00f3e317c9/server/methods/admin/changeRole.js
server/methods/admin/changeRole.js
import { Roles } from 'meteor/alanning:roles' import { Meteor } from 'meteor/meteor' import { ValidatedMethod } from 'meteor/mdg:validated-method' import SimpleSchema from 'simpl-schema' import { logRateLimit } from '/server/security/rate-limiter' const name = 'Admin.changeRole' const changeRole = new ValidatedMethod(...
javascript
MIT
4b43a50cb113f5dab03073cbba79aa00f3e317c9
2026-01-05T03:39:41.226936Z
false
focallocal/fl-maps
https://github.com/focallocal/fl-maps/blob/4b43a50cb113f5dab03073cbba79aa00f3e317c9/server/methods/admin/searchUsers.js
server/methods/admin/searchUsers.js
import { Meteor } from 'meteor/meteor' import { ValidatedMethod } from 'meteor/mdg:validated-method' import SimpleSchema from 'simpl-schema' import { logRateLimit } from '/server/security/rate-limiter' const name = 'Admin.searchUsers' const getUsers = new ValidatedMethod({ name, mixins: [], validate: new SimpleS...
javascript
MIT
4b43a50cb113f5dab03073cbba79aa00f3e317c9
2026-01-05T03:39:41.226936Z
false
focallocal/fl-maps
https://github.com/focallocal/fl-maps/blob/4b43a50cb113f5dab03073cbba79aa00f3e317c9/server/methods/admin/getPosts.js
server/methods/admin/getPosts.js
import { Meteor } from 'meteor/meteor'; import { ValidatedMethod } from 'meteor/mdg:validated-method'; import { Roles } from 'meteor/alanning:roles'; import { Events } from '/imports/both/collections/events'; export const getPosts = new ValidatedMethod({ name: 'Admin.getPosts', validate({ searchQuery, searchFil...
javascript
MIT
4b43a50cb113f5dab03073cbba79aa00f3e317c9
2026-01-05T03:39:41.226936Z
false
focallocal/fl-maps
https://github.com/focallocal/fl-maps/blob/4b43a50cb113f5dab03073cbba79aa00f3e317c9/server/methods/admin/getEvents.js
server/methods/admin/getEvents.js
import { DDPRateLimiter } from 'meteor/ddp-rate-limiter' import { ValidatedMethod } from 'meteor/mdg:validated-method' import Events from '/imports/both/collections/events' import SimpleSchema from 'simpl-schema' import { logRateLimit } from '/server/security/rate-limiter' const name = 'Admin.getEvents' const getEvent...
javascript
MIT
4b43a50cb113f5dab03073cbba79aa00f3e317c9
2026-01-05T03:39:41.226936Z
false
focallocal/fl-maps
https://github.com/focallocal/fl-maps/blob/4b43a50cb113f5dab03073cbba79aa00f3e317c9/server/methods/__tests__/editEvent.test.js
server/methods/__tests__/editEvent.test.js
import { constructNewDocument } from '../events/editEvent' describe('editEvent method', () => { test('constructNewDocumnt rules', () => { const model = { _id: '#1', createdAt: 'new-date', engagement: { limit: 1, attendees: ['#1'] }, organiser: '#1' } const p...
javascript
MIT
4b43a50cb113f5dab03073cbba79aa00f3e317c9
2026-01-05T03:39:41.226936Z
false
focallocal/fl-maps
https://github.com/focallocal/fl-maps/blob/4b43a50cb113f5dab03073cbba79aa00f3e317c9/server/methods/general/index.js
server/methods/general/index.js
import './location'
javascript
MIT
4b43a50cb113f5dab03073cbba79aa00f3e317c9
2026-01-05T03:39:41.226936Z
false
focallocal/fl-maps
https://github.com/focallocal/fl-maps/blob/4b43a50cb113f5dab03073cbba79aa00f3e317c9/server/methods/general/location.js
server/methods/general/location.js
import { Meteor } from 'meteor/meteor' import { DDPRateLimiter } from 'meteor/ddp-rate-limiter' import { ValidatedMethod } from 'meteor/mdg:validated-method' import { HTTP } from 'meteor/http' import { logRateLimit } from '/server/security/rate-limiter' const name = 'General.getUserLocation' const getUserLocation = ne...
javascript
MIT
4b43a50cb113f5dab03073cbba79aa00f3e317c9
2026-01-05T03:39:41.226936Z
false
focallocal/fl-maps
https://github.com/focallocal/fl-maps/blob/4b43a50cb113f5dab03073cbba79aa00f3e317c9/server/methods/events/getEvent.js
server/methods/events/getEvent.js
import { Meteor } from 'meteor/meteor' import { DDPRateLimiter } from 'meteor/ddp-rate-limiter' import { ValidatedMethod } from 'meteor/mdg:validated-method' import Events from '/imports/both/collections/events' import SimpleSchema from 'simpl-schema' import { logRateLimit } from '/server/security/rate-limiter' const ...
javascript
MIT
4b43a50cb113f5dab03073cbba79aa00f3e317c9
2026-01-05T03:39:41.226936Z
false
focallocal/fl-maps
https://github.com/focallocal/fl-maps/blob/4b43a50cb113f5dab03073cbba79aa00f3e317c9/server/methods/events/index.js
server/methods/events/index.js
import './attendEvent' import './editEvent' import './getEvents' import './getFutureEvents' import './getEvent' import './getEventId' import './newEvent' import './deleteEvent'
javascript
MIT
4b43a50cb113f5dab03073cbba79aa00f3e317c9
2026-01-05T03:39:41.226936Z
false
focallocal/fl-maps
https://github.com/focallocal/fl-maps/blob/4b43a50cb113f5dab03073cbba79aa00f3e317c9/server/methods/events/newEvent.js
server/methods/events/newEvent.js
import { Meteor } from 'meteor/meteor' import { DDPRateLimiter } from 'meteor/ddp-rate-limiter' import { ValidatedMethod } from 'meteor/mdg:validated-method' import Events, { EventsSchema } from '/imports/both/collections/events' import { logRateLimit } from '/server/security/rate-limiter' const name = 'Events.newEven...
javascript
MIT
4b43a50cb113f5dab03073cbba79aa00f3e317c9
2026-01-05T03:39:41.226936Z
false
focallocal/fl-maps
https://github.com/focallocal/fl-maps/blob/4b43a50cb113f5dab03073cbba79aa00f3e317c9/server/methods/events/deleteEvent.js
server/methods/events/deleteEvent.js
import { Meteor } from 'meteor/meteor' import { DDPRateLimiter } from 'meteor/ddp-rate-limiter' import { ValidatedMethod } from 'meteor/mdg:validated-method' import Events, { EventsSchema } from '/imports/both/collections/events' import { logRateLimit } from '/server/security/rate-limiter' const name = 'Events.deleteE...
javascript
MIT
4b43a50cb113f5dab03073cbba79aa00f3e317c9
2026-01-05T03:39:41.226936Z
false
focallocal/fl-maps
https://github.com/focallocal/fl-maps/blob/4b43a50cb113f5dab03073cbba79aa00f3e317c9/server/methods/events/attendEvent.js
server/methods/events/attendEvent.js
import { Meteor } from 'meteor/meteor' import { DDPRateLimiter } from 'meteor/ddp-rate-limiter' import { ValidatedMethod } from 'meteor/mdg:validated-method' import Events from '/imports/both/collections/events' import SimpleSchema from 'simpl-schema' import { logRateLimit } from '/server/security/rate-limiter' /* M...
javascript
MIT
4b43a50cb113f5dab03073cbba79aa00f3e317c9
2026-01-05T03:39:41.226936Z
false
focallocal/fl-maps
https://github.com/focallocal/fl-maps/blob/4b43a50cb113f5dab03073cbba79aa00f3e317c9/server/methods/events/getFutureEvents.js
server/methods/events/getFutureEvents.js
import { DDPRateLimiter } from 'meteor/ddp-rate-limiter' import { ValidatedMethod } from 'meteor/mdg:validated-method' import Events from '/imports/both/collections/events' import SimpleSchema from 'simpl-schema' import { logRateLimit } from '/server/security/rate-limiter' const name = 'Events.getFutureEvents' const g...
javascript
MIT
4b43a50cb113f5dab03073cbba79aa00f3e317c9
2026-01-05T03:39:41.226936Z
false
focallocal/fl-maps
https://github.com/focallocal/fl-maps/blob/4b43a50cb113f5dab03073cbba79aa00f3e317c9/server/methods/events/editEvent.js
server/methods/events/editEvent.js
import { Meteor } from 'meteor/meteor' import { DDPRateLimiter } from 'meteor/ddp-rate-limiter' import { ValidatedMethod } from 'meteor/mdg:validated-method' import Events, { EventsSchema } from '/imports/both/collections/events' import { logRateLimit } from '/server/security/rate-limiter' const name = 'Events.editEve...
javascript
MIT
4b43a50cb113f5dab03073cbba79aa00f3e317c9
2026-01-05T03:39:41.226936Z
false
focallocal/fl-maps
https://github.com/focallocal/fl-maps/blob/4b43a50cb113f5dab03073cbba79aa00f3e317c9/server/methods/events/getEventId.js
server/methods/events/getEventId.js
import { Meteor } from 'meteor/meteor' import { DDPRateLimiter } from 'meteor/ddp-rate-limiter' import { ValidatedMethod } from 'meteor/mdg:validated-method' import Events from '/imports/both/collections/events' import SimpleSchema from 'simpl-schema' import { logRateLimit } from '/server/security/rate-limiter' const ...
javascript
MIT
4b43a50cb113f5dab03073cbba79aa00f3e317c9
2026-01-05T03:39:41.226936Z
false
focallocal/fl-maps
https://github.com/focallocal/fl-maps/blob/4b43a50cb113f5dab03073cbba79aa00f3e317c9/server/methods/events/getEvents.js
server/methods/events/getEvents.js
import { DDPRateLimiter } from 'meteor/ddp-rate-limiter' import { ValidatedMethod } from 'meteor/mdg:validated-method' import Events from '/imports/both/collections/events' import SimpleSchema from 'simpl-schema' import { logRateLimit } from '/server/security/rate-limiter' const name = 'Events.getEvents' const getEven...
javascript
MIT
4b43a50cb113f5dab03073cbba79aa00f3e317c9
2026-01-05T03:39:41.226936Z
false
focallocal/fl-maps
https://github.com/focallocal/fl-maps/blob/4b43a50cb113f5dab03073cbba79aa00f3e317c9/server/methods/users/fetchDiscourseAvatar.js
server/methods/users/fetchDiscourseAvatar.js
import { Meteor } from 'meteor/meteor' import { HTTP } from 'meteor/http' import { check } from 'meteor/check' import { getDiscourseOrigin } from '/imports/both/utils/discourse' Meteor.methods({ 'users.fetchDiscourseAvatar' (input) { const username = typeof input === 'string' ? input : input?.username if (ty...
javascript
MIT
4b43a50cb113f5dab03073cbba79aa00f3e317c9
2026-01-05T03:39:41.226936Z
false
focallocal/fl-maps
https://github.com/focallocal/fl-maps/blob/4b43a50cb113f5dab03073cbba79aa00f3e317c9/server/methods/users/index.js
server/methods/users/index.js
import './fetchDiscourseAvatar'
javascript
MIT
4b43a50cb113f5dab03073cbba79aa00f3e317c9
2026-01-05T03:39:41.226936Z
false
focallocal/fl-maps
https://github.com/focallocal/fl-maps/blob/4b43a50cb113f5dab03073cbba79aa00f3e317c9/server/development/index.js
server/development/index.js
import './events'
javascript
MIT
4b43a50cb113f5dab03073cbba79aa00f3e317c9
2026-01-05T03:39:41.226936Z
false
focallocal/fl-maps
https://github.com/focallocal/fl-maps/blob/4b43a50cb113f5dab03073cbba79aa00f3e317c9/server/development/events.js
server/development/events.js
/* Generate fake events for development */ import { Meteor } from 'meteor/meteor' import Events from '/imports/both/collections/events' import faker from 'faker' /* if (Meteor.isDevelopment) { Meteor.methods({ 'upsertFake' () { for (let i = 0; i < 20; i++) { Events.upsert({ _id: `fake-id-${...
javascript
MIT
4b43a50cb113f5dab03073cbba79aa00f3e317c9
2026-01-05T03:39:41.226936Z
false
focallocal/fl-maps
https://github.com/focallocal/fl-maps/blob/4b43a50cb113f5dab03073cbba79aa00f3e317c9/server/publications/user.js
server/publications/user.js
import { Meteor } from 'meteor/meteor' Meteor.publish('users.user', function () { if (this.userId) { return Meteor.users.find({ _id: this.userId }, { fields: { 'profile': 1, 'attendance': 1 } }) } else { return this.ready() } })
javascript
MIT
4b43a50cb113f5dab03073cbba79aa00f3e317c9
2026-01-05T03:39:41.226936Z
false
focallocal/fl-maps
https://github.com/focallocal/fl-maps/blob/4b43a50cb113f5dab03073cbba79aa00f3e317c9/server/publications/index.js
server/publications/index.js
import './user'
javascript
MIT
4b43a50cb113f5dab03073cbba79aa00f3e317c9
2026-01-05T03:39:41.226936Z
false
focallocal/fl-maps
https://github.com/focallocal/fl-maps/blob/4b43a50cb113f5dab03073cbba79aa00f3e317c9/server/docuss/accounts-discourse-init.js
server/docuss/accounts-discourse-init.js
// ------------------------------------------------------------------------------ import { ServiceConfiguration } from 'meteor/service-configuration' // ------------------------------------------------------------------------------ // Even though you should never use the `profile` field of Meteor.users (see // https...
javascript
MIT
4b43a50cb113f5dab03073cbba79aa00f3e317c9
2026-01-05T03:39:41.226936Z
false
focallocal/fl-maps
https://github.com/focallocal/fl-maps/blob/4b43a50cb113f5dab03073cbba79aa00f3e317c9/server/docuss/index.js
server/docuss/index.js
import './CORS' import './accounts-discourse-init'
javascript
MIT
4b43a50cb113f5dab03073cbba79aa00f3e317c9
2026-01-05T03:39:41.226936Z
false
focallocal/fl-maps
https://github.com/focallocal/fl-maps/blob/4b43a50cb113f5dab03073cbba79aa00f3e317c9/server/docuss/CORS.js
server/docuss/CORS.js
import { WebApp } from 'meteor/webapp' // Docuss needs to access public/dcs-website.json from the browser, so we need // to enable CORS on this page // Enable CORS on any page // WE SHOULD LIMIT THIS TO public/*.json // https://enable-cors.org/server_meteor.html WebApp.rawConnectHandlers.use(function (req, res, next) ...
javascript
MIT
4b43a50cb113f5dab03073cbba79aa00f3e317c9
2026-01-05T03:39:41.226936Z
false