This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// | |
// esprima is a formidable javascript parser written in javascript | |
// | |
// http://esprima.org | |
// | |
// The following code was derived from here | |
// https://raw.githubusercontent.com/marijnh/acorn/master/test/tests.js | |
// | |
load('http://esprima.org/esprima.js'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// | |
// http://khan.github.io/structuredjs/ | |
// | |
// structured.js is a Javascript library that provides a simple interface | |
// for checking the structure of Javascript code, backed by the abstract syntax tree | |
// generated by Esprima. | |
// | |
// This gist was originally derived from | |
// https://github.com/Khan/structuredjs/blob/master/tests.js | |
// |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// | |
// moment.js is a powerful library to parse, validate, manipulate, and display dates in JavaScript. | |
// see: http://momentjs.com/ | |
// | |
// this gist was loosely based on this article | |
// http://www.sitepoint.com/managing-dates-times-using-moment-js/ | |
// | |
load('https://cdnjs.cloudflare.com/ajax/libs/moment.js/2.10.2/moment.js'); | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// | |
// mori.js - A library for using ClojureScript's persistent data structures and supporting API | |
// from the comfort of vanilla JavaScript. | |
// | |
// http://swannodette.github.io/mori/ | |
// | |
// Inspired from https://raw.githubusercontent.com/swannodette/mori/master/spec/mori-spec.js (9/May/2015) | |
// |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// | |
// validator.js - String validation and sanitization | |
// https://github.com/chriso/validator.js | |
// | |
// loosely based on https://github.com/chriso/validator.js/blob/master/test/validators.js | |
// | |
load('https://cdnjs.cloudflare.com/ajax/libs/validator/3.12.0/validator.js'); | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// | |
// http://jshint.com - a JavaScript Code Quality Tool | |
// | |
load('https://cdnjs.cloudflare.com/ajax/libs/jshint/2.7.0/jshint.js'); | |
JSHINT('var a=0;'); | |
if (JSHINT.errors.length != 0) throw ''; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// | |
// lodash - https://lodash.com/ | |
// | |
load('https://cdnjs.cloudflare.com/ajax/libs/lodash.js/3.9.3/lodash.js'); | |
x = _.assign({ 'a': 1 }, { 'b': 2 }, { 'c': 3 }) | |
if (x.a != 1) throw ''; | |
if (x.b != 2) throw ''; | |
if (x.c != 3) throw ''; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// | |
// https://lodash.com/ - lodash v3.9.3 | |
// | |
// A JavaScript utility library delivering consistency, modularity, performance, & extras. | |
// | |
// The work here was derived from the examples in here: https://lodash.com/docs | |
// | |
load('https://cdnjs.cloudflare.com/ajax/libs/lodash.js/3.9.3/lodash.js'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// | |
// source: https://github.com/chriso/validator.js | |
// | |
load('https://cdnjs.cloudflare.com/ajax/libs/validator/3.12.0/validator.js'); | |
// | |
//should validate email addresses | |
// | |
if (validator.isEmail("foo@bar.com") == false) throw ""; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// | |
// momentjs.com - | |
// | |
load('http://momentjs.com/static/js/global.js'); | |
// | |
// add short reverse args | |
// |