This file contains hidden or 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
| # atom conf |
This file contains hidden or 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
| var forms = []; | |
| for (var i = 0; i < json.length; i++) { | |
| forms.push(<formjs data={json[i]} submitState={submitState} currentState={currentState} />); | |
| } | |
| React.renderComponent( | |
| <div>{forms}</div>, | |
| document.body | |
| ); |
This file contains hidden or 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
| replace(/[.,\/#!$%\^&\*;:{}=\-_`~()]/g,"") |
This file contains hidden or 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
| String.prototype.isEmpty = function() { | |
| return (this.length === 0 || !this.trim()); | |
| }; |
This file contains hidden or 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
| Object.keys(myObject).length === 0 |
This file contains hidden or 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
| let ready = function () { | |
| } | |
| document.addEventListener('DOMContentLoaded', ready ) |
This file contains hidden or 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
| var mongoose = require('./db-connect'), | |
| Schema = mongoose.Schema, | |
| ObjectId = Schema.ObjectId, | |
| uuid = require('node-uuid'), | |
| Validator = require('validator').Validator, | |
| val = new Validator(), | |
| bcrypt = require('bcrypt'); | |
| Validator.prototype.error = function(msg) { return false; }; |
This file contains hidden or 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
| function xhr(options) { | |
| var deferred = Q.defer(), | |
| req = new XMLHttpRequest(); | |
| req.open(options.method || 'GET', options.url, true); | |
| // Set request headers if provided. | |
| Object.keys(options.headers || {}).forEach(function (key) { | |
| req.setRequestHeader(key, options.headers[key]); | |
| }); |
This file contains hidden or 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
| var logger = require('logger')(module); | |
| logger.info('My log statement'); | |
| Inside your logger module: | |
| var winston = require('winston'); | |
| module.exports = function (module) { | |
| var filename = module.id; |
NewerOlder