├── .gitignore ├── LICENSE ├── README.md ├── app.js ├── bin └── www ├── db └── config.js ├── modules └── Partido │ ├── atoms │ ├── dataCriacao.js │ ├── dataRegistroDefinitivo.js │ ├── email.js │ ├── enderecoPartido.js │ ├── enderecoPartidoCEP.js │ ├── enderecoPartidoCompleto.js │ ├── espectroPolitico.js │ ├── faxCompleto.js │ ├── ideologia.js │ ├── impeachment.js │ ├── nome.js │ ├── numeroAfiliados.js │ ├── numeroPartido.js │ ├── presidente.js │ ├── sigla.js │ ├── site.js │ └── telefoneCompleto.js │ ├── brainCreate.js │ ├── brainFind.js │ ├── brainFindOne.js │ ├── brainRemove.js │ ├── brainUpdate.js │ ├── config │ ├── db.js │ └── dbModels.js │ ├── hadrons │ ├── dataCriacaoValidateMongoose.js │ ├── dataRegistroDefinitivoValidateMongoose.js │ ├── emailValidateMongoose.js │ ├── enderecoPartidoCEPValidateMongoose.js │ ├── enderecoPartidoCompletoValidateMongoose.js │ ├── enderecoPartidoValidateMongoose.js │ ├── espectroPoliticoValidateMongoose.js │ ├── faxCompletoValidateMongoose.js │ ├── ideologiaValidateMongoose.js │ ├── impeachmentValidateMongoose.js │ ├── nameValidateMongoose.js │ ├── numeroAfiliadosValidateMongoose.js │ ├── numeroPartidoValidateMongoose.js │ ├── presidenteValidateMongoose.js │ ├── siglaValidateMongoose.js │ ├── siteValidateMongoose.js │ └── telefoneCompletoValidateMongoose.js │ ├── molecules │ └── partido.js │ ├── organisms │ ├── organelles │ │ ├── callback.js │ │ ├── callbackExpress.js │ │ ├── callbackRemove.js │ │ ├── create.js │ │ ├── find.js │ │ ├── findOne.js │ │ ├── getQuery.js │ │ ├── remove.js │ │ └── update.js │ └── user.js │ ├── quarks │ ├── isBoolean.js │ ├── isDataCriacao.js │ ├── isDataRegistroDefinitivo.js │ ├── isDate.js │ ├── isEmail.js │ ├── isEmailMessage.js │ ├── isEmpty.js │ ├── isEnderecoPartido.js │ ├── isEspectroPolitico.js │ ├── isFaxCompleto.js │ ├── isIdeologia.js │ ├── isImpeachment.js │ ├── isName.js │ ├── isNameMessage.js │ ├── isNumber.js │ ├── isNumeroAfiliados.js │ ├── isNumeroPartido.js │ ├── isPassword.js │ ├── isPasswordMessage.js │ ├── isPhoneDDD.js │ ├── isPhoneDDDMessage.js │ ├── isPhoneNumber.js │ ├── isPhoneNumber.test.js │ ├── isPhoneNumberMessage.js │ ├── isPresidente.js │ ├── isSigla.js │ ├── isSite.js │ ├── isString.js │ └── isTelefoneCompleto.js │ ├── routes.js │ └── routesRefactored.js ├── node_modules ├── .bin │ ├── jade │ └── uglifyjs ├── accepts │ ├── .npmignore │ ├── .travis.yml │ ├── Makefile │ ├── README.md │ ├── index.js │ └── package.json ├── amdefine │ ├── LICENSE │ ├── README.md │ ├── amdefine.js │ ├── intercept.js │ └── package.json ├── async │ ├── LICENSE │ ├── README.md │ ├── component.json │ ├── lib │ │ └── async.js │ └── package.json ├── balanced-match │ ├── .npmignore │ ├── .travis.yml │ ├── LICENSE.md │ ├── Makefile │ ├── README.md │ ├── example.js │ ├── index.js │ ├── package.json │ └── test │ │ └── balanced.js ├── body-parser │ ├── .npmignore │ ├── .travis.yml │ ├── HISTORY.md │ ├── Makefile │ ├── README.md │ ├── index.js │ └── package.json ├── brace-expansion │ ├── .npmignore │ ├── README.md │ ├── example.js │ ├── index.js │ └── package.json ├── buffer-crc32 │ ├── .npmignore │ ├── .travis.yml │ ├── README.md │ ├── index.js │ ├── package.json │ └── tests │ │ └── crc.test.js ├── bytes │ ├── .npmignore │ ├── History.md │ ├── Makefile │ ├── Readme.md │ ├── component.json │ ├── index.js │ └── package.json ├── camelcase │ ├── index.js │ ├── license │ ├── package.json │ └── readme.md ├── character-parser │ ├── .npmignore │ ├── LICENSE │ ├── README.md │ ├── index.js │ └── package.json ├── commander │ ├── Readme.md │ ├── index.js │ └── package.json ├── concat-map │ ├── .travis.yml │ ├── LICENSE │ ├── README.markdown │ ├── example │ │ └── map.js │ ├── index.js │ ├── package.json │ └── test │ │ └── map.js ├── constantinople │ ├── .gitattributes │ ├── .npmignore │ ├── .travis.yml │ ├── LICENSE │ ├── README.md │ ├── index.js │ ├── package.json │ └── test │ │ └── index.js ├── cookie-parser │ ├── .npmignore │ ├── README.md │ ├── index.js │ ├── lib │ │ └── parse.js │ ├── package.json │ └── test │ │ └── cookieParser.js ├── cookie-signature │ ├── .npmignore │ ├── History.md │ ├── Makefile │ ├── Readme.md │ ├── index.js │ └── package.json ├── cookie │ ├── .npmignore │ ├── .travis.yml │ ├── LICENSE │ ├── README.md │ ├── index.js │ ├── package.json │ └── test │ │ ├── mocha.opts │ │ ├── parse.js │ │ └── serialize.js ├── css-parse │ ├── .npmignore │ ├── History.md │ ├── Makefile │ ├── Readme.md │ ├── component.json │ ├── index.js │ └── package.json ├── css-stringify │ ├── .npmignore │ ├── History.md │ ├── Makefile │ ├── Readme.md │ ├── component.json │ ├── index.js │ └── package.json ├── css │ ├── .npmignore │ ├── History.md │ ├── Makefile │ ├── Readme.md │ ├── benchmark.js │ ├── component.json │ ├── index.js │ ├── package.json │ └── test.js ├── debug │ ├── Readme.md │ ├── debug.js │ ├── index.js │ ├── lib │ │ └── debug.js │ └── package.json ├── decamelize │ ├── index.js │ ├── license │ ├── package.json │ └── readme.md ├── escape-html │ ├── .npmignore │ ├── Makefile │ ├── Readme.md │ ├── component.json │ ├── index.js │ └── package.json ├── express │ ├── .npmignore │ ├── History.md │ ├── LICENSE │ ├── Makefile │ ├── Readme.md │ ├── index.js │ ├── lib │ │ ├── application.js │ │ ├── express.js │ │ ├── middleware │ │ │ ├── init.js │ │ │ └── query.js │ │ ├── request.js │ │ ├── response.js │ │ ├── router │ │ │ ├── index.js │ │ │ ├── layer.js │ │ │ └── route.js │ │ ├── utils.js │ │ └── view.js │ ├── node_modules │ │ ├── cookie │ │ │ ├── .npmignore │ │ │ ├── LICENSE │ │ │ ├── README.md │ │ │ ├── index.js │ │ │ └── package.json │ │ └── debug │ │ │ ├── Readme.md │ │ │ ├── debug.js │ │ │ ├── lib │ │ │ └── debug.js │ │ │ └── package.json │ └── package.json ├── fresh │ ├── .npmignore │ ├── History.md │ ├── Makefile │ ├── Readme.md │ ├── index.js │ └── package.json ├── is-promise │ ├── .npmignore │ ├── .travis.yml │ ├── LICENSE │ ├── index.js │ ├── package.json │ └── readme.md ├── jade │ ├── .npmignore │ ├── LICENSE │ ├── README.md │ ├── Readme_zh-cn.md │ ├── bin │ │ └── jade.js │ ├── component.json │ ├── index.js │ ├── jade-language.md │ ├── jade.js │ ├── jade.md │ ├── lib │ │ ├── compiler.js │ │ ├── doctypes.js │ │ ├── filters-client.js │ │ ├── filters.js │ │ ├── inline-tags.js │ │ ├── jade.js │ │ ├── lexer.js │ │ ├── nodes │ │ │ ├── attrs.js │ │ │ ├── block-comment.js │ │ │ ├── block.js │ │ │ ├── case.js │ │ │ ├── code.js │ │ │ ├── comment.js │ │ │ ├── doctype.js │ │ │ ├── each.js │ │ │ ├── filter.js │ │ │ ├── index.js │ │ │ ├── literal.js │ │ │ ├── mixin-block.js │ │ │ ├── mixin.js │ │ │ ├── node.js │ │ │ ├── tag.js │ │ │ └── text.js │ │ ├── parser.js │ │ ├── runtime.js │ │ ├── self-closing.js │ │ └── utils.js │ ├── package.json │ └── runtime.js ├── merge-descriptors │ ├── .npmignore │ ├── README.md │ ├── component.json │ ├── index.js │ └── package.json ├── methods │ ├── .npmignore │ ├── History.md │ ├── LICENSE │ ├── Readme.md │ ├── index.js │ ├── package.json │ └── test │ │ └── methods.js ├── mime │ ├── LICENSE │ ├── README.md │ ├── mime.js │ ├── package.json │ ├── test.js │ └── types │ │ ├── mime.types │ │ └── node.types ├── minimatch │ ├── LICENSE │ ├── README.md │ ├── minimatch.js │ └── package.json ├── mkdirp │ ├── .npmignore │ ├── .travis.yml │ ├── LICENSE │ ├── examples │ │ └── pow.js │ ├── index.js │ ├── package.json │ ├── readme.markdown │ └── test │ │ ├── chmod.js │ │ ├── clobber.js │ │ ├── mkdirp.js │ │ ├── perm.js │ │ ├── perm_sync.js │ │ ├── race.js │ │ ├── rel.js │ │ ├── return.js │ │ ├── return_sync.js │ │ ├── root.js │ │ ├── sync.js │ │ ├── umask.js │ │ └── umask_sync.js ├── monocle │ ├── .npmignore │ ├── LICENSE │ ├── README.md │ ├── monocle.js │ └── package.json ├── morgan │ ├── .npmignore │ ├── History.md │ ├── README.md │ ├── index.js │ ├── node_modules │ │ └── bytes │ │ │ ├── .npmignore │ │ │ ├── History.md │ │ │ ├── Makefile │ │ │ ├── Readme.md │ │ │ ├── component.json │ │ │ ├── index.js │ │ │ └── package.json │ └── package.json ├── negotiator │ ├── LICENSE │ ├── README.md │ ├── lib │ │ ├── charset.js │ │ ├── encoding.js │ │ ├── language.js │ │ ├── mediaType.js │ │ └── negotiator.js │ └── package.json ├── optimist │ ├── .travis.yml │ ├── LICENSE │ ├── example │ │ ├── bool.js │ │ ├── boolean_double.js │ │ ├── boolean_single.js │ │ ├── default_hash.js │ │ ├── default_singles.js │ │ ├── divide.js │ │ ├── line_count.js │ │ ├── line_count_options.js │ │ ├── line_count_wrap.js │ │ ├── nonopt.js │ │ ├── reflect.js │ │ ├── short.js │ │ ├── string.js │ │ ├── usage-options.js │ │ └── xup.js │ ├── index.js │ ├── package.json │ ├── readme.markdown │ └── test │ │ ├── _.js │ │ ├── _ │ │ ├── argv.js │ │ └── bin.js │ │ ├── parse.js │ │ └── usage.js ├── parseurl │ ├── .npmignore │ ├── README.md │ ├── index.js │ └── package.json ├── path-to-regexp │ ├── .npmignore │ ├── History.md │ ├── Readme.md │ ├── component.json │ ├── index.js │ ├── package.json │ └── test.js ├── promise │ ├── .npmignore │ ├── Readme.md │ ├── index.js │ └── package.json ├── qs │ ├── .gitmodules │ ├── .npmignore │ ├── Readme.md │ ├── index.js │ └── package.json ├── range-parser │ ├── .npmignore │ ├── History.md │ ├── Makefile │ ├── Readme.md │ ├── index.js │ └── package.json ├── raw-body │ ├── .npmignore │ ├── HISTORY.md │ ├── README.md │ ├── index.js │ └── package.json ├── readdirp │ ├── .npmignore │ ├── .travis.yml │ ├── LICENSE │ ├── README.md │ ├── examples │ │ ├── Readme.md │ │ ├── callback-api.js │ │ ├── grep.js │ │ ├── package.json │ │ ├── stream-api-pipe.js │ │ └── stream-api.js │ ├── package.json │ ├── readdirp.js │ ├── stream-api.js │ └── test │ │ ├── bed │ │ ├── root_dir1 │ │ │ ├── root_dir1_file1.ext1 │ │ │ ├── root_dir1_file2.ext2 │ │ │ ├── root_dir1_file3.ext3 │ │ │ └── root_dir1_subdir1 │ │ │ │ └── root1_dir1_subdir1_file1.ext1 │ │ ├── root_dir2 │ │ │ ├── root_dir2_file1.ext1 │ │ │ └── root_dir2_file2.ext2 │ │ ├── root_file1.ext1 │ │ ├── root_file2.ext2 │ │ └── root_file3.ext3 │ │ ├── readdirp-stream.js │ │ └── readdirp.js ├── send │ ├── .npmignore │ ├── History.md │ ├── Readme.md │ ├── index.js │ ├── lib │ │ ├── send.js │ │ └── utils.js │ ├── node_modules │ │ └── debug │ │ │ ├── Readme.md │ │ │ ├── debug.js │ │ │ ├── lib │ │ │ └── debug.js │ │ │ └── package.json │ └── package.json ├── serve-static │ ├── .npmignore │ ├── .travis.yml │ ├── History.md │ ├── LICENSE │ ├── Readme.md │ ├── index.js │ └── package.json ├── source-map │ ├── .npmignore │ ├── .tern-port │ ├── .travis.yml │ ├── CHANGELOG.md │ ├── LICENSE │ ├── Makefile.dryice.js │ ├── README.md │ ├── build │ │ ├── assert-shim.js │ │ ├── mini-require.js │ │ ├── prefix-source-map.jsm │ │ ├── prefix-utils.jsm │ │ ├── suffix-browser.js │ │ ├── suffix-source-map.jsm │ │ ├── suffix-utils.jsm │ │ ├── test-prefix.js │ │ └── test-suffix.js │ ├── lib │ │ ├── source-map.js │ │ └── source-map │ │ │ ├── array-set.js │ │ │ ├── base64-vlq.js │ │ │ ├── base64.js │ │ │ ├── binary-search.js │ │ │ ├── source-map-consumer.js │ │ │ ├── source-map-generator.js │ │ │ ├── source-node.js │ │ │ └── util.js │ ├── package.json │ └── test │ │ ├── run-tests.js │ │ └── source-map │ │ ├── test-api.js │ │ ├── test-array-set.js │ │ ├── test-base64-vlq.js │ │ ├── test-base64.js │ │ ├── test-binary-search.js │ │ ├── test-dog-fooding.js │ │ ├── test-source-map-consumer.js │ │ ├── test-source-map-generator.js │ │ ├── test-source-node.js │ │ ├── test-util.js │ │ └── util.js ├── static-favicon │ ├── .npmignore │ ├── .travis.yml │ ├── LICENSE │ ├── README.md │ ├── favicon.ico │ ├── index.js │ └── package.json ├── string_decoder │ ├── .npmignore │ ├── LICENSE │ ├── README.md │ ├── index.js │ └── package.json ├── transformers │ ├── .npmignore │ ├── README.md │ ├── history.md │ ├── lib │ │ ├── shared.js │ │ └── transformers.js │ ├── node_modules │ │ ├── .bin │ │ │ └── uglifyjs │ │ └── uglify-js │ │ │ ├── .npmignore │ │ │ ├── README.md │ │ │ ├── bin │ │ │ └── uglifyjs │ │ │ ├── lib │ │ │ ├── ast.js │ │ │ ├── compress.js │ │ │ ├── mozilla-ast.js │ │ │ ├── output.js │ │ │ ├── parse.js │ │ │ ├── scope.js │ │ │ ├── sourcemap.js │ │ │ ├── transform.js │ │ │ └── utils.js │ │ │ ├── package.json │ │ │ ├── test │ │ │ ├── compress │ │ │ │ ├── arrays.js │ │ │ │ ├── blocks.js │ │ │ │ ├── conditionals.js │ │ │ │ ├── dead-code.js │ │ │ │ ├── debugger.js │ │ │ │ ├── drop-unused.js │ │ │ │ ├── issue-105.js │ │ │ │ ├── issue-12.js │ │ │ │ ├── issue-22.js │ │ │ │ ├── issue-44.js │ │ │ │ ├── issue-59.js │ │ │ │ ├── labels.js │ │ │ │ ├── loops.js │ │ │ │ ├── properties.js │ │ │ │ ├── sequences.js │ │ │ │ └── switch.js │ │ │ └── run-tests.js │ │ │ └── tools │ │ │ └── node.js │ └── package.json ├── type-is │ ├── .npmignore │ ├── .travis.yml │ ├── HISTORY.md │ ├── README.md │ ├── index.js │ └── package.json ├── uglify-js │ ├── LICENSE │ ├── README.md │ ├── bin │ │ ├── extract-props.js │ │ └── uglifyjs │ ├── lib │ │ ├── ast.js │ │ ├── compress.js │ │ ├── mozilla-ast.js │ │ ├── output.js │ │ ├── parse.js │ │ ├── propmangle.js │ │ ├── scope.js │ │ ├── sourcemap.js │ │ ├── transform.js │ │ └── utils.js │ ├── package.json │ └── tools │ │ ├── domprops.json │ │ ├── node.js │ │ └── props.html ├── uglify-to-browserify │ ├── .npmignore │ ├── .travis.yml │ ├── LICENSE │ ├── README.md │ ├── index.js │ ├── package.json │ └── test │ │ └── index.js ├── utils-merge │ ├── .travis.yml │ ├── LICENSE │ ├── README.md │ ├── index.js │ └── package.json ├── window-size │ ├── LICENSE-MIT │ ├── README.md │ ├── index.js │ └── package.json ├── with │ ├── .npmignore │ ├── LICENSE │ ├── README.md │ ├── index.js │ ├── package.json │ └── vars.js ├── wordwrap │ ├── .npmignore │ ├── README.markdown │ ├── example │ │ ├── center.js │ │ └── meat.js │ ├── index.js │ ├── package.json │ └── test │ │ ├── break.js │ │ ├── idleness.txt │ │ └── wrap.js └── yargs │ ├── LICENSE │ ├── README.md │ ├── completion.sh.hbs │ ├── index.js │ ├── lib │ ├── completion.js │ ├── parser.js │ ├── usage.js │ └── validation.js │ └── package.json ├── package.json ├── public └── stylesheets │ └── style.css ├── routes ├── index.js └── users.js └── views ├── error.jade ├── index.jade └── layout.jade /.gitignore: -------------------------------------------------------------------------------- 1 | node_modules/ -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2016 WebSchool.io 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /bin/www: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env node 2 | var debug = require('debug')('politicos-brasileiros'); 3 | var app = require('../app'); 4 | 5 | app.set('port', process.env.PORT || 3000); 6 | 7 | var server = app.listen(app.get('port'), function() { 8 | debug('Express server listening on port ' + server.address().port); 9 | }); 10 | -------------------------------------------------------------------------------- /db/config.js: -------------------------------------------------------------------------------- 1 | const mongoose = require('mongoose'); 2 | const dbURI = 'mongodb://localhost/be-mean-instagram'; 3 | 4 | mongoose.connect(dbURI); 5 | 6 | mongoose.connection.on('connected', function () { 7 | console.log('Mongoose default connection connected to ' + dbURI); 8 | }); 9 | mongoose.connection.on('error',function (err) { 10 | console.log('Mongoose default connection error: ' + err); 11 | }); 12 | mongoose.connection.on('disconnected', function () { 13 | console.log('Mongoose default connection disconnected'); 14 | }); 15 | mongoose.connection.on('open', function () { 16 | console.log('Mongoose default connection is open'); 17 | }); 18 | 19 | process.on('SIGINT', function() { 20 | mongoose.connection.close(function () { 21 | console.log('Mongoose default connection disconnected through app termination'); 22 | process.exit(0); 23 | }); 24 | }); -------------------------------------------------------------------------------- /modules/Partido/atoms/dataCriacao.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | const AtomName = 'DataCriacao'; 4 | 5 | module.exports = { 6 | type: Date 7 | , validate: require('./../hadrons/ValidateMongoose')('is'+AtomName) 8 | } -------------------------------------------------------------------------------- /modules/Partido/atoms/dataRegistroDefinitivo.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | const AtomName = 'DataRegistroDefinitivo'; 4 | 5 | module.exports = { 6 | type: Date 7 | , validate: require('./../hadrons/ValidateMongoose')('is'+AtomName) 8 | } -------------------------------------------------------------------------------- /modules/Partido/atoms/email.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | const AtomName = 'Email'; 4 | 5 | module.exports = { 6 | type: String 7 | , validate: require('./../hadrons/ValidateMongoose')('is'+AtomName) 8 | , required: true 9 | } -------------------------------------------------------------------------------- /modules/Partido/atoms/enderecoPartido.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | const AtomName = 'EnderecoPartido'; 4 | 5 | module.exports = { 6 | type: String 7 | , validate: require('./../hadrons/ValidateMongoose')('is'+AtomName) 8 | } -------------------------------------------------------------------------------- /modules/Partido/atoms/enderecoPartidoCEP.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | const AtomName = 'EnderecoPartidoCEP'; 4 | 5 | module.exports = { 6 | type: String 7 | , validate: require('./../hadrons/ValidateMongoose')('is'+AtomName) 8 | } -------------------------------------------------------------------------------- /modules/Partido/atoms/enderecoPartidoCompleto.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | const AtomName = 'EnderecoPartidoCompleto'; 4 | 5 | module.exports = { 6 | type: String 7 | , validate: require('./../hadrons/ValidateMongoose')('is'+AtomName) 8 | } -------------------------------------------------------------------------------- /modules/Partido/atoms/espectroPolitico.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | const AtomName = 'EspectroPolitico'; 4 | 5 | module.exports = { 6 | type: String 7 | , validate: require('./../hadrons/ValidateMongoose')('is'+AtomName) 8 | } -------------------------------------------------------------------------------- /modules/Partido/atoms/faxCompleto.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | const AtomName = 'FaxCompleto'; 4 | 5 | module.exports = { 6 | type: String 7 | , validate: require('./../hadrons/ValidateMongoose')('is'+AtomName) 8 | } -------------------------------------------------------------------------------- /modules/Partido/atoms/ideologia.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | const AtomName = 'Ideologia'; 4 | 5 | module.exports = { 6 | type: String 7 | , validate: require('./../hadrons/ValidateMongoose')('is'+AtomName) 8 | } -------------------------------------------------------------------------------- /modules/Partido/atoms/impeachment.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | const AtomName = 'Impeachment'; 4 | 5 | module.exports = { 6 | type: Boolean 7 | , validate: require('./../hadrons/ValidateMongoose')('is'+AtomName) 8 | } -------------------------------------------------------------------------------- /modules/Partido/atoms/nome.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | const AtomName = 'Name'; 4 | 5 | module.exports = { 6 | type: String 7 | , validate: require('./../hadrons/ValidateMongoose')('is'+AtomName) 8 | , 9 | } -------------------------------------------------------------------------------- /modules/Partido/atoms/numeroAfiliados.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | const AtomName = 'NumeroAfiliado'; 4 | 5 | module.exports = { 6 | type: Number 7 | , validate: require('./../hadrons/ValidateMongoose')('is'+AtomName) 8 | } -------------------------------------------------------------------------------- /modules/Partido/atoms/numeroPartido.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | const AtomName = 'NumeroPartido'; 4 | 5 | module.exports = { 6 | type: Number 7 | , validate: require('./../hadrons/ValidateMongoose')('is'+AtomName) 8 | , required: true 9 | } -------------------------------------------------------------------------------- /modules/Partido/atoms/presidente.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | const AtomName = 'Presidente'; 4 | 5 | module.exports = { 6 | type: String 7 | , validate: require('./../hadrons/ValidateMongoose')('is'+AtomName) 8 | } -------------------------------------------------------------------------------- /modules/Partido/atoms/sigla.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | const AtomName = 'Sigla'; 4 | 5 | module.exports = { 6 | type: String 7 | , validate: require('./../hadrons/ValidateMongoose')('is'+AtomName) 8 | , required: true 9 | } 10 | -------------------------------------------------------------------------------- /modules/Partido/atoms/site.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | const AtomName = 'Site'; 4 | 5 | module.exports = { 6 | type: String 7 | , validate: require('./../hadrons/ValidateMongoose')('is'+AtomName) 8 | } -------------------------------------------------------------------------------- /modules/Partido/atoms/telefoneCompleto.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | const AtomName = 'TelefoneCompleto'; 4 | 5 | module.exports = { 6 | type: String 7 | , validate: require('./../hadrons/ValidateMongoose')('is'+AtomName) 8 | } -------------------------------------------------------------------------------- /modules/Partido/brainCreate.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | module.exports = (Organism) => { 4 | 5 | const callbackExpress = require('./organisms/organelles/callbackExpress'); 6 | 7 | return (req, res) => { 8 | let obj = req.body; 9 | Organism.create(obj, (err, data) => { 10 | callbackExpress(err, data, res); 11 | }); 12 | }; 13 | }; -------------------------------------------------------------------------------- /modules/Partido/brainFind.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | module.exports = (Organism) => { 4 | 5 | const callbackExpress = require('./organisms/organelles/callbackExpress'); 6 | 7 | return (req, res) => { 8 | let obj = req.body; 9 | 10 | Organism.find(obj, (err, data) => { 11 | callbackExpress(err, data, res); 12 | }); 13 | }; 14 | }; -------------------------------------------------------------------------------- /modules/Partido/brainFindOne.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | module.exports = (Organism) => { 4 | 5 | const callbackExpress = require('./organisms/organelles/callbackExpress'); 6 | 7 | return (req, res) => { 8 | let query = { _id: req.params.id }; 9 | 10 | Organism.findOne(query, (err, data) => { 11 | callbackExpress(err, data, res); 12 | }); 13 | }; 14 | }; -------------------------------------------------------------------------------- /modules/Partido/brainRemove.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | module.exports = (Organism) => { 4 | 5 | const callbackExpress = require('./organisms/organelles/callbackExpress'); 6 | 7 | return (req, res) => { 8 | let query = { _id: req.params.id }; 9 | 10 | Organism.remove(query, (err, data) => { 11 | callbackExpress(err, data, res); 12 | }); 13 | }; 14 | }; -------------------------------------------------------------------------------- /modules/Partido/brainUpdate.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | module.exports = (Organism) => { 4 | 5 | const callbackExpress = require('./organisms/organelles/callbackExpress'); 6 | 7 | return (req, res) => { 8 | let query = { _id: req.params.id }; 9 | let mod = req.body; 10 | let options = { runValidators: true }; 11 | 12 | Organism.update(query, mod, options, (err, data) => { 13 | callbackExpress(err, data, res); 14 | }); 15 | }; 16 | }; -------------------------------------------------------------------------------- /modules/Partido/config/db.js: -------------------------------------------------------------------------------- 1 | const mongoose = require('mongoose'); 2 | const dbURI = 'mongodb://localhost/modelo-padrao'; 3 | 4 | mongoose.connect(dbURI); 5 | 6 | mongoose.connection.on('connected', function () { 7 | console.log('Mongoose default connection connected to ' + dbURI); 8 | }); 9 | mongoose.connection.on('error',function (err) { 10 | console.log('Mongoose default connection error: ' + err); 11 | }); 12 | mongoose.connection.on('disconnected', function () { 13 | console.log('Mongoose default connection disconnected'); 14 | }); 15 | mongoose.connection.on('open', function () { 16 | console.log('Mongoose default connection is open'); 17 | }); 18 | 19 | process.on('SIGINT', function() { 20 | mongoose.connection.close(function () { 21 | console.log('Mongoose default connection disconnected through app termination'); 22 | process.exit(0); 23 | }); 24 | }); -------------------------------------------------------------------------------- /modules/Partido/config/dbModels.js: -------------------------------------------------------------------------------- 1 | const mongoose = require('mongoose'); 2 | const dbURI = 'mongodb://localhost/modelo-padrao'; 3 | 4 | mongoose.connect(dbURI); 5 | 6 | mongoose.connection.on('connected', function () { 7 | console.log('Mongoose default connection connected to ' + dbURI); 8 | }); 9 | mongoose.connection.on('error',function (err) { 10 | console.log('Mongoose default connection error: ' + err); 11 | }); 12 | mongoose.connection.on('disconnected', function () { 13 | console.log('Mongoose default connection disconnected'); 14 | }); 15 | mongoose.connection.on('open', function () { 16 | console.log('Mongoose default connection is open'); 17 | }); 18 | 19 | process.on('SIGINT', function() { 20 | mongoose.connection.close(function () { 21 | console.log('Mongoose default connection disconnected through app termination'); 22 | process.exit(0); 23 | }); 24 | }); -------------------------------------------------------------------------------- /modules/Partido/hadrons/dataCriacaoValidateMongoose.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | const QuarkName = 'isDataCriacao'; 4 | 5 | module.exports = { 6 | validator: require('./../quarks/'+QuarkName) 7 | , message: require('./../quarks/'+QuarkName+'Message') 8 | }; -------------------------------------------------------------------------------- /modules/Partido/hadrons/dataRegistroDefinitivoValidateMongoose.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | const QuarkName = 'isDataRegistroDefinitivo'; 4 | 5 | module.exports = { 6 | validator: require('./../quarks/'+QuarkName) 7 | , message: require('./../quarks/'+QuarkName+'Message') 8 | }; -------------------------------------------------------------------------------- /modules/Partido/hadrons/emailValidateMongoose.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | const QuarkName = 'isEmail'; 4 | 5 | module.exports = { 6 | validator: require('./../quarks/'+QuarkName) 7 | , message: require('./../quarks/'+QuarkName+'Message') 8 | }; -------------------------------------------------------------------------------- /modules/Partido/hadrons/enderecoPartidoCEPValidateMongoose.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | const QuarkName = 'isEnderecoPartidoCEP'; 4 | 5 | module.exports = { 6 | validator: require('./../quarks/'+QuarkName) 7 | , message: require('./../quarks/'+QuarkName+'Message') 8 | }; -------------------------------------------------------------------------------- /modules/Partido/hadrons/enderecoPartidoCompletoValidateMongoose.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | const QuarkName = 'isEnderecoPartidoCompleto'; 4 | 5 | module.exports = { 6 | validator: require('./../quarks/'+QuarkName) 7 | , message: require('./../quarks/'+QuarkName+'Message') 8 | }; -------------------------------------------------------------------------------- /modules/Partido/hadrons/enderecoPartidoValidateMongoose.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | const QuarkName = 'isEnderecoPartido'; 4 | 5 | module.exports = { 6 | validator: require('./../quarks/'+QuarkName) 7 | , message: require('./../quarks/'+QuarkName+'Message') 8 | }; -------------------------------------------------------------------------------- /modules/Partido/hadrons/espectroPoliticoValidateMongoose.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | const QuarkName = 'isEspectroPolitico'; 4 | 5 | module.exports = { 6 | validator: require('./../quarks/'+QuarkName) 7 | , message: require('./../quarks/'+QuarkName+'Message') 8 | }; -------------------------------------------------------------------------------- /modules/Partido/hadrons/faxCompletoValidateMongoose.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | const QuarkName = 'isFaxCompleto'; 4 | 5 | module.exports = { 6 | validator: require('./../quarks/'+QuarkName) 7 | , message: require('./../quarks/'+QuarkName+'Message') 8 | }; -------------------------------------------------------------------------------- /modules/Partido/hadrons/ideologiaValidateMongoose.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | const QuarkName = 'isIdeologia'; 4 | 5 | module.exports = { 6 | validator: require('./../quarks/'+QuarkName) 7 | , message: require('./../quarks/'+QuarkName+'Message') 8 | }; 9 | -------------------------------------------------------------------------------- /modules/Partido/hadrons/impeachmentValidateMongoose.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | const QuarkName = 'isImpeachment'; 4 | 5 | module.exports = { 6 | validator: require('./../quarks/'+QuarkName) 7 | , message: require('./../quarks/'+QuarkName+'Message') 8 | }; -------------------------------------------------------------------------------- /modules/Partido/hadrons/nameValidateMongoose.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | const QuarkName = 'isName'; 4 | 5 | module.exports = { 6 | validator: require('./../quarks/'+QuarkName) 7 | , message: require('./../quarks/'+QuarkName+'Message') 8 | }; -------------------------------------------------------------------------------- /modules/Partido/hadrons/numeroAfiliadosValidateMongoose.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | const QuarkName = 'isNumeroAfiliados'; 4 | 5 | module.exports = { 6 | validator: require('./../quarks/'+QuarkName) 7 | , message: require('./../quarks/'+QuarkName+'Message') 8 | }; -------------------------------------------------------------------------------- /modules/Partido/hadrons/numeroPartidoValidateMongoose.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | const QuarkName = 'isNumeroPartido'; 4 | 5 | module.exports = { 6 | validator: require('./../quarks/'+QuarkName) 7 | , message: require('./../quarks/'+QuarkName+'Message') 8 | }; -------------------------------------------------------------------------------- /modules/Partido/hadrons/presidenteValidateMongoose.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | const QuarkName = 'isPresidente'; 4 | 5 | module.exports = { 6 | validator: require('./../quarks/'+QuarkName) 7 | , message: require('./../quarks/'+QuarkName+'Message') 8 | 9 | }; 10 | -------------------------------------------------------------------------------- /modules/Partido/hadrons/siglaValidateMongoose.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | const QuarkName = 'isSigla'; 4 | 5 | module.exports = { 6 | validator: require('./../quarks/'+QuarkName) 7 | , message: require('./../quarks/'+QuarkName+'Message') 8 | }; -------------------------------------------------------------------------------- /modules/Partido/hadrons/siteValidateMongoose.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | const QuarkName = 'isSite'; 4 | 5 | module.exports = { 6 | validator: require('./../quarks/'+QuarkName) 7 | , message: require('./../quarks/'+QuarkName+'Message') 8 | }; -------------------------------------------------------------------------------- /modules/Partido/hadrons/telefoneCompletoValidateMongoose.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | const QuarkName = 'isTelefoneCompleto'; 4 | 5 | module.exports = { 6 | validator: require('./../quarks/'+QuarkName) 7 | , message: require('./../quarks/'+QuarkName+'Message') 8 | }; -------------------------------------------------------------------------------- /modules/Partido/molecules/partido.js: -------------------------------------------------------------------------------- 1 | const mongoose = require('mongoose'); 2 | const Schema = mongoose.Schema; 3 | 4 | const Molecule = { 5 | 6 | sigla: require('./../atoms/sigla') 7 | , nome: require('./../atoms/nome') 8 | //, numero: require('./../atoms/numero') ? Que numero eh esse ? 9 | , numeroPartido: require('./../atoms/numeroPartido'); 10 | , presidente: require('./../atoms/presidente') 11 | , dataCriacao: require('./../atoms/dataCriacao') 12 | , dataRegistroDefinitivo: require('./../atoms/dataRegistroDefinitivo') 13 | , numeroAfiliados: require('./../atoms/numeroAfiliados') 14 | , espectroPolitico: require('./../atoms/espectroPolitico') 15 | , ideologia: require('./../atoms/ideologia') 16 | , site: require('./../atoms/site') 17 | , email: require('./../atoms/email') 18 | , telefoneCompleto: require('./../atoms/telefoneCompleto') 19 | , faxCompleto: require('./../atoms/faxCompleto') 20 | , enderecoPartido: require('./../atoms/enderecoPartido') 21 | , impeachment: require('./../atoms/impeachment') 22 | 23 | } 24 | 25 | module.exports = new Schema(Molecule); 26 | -------------------------------------------------------------------------------- /modules/Partido/organisms/organelles/callback.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | module.exports = (err, data) => { 4 | if (err) console.log('Erro:', err); 5 | else console.log('RETORNOU:', data); 6 | }; 7 | -------------------------------------------------------------------------------- /modules/Partido/organisms/organelles/callbackExpress.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | module.exports = (err, data, res) => { 4 | console.log(err, data) 5 | if (err) return console.log('Erro:', err); 6 | res.json(data); 7 | }; 8 | -------------------------------------------------------------------------------- /modules/Partido/organisms/organelles/callbackRemove.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | module.exports = (err, data) => { 4 | if (err) console.log('Erro:', err); 5 | else console.log('RETORNOU:', data.result); 6 | }; 7 | -------------------------------------------------------------------------------- /modules/Partido/organisms/organelles/create.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | module.exports = (Organism) => { 4 | return (obj, callback) => Organism.create(obj, callback); 5 | }; 6 | 7 | -------------------------------------------------------------------------------- /modules/Partido/organisms/organelles/find.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | module.exports = (Organism) => { 4 | return (obj, callback) => Organism.find(obj, callback); 5 | }; 6 | 7 | -------------------------------------------------------------------------------- /modules/Partido/organisms/organelles/findOne.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | module.exports = (Organism) => { 4 | return (obj, callback) => Organism.findOne(obj, callback); 5 | }; 6 | 7 | -------------------------------------------------------------------------------- /modules/Partido/organisms/organelles/getQuery.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | module.exports = (req) => { 4 | return require('querystring').parse(require('url').parse(req.url).query); 5 | }; 6 | 7 | -------------------------------------------------------------------------------- /modules/Partido/organisms/organelles/remove.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | module.exports = (Organism) => { 4 | return (obj, callback) => Organism.remove(obj, callback); 5 | }; 6 | 7 | -------------------------------------------------------------------------------- /modules/Partido/organisms/organelles/update.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | module.exports = (Organism) => { 4 | return (obj, mod, options, callback) => Organism.update(obj, mod, options, callback); 5 | }; 6 | 7 | -------------------------------------------------------------------------------- /modules/Partido/organisms/user.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | const mongoose = require('mongoose'); 4 | const Molecule = require('./../molecules/user'); 5 | const Organism = mongoose.model('User', Molecule); 6 | 7 | const create = require('./organelles/create')(Organism); 8 | const find = require('./organelles/find')(Organism); 9 | const findOne = require('./organelles/findOne')(Organism); 10 | const update = require('./organelles/update')(Organism); 11 | const remove = require('./organelles/remove')(Organism); 12 | 13 | const Cell = { 14 | create 15 | , find 16 | , findOne 17 | , update 18 | , remove 19 | }; 20 | 21 | module.exports = Cell; -------------------------------------------------------------------------------- /modules/Partido/quarks/isBoolean.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | module.exports = (value) => { 4 | const isTRUE = (value === true); 5 | const isFALSE = (value === false); 6 | 7 | if(isTRUE || isFALSE) return true; 8 | 9 | return false; 10 | 11 | } 12 | -------------------------------------------------------------------------------- /modules/Partido/quarks/isDataCriacao.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | module.exports = (value) => { 4 | const isEmpty = require('./isEmpty')(value); 5 | const isDate = require('./isDate')(value); 6 | 7 | if(isEmpty) return false; 8 | if(!isDate) return false; 9 | 10 | 11 | //const today = new Date(); 12 | //return value.setHours(0,0,0,0) < today.setHours(0,0,0,0); 13 | return true; 14 | }; 15 | -------------------------------------------------------------------------------- /modules/Partido/quarks/isDataRegistroDefinitivo.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | module.exports = (value) => { 4 | const isEmpty = require('./isEmpty')(value); 5 | const isDate = require('./isDate')(value); 6 | 7 | if(isEmpty) return false; 8 | if(!isDate) return false; 9 | 10 | 11 | //const today = new Date(); 12 | //return value.setHours(0,0,0,0) < today.setHours(0,0,0,0); 13 | return true; 14 | }; 15 | -------------------------------------------------------------------------------- /modules/Partido/quarks/isDate.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | module.exports = (value) => { 4 | if(Object.prototype.toString.call(value) === '[object Date]' && !isNaN(value.getTime())) return true; 5 | 6 | return false; 7 | } 8 | -------------------------------------------------------------------------------- /modules/Partido/quarks/isEmail.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | module.exports = (value) => { 4 | const regex = /^[-a-z0-9~!$%^&*_=+}{\'?]+(\.[-a-z0-9~!$%^&*_=+}{\'?]+)*@([a-z0-9_][-a-z0-9_]*(\.[-a-z0-9_]+)*\.(aero|arpa|biz|com|coop|edu|gov|info|int|mil|museum|name|net|org|pro|travel|mobi|[a-z][a-z])|([0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}))(:[0-9]{1,5})?$/i; 5 | const isEmpty = require('./isEmpty')(value); 6 | const isString = require('./isString')(value); 7 | 8 | if(isEmpty) return false; 9 | if(!isString) return false; 10 | 11 | return regex.test(value); 12 | } -------------------------------------------------------------------------------- /modules/Partido/quarks/isEmailMessage.js: -------------------------------------------------------------------------------- 1 | module.exports = 'O email {VALUE} não é válido!'; -------------------------------------------------------------------------------- /modules/Partido/quarks/isEmpty.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | module.exports = (value) => { 4 | const isNull = (value === null); 5 | const isUndefined = (value === undefined); 6 | const isEmpty = (value === ''); 7 | if (isNull || isUndefined || isEmpty) return true; 8 | return false; 9 | } -------------------------------------------------------------------------------- /modules/Partido/quarks/isEnderecoPartido.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | module.exports = (value) => { 4 | const isEmpty = require('./isEmpty')(value); 5 | const isString = require('./isString')(value); 6 | 7 | if(isEmpty) return false; 8 | if(!isString) return false; 9 | 10 | return (value.length >= 2 && value.length <= 40); 11 | 12 | } 13 | -------------------------------------------------------------------------------- /modules/Partido/quarks/isEspectroPolitico.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | module.exports = (value) => { 4 | const isEmpty = require('./isEmpty')(value); 5 | const isString = require('./isString')(value); 6 | 7 | if(isEmpty) return false; 8 | if(!isString) return false; 9 | 10 | return (value.length >= 2 && value.length <= 40); 11 | 12 | } 13 | -------------------------------------------------------------------------------- /modules/Partido/quarks/isFaxCompleto.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | module.exports = (value) => { 4 | const regex = /^[9]?[0-9]{8,10}$/; 5 | const isEmpty = require('./isEmpty')(value); 6 | const isString = require('./isString')(value); 7 | 8 | if(isEmpty) return false; 9 | if(!isString) return false; 10 | 11 | return regex.test(value); 12 | 13 | } 14 | -------------------------------------------------------------------------------- /modules/Partido/quarks/isIdeologia.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | module.exports = (value) => { 4 | const isEmpty = require('./isEmpty')(value); 5 | const isString = require('./isString')(value); 6 | 7 | if(isEmpty) return false; 8 | if(!isString) return false; 9 | 10 | return (value.length >= 2 && value.length <= 80); 11 | 12 | } 13 | -------------------------------------------------------------------------------- /modules/Partido/quarks/isImpeachment.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | module.exports = (value) => { 4 | const isEmpty = require('./isEmpty')(value); 5 | const isBoolean = require('./isBoolean')(value); 6 | 7 | if(isEmpty) return false; 8 | if(!isBoolean) return false; 9 | 10 | return true; 11 | 12 | } 13 | -------------------------------------------------------------------------------- /modules/Partido/quarks/isName.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | module.exports = (value) => { 4 | const isEmpty = require('./isEmpty')(value); 5 | const isString = require('./isString')(value); 6 | 7 | if(isEmpty) return false; 8 | if(!isString) return false; 9 | 10 | return (value.length > 3 && value.length < 80); 11 | } -------------------------------------------------------------------------------- /modules/Partido/quarks/isNameMessage.js: -------------------------------------------------------------------------------- 1 | module.exports = 'O nome {VALUE} precisa ter tamanho maior que 3 e menor que 80!'; -------------------------------------------------------------------------------- /modules/Partido/quarks/isNumber.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | module.exports = (value) => { 4 | return !isNaN(parseFloat(value)) && isFinite(value); 5 | }; 6 | -------------------------------------------------------------------------------- /modules/Partido/quarks/isNumeroAfiliados.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | module.exports = (value) => { 4 | const isEmpty = require('./isEmpty')(value); 5 | const isNumber = require('./isNumber')(value); 6 | 7 | if(isEmpty) return false; 8 | if(!isNumber) return false; 9 | 10 | return true; 11 | 12 | } 13 | -------------------------------------------------------------------------------- /modules/Partido/quarks/isNumeroPartido.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | module.exports = (value) => { 4 | const isEmpty = require('./isEmpty')(value); 5 | const isNumber = require('./isNumber')(value); 6 | 7 | if(isEmpty) return false; 8 | if(!isNumber) return false; 9 | 10 | return true; 11 | 12 | } 13 | -------------------------------------------------------------------------------- /modules/Partido/quarks/isPassword.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | module.exports = (value) => { 4 | const isEmpty = require('./isEmpty')(value); 5 | const isString = require('./isString')(value); 6 | 7 | if(isEmpty) return false; 8 | if(!isString) return false; 9 | 10 | return (value.length > 6 && value.length < 20); 11 | } -------------------------------------------------------------------------------- /modules/Partido/quarks/isPasswordMessage.js: -------------------------------------------------------------------------------- 1 | module.exports = 'O senha {VALUE} precisa ter tamanho maior que 6 e menor que 20!'; -------------------------------------------------------------------------------- /modules/Partido/quarks/isPhoneDDD.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | module.exports = (value) => { 4 | const isEmpty = require('./isEmpty')(value); 5 | const isString = require('./isString')(value); 6 | 7 | if(isEmpty) return false; 8 | if(!isString) return false; 9 | 10 | return (value.length === 2); 11 | } -------------------------------------------------------------------------------- /modules/Partido/quarks/isPhoneDDDMessage.js: -------------------------------------------------------------------------------- 1 | module.exports = 'O DDD {VALUE} precisa ter tamanho IGUAL a 2!'; -------------------------------------------------------------------------------- /modules/Partido/quarks/isPhoneNumber.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | module.exports = (value) => { 4 | const regex = /^[9]?[0-9]{8}$/; 5 | const isEmpty = require('./isEmpty')(value); 6 | const isString = require('./isString')(value); 7 | 8 | if(isEmpty) return false; 9 | if(!isString) return false; 10 | 11 | return regex.test(value); 12 | } 13 | 14 | -------------------------------------------------------------------------------- /modules/Partido/quarks/isPhoneNumber.test.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | const valueTRUE = '99990000'; 4 | const valueFALSE = 'a'; 5 | 6 | const validateTRUE = require('./isPhoneNumber')(valueTRUE); 7 | const validateFALSE = require('./isPhoneNumber')(valueFALSE); 8 | 9 | console.log(valueTRUE+' is Phone Number?', validateTRUE); 10 | console.log(valueFALSE+' is Phone Number?', validateFALSE); -------------------------------------------------------------------------------- /modules/Partido/quarks/isPhoneNumberMessage.js: -------------------------------------------------------------------------------- 1 | module.exports = 'O número de telefone {VALUE} precisa ter tamanho IGUAL a 8 ou 9 dígitos!'; -------------------------------------------------------------------------------- /modules/Partido/quarks/isPresidente.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | module.exports = (value) => { 4 | const isEmpty = require('./isEmpty')(value); 5 | const isString = require('./isString')(value); 6 | 7 | if(isEmpty) return false; 8 | if(!isString) return false; 9 | 10 | return (value.length >= 2 && value.length <= 80); 11 | 12 | } 13 | -------------------------------------------------------------------------------- /modules/Partido/quarks/isSigla.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | module.exports = (value) => { 4 | const isEmpty = require('./isEmpty')(value); 5 | const isString = require('./isString')(value); 6 | 7 | if(isEmpty) return false; 8 | if(!isString) return false; 9 | 10 | return (value.length >= 2 && value.length <= 10); 11 | 12 | } 13 | -------------------------------------------------------------------------------- /modules/Partido/quarks/isSite.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | module.exports = (value) => { 4 | const isEmpty = require('./isEmpty')(value); 5 | const isString = require('./isString')(value); 6 | 7 | if(isEmpty) return false; 8 | if(!isString) return false; 9 | 10 | return true; 11 | 12 | } 13 | -------------------------------------------------------------------------------- /modules/Partido/quarks/isString.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | module.exports = (value) => { 4 | if (typeof value === 'string' || value instanceof String) return true; 5 | return false; 6 | } -------------------------------------------------------------------------------- /modules/Partido/quarks/isTelefoneCompleto.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | module.exports = (value) => { 4 | const regex = /^[9]?[0-9]{8,10}$/; 5 | const isEmpty = require('./isEmpty')(value); 6 | const isString = require('./isString')(value); 7 | 8 | if(isEmpty) return false; 9 | if(!isString) return false; 10 | 11 | return regex.test(value); 12 | } 13 | -------------------------------------------------------------------------------- /modules/Partido/routes.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | const express = require('express'); 4 | const router = express.Router(); 5 | const Organism = require('./organisms/user'); 6 | const Create = require('./brainCreate')(Organism); 7 | const Find = require('./brainFind')(Organism); 8 | const FindOne = require('./brainFindOne')(Organism); 9 | const Update = require('./brainUpdate')(Organism); 10 | const Remove = require('./brainRemove')(Organism); 11 | 12 | router.get('/', Find); 13 | router.get('/:id', FindOne); 14 | router.post('/', Create); 15 | router.put('/:id', Update); 16 | router.delete('/:id', Remove); 17 | 18 | module.exports = router; -------------------------------------------------------------------------------- /modules/Partido/routesRefactored.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | const express = require('express'); 4 | const Router = express.Router(); 5 | 6 | const Actions = require('./organisms/brain'); 7 | 8 | const _actions = ['create', 'find', 'update', 'delete']; 9 | const _methods = ['post', 'get', 'put', 'delete']; 10 | const _paths = ['/', '/', '/:id', '/:id']; 11 | const _callbacks = [Actions.create, Actions.find, Actions.update, Actions.remove]; 12 | 13 | 14 | const routes = [ 15 | { 16 | action: 'create' 17 | , method: 'post' 18 | , path: '/' 19 | , callback: Actions.create 20 | } 21 | , { 22 | action: 'find' 23 | , method: 'get' 24 | , path: '/' 25 | , callback: Actions.find 26 | } 27 | , { 28 | action: 'findOne' 29 | , method: 'get' 30 | , path: '/:id' 31 | , callback: Actions.findOne 32 | } 33 | , { 34 | action: 'update' 35 | , method: 'put' 36 | , path: '/:id' 37 | , callback: Actions.update 38 | } 39 | , { 40 | action: 'delete' 41 | , method: 'delete' 42 | , path: '/:id' 43 | , callback: Actions.remove 44 | } 45 | ]; 46 | 47 | routes.forEach( route => { 48 | Router[route.method](route.path, route.callback); 49 | }); 50 | 51 | module.exports = Router; 52 | 53 | 54 | -------------------------------------------------------------------------------- /node_modules/.bin/jade: -------------------------------------------------------------------------------- 1 | ../jade/bin/jade.js -------------------------------------------------------------------------------- /node_modules/.bin/uglifyjs: -------------------------------------------------------------------------------- 1 | ../uglify-js/bin/uglifyjs -------------------------------------------------------------------------------- /node_modules/accepts/.npmignore: -------------------------------------------------------------------------------- 1 | test/ -------------------------------------------------------------------------------- /node_modules/accepts/.travis.yml: -------------------------------------------------------------------------------- 1 | node_js: 2 | - "0.10" 3 | - "0.11" 4 | language: node_js -------------------------------------------------------------------------------- /node_modules/accepts/Makefile: -------------------------------------------------------------------------------- 1 | BIN = ./node_modules/.bin/ 2 | 3 | test: 4 | @${BIN}mocha \ 5 | --require should \ 6 | --reporter spec 7 | 8 | .PHONY: test -------------------------------------------------------------------------------- /node_modules/amdefine/intercept.js: -------------------------------------------------------------------------------- 1 | /*jshint node: true */ 2 | var inserted, 3 | Module = require('module'), 4 | fs = require('fs'), 5 | existingExtFn = Module._extensions['.js'], 6 | amdefineRegExp = /amdefine\.js/; 7 | 8 | inserted = "if (typeof define !== 'function') {var define = require('amdefine')(module)}"; 9 | 10 | //From the node/lib/module.js source: 11 | function stripBOM(content) { 12 | // Remove byte order marker. This catches EF BB BF (the UTF-8 BOM) 13 | // because the buffer-to-string conversion in `fs.readFileSync()` 14 | // translates it to FEFF, the UTF-16 BOM. 15 | if (content.charCodeAt(0) === 0xFEFF) { 16 | content = content.slice(1); 17 | } 18 | return content; 19 | } 20 | 21 | //Also adapted from the node/lib/module.js source: 22 | function intercept(module, filename) { 23 | var content = stripBOM(fs.readFileSync(filename, 'utf8')); 24 | 25 | if (!amdefineRegExp.test(module.id)) { 26 | content = inserted + content; 27 | } 28 | 29 | module._compile(content, filename); 30 | } 31 | 32 | intercept._id = 'amdefine/intercept'; 33 | 34 | if (!existingExtFn._id || existingExtFn._id !== intercept._id) { 35 | Module._extensions['.js'] = intercept; 36 | } 37 | -------------------------------------------------------------------------------- /node_modules/async/LICENSE: -------------------------------------------------------------------------------- 1 | Copyright (c) 2010 Caolan McMahon 2 | 3 | Permission is hereby granted, free of charge, to any person obtaining a copy 4 | of this software and associated documentation files (the "Software"), to deal 5 | in the Software without restriction, including without limitation the rights 6 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 7 | copies of the Software, and to permit persons to whom the Software is 8 | furnished to do so, subject to the following conditions: 9 | 10 | The above copyright notice and this permission notice shall be included in 11 | all copies or substantial portions of the Software. 12 | 13 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 14 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 15 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 16 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 17 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 18 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 19 | THE SOFTWARE. 20 | -------------------------------------------------------------------------------- /node_modules/async/component.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "async", 3 | "repo": "caolan/async", 4 | "description": "Higher-order functions and common patterns for asynchronous code", 5 | "version": "0.1.23", 6 | "keywords": [], 7 | "dependencies": {}, 8 | "development": {}, 9 | "main": "lib/async.js", 10 | "scripts": [ "lib/async.js" ] 11 | } 12 | -------------------------------------------------------------------------------- /node_modules/balanced-match/.npmignore: -------------------------------------------------------------------------------- 1 | node_modules 2 | .DS_Store 3 | -------------------------------------------------------------------------------- /node_modules/balanced-match/.travis.yml: -------------------------------------------------------------------------------- 1 | language: node_js 2 | node_js: 3 | - "0.10" 4 | -------------------------------------------------------------------------------- /node_modules/balanced-match/LICENSE.md: -------------------------------------------------------------------------------- 1 | (MIT) 2 | 3 | Copyright (c) 2013 Julian Gruber <julian@juliangruber.com> 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy of 6 | this software and associated documentation files (the "Software"), to deal in 7 | the Software without restriction, including without limitation the rights to 8 | use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies 9 | of the Software, and to permit persons to whom the Software is furnished to do 10 | so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /node_modules/balanced-match/Makefile: -------------------------------------------------------------------------------- 1 | 2 | test: 3 | @node_modules/.bin/tape test/*.js 4 | 5 | .PHONY: test 6 | 7 | -------------------------------------------------------------------------------- /node_modules/balanced-match/example.js: -------------------------------------------------------------------------------- 1 | var balanced = require('./'); 2 | 3 | console.log(balanced('{', '}', 'pre{in{nested}}post')); 4 | console.log(balanced('{', '}', 'pre{first}between{second}post')); 5 | 6 | -------------------------------------------------------------------------------- /node_modules/balanced-match/index.js: -------------------------------------------------------------------------------- 1 | module.exports = balanced; 2 | function balanced(a, b, str) { 3 | var r = range(a, b, str); 4 | 5 | return r && { 6 | start: r[0], 7 | end: r[1], 8 | pre: str.slice(0, r[0]), 9 | body: str.slice(r[0] + a.length, r[1]), 10 | post: str.slice(r[1] + b.length) 11 | }; 12 | } 13 | 14 | balanced.range = range; 15 | function range(a, b, str) { 16 | var begs, beg, left, right, result; 17 | var ai = str.indexOf(a); 18 | var bi = str.indexOf(b, ai + 1); 19 | var i = ai; 20 | 21 | if (ai >= 0 && bi > 0) { 22 | begs = []; 23 | left = str.length; 24 | 25 | while (i < str.length && i >= 0 && ! result) { 26 | if (i == ai) { 27 | begs.push(i); 28 | ai = str.indexOf(a, i + 1); 29 | } else if (begs.length == 1) { 30 | result = [ begs.pop(), bi ]; 31 | } else { 32 | beg = begs.pop(); 33 | if (beg < left) { 34 | left = beg; 35 | right = bi; 36 | } 37 | 38 | bi = str.indexOf(b, i + 1); 39 | } 40 | 41 | i = ai < bi && ai >= 0 ? ai : bi; 42 | } 43 | 44 | if (begs.length) { 45 | result = [ left, right ]; 46 | } 47 | } 48 | 49 | return result; 50 | } 51 | -------------------------------------------------------------------------------- /node_modules/body-parser/.npmignore: -------------------------------------------------------------------------------- 1 | test/ -------------------------------------------------------------------------------- /node_modules/body-parser/.travis.yml: -------------------------------------------------------------------------------- 1 | node_js: 2 | - "0.10" 3 | language: node_js -------------------------------------------------------------------------------- /node_modules/body-parser/HISTORY.md: -------------------------------------------------------------------------------- 1 | 2 | 1.0.1 / 2014-04-14 3 | ================== 4 | 5 | * use `type-is` module 6 | 7 | 1.0.1 / 2014-03-20 8 | ================== 9 | 10 | * lower default limits to 100kb 11 | -------------------------------------------------------------------------------- /node_modules/body-parser/Makefile: -------------------------------------------------------------------------------- 1 | BIN = ./node_modules/.bin/ 2 | 3 | test: 4 | @$(BIN)mocha \ 5 | --require should \ 6 | --reporter spec \ 7 | --bail 8 | 9 | .PHONY: test -------------------------------------------------------------------------------- /node_modules/brace-expansion/.npmignore: -------------------------------------------------------------------------------- 1 | test 2 | .gitignore 3 | .travis.yml 4 | -------------------------------------------------------------------------------- /node_modules/brace-expansion/example.js: -------------------------------------------------------------------------------- 1 | var expand = require('./'); 2 | 3 | console.log(expand('http://any.org/archive{1996..1999}/vol{1..4}/part{a,b,c}.html')); 4 | console.log(expand('http://www.numericals.com/file{1..100..10}.txt')); 5 | console.log(expand('http://www.letters.com/file{a..z..2}.txt')); 6 | console.log(expand('mkdir /usr/local/src/bash/{old,new,dist,bugs}')); 7 | console.log(expand('chown root /usr/{ucb/{ex,edit},lib/{ex?.?*,how_ex}}')); 8 | 9 | -------------------------------------------------------------------------------- /node_modules/buffer-crc32/.npmignore: -------------------------------------------------------------------------------- 1 | node_modules -------------------------------------------------------------------------------- /node_modules/buffer-crc32/.travis.yml: -------------------------------------------------------------------------------- 1 | language: node_js 2 | node_js: 3 | - 0.6 4 | - 0.8 5 | notifications: 6 | email: 7 | recipients: 8 | - brianloveswords@gmail.com -------------------------------------------------------------------------------- /node_modules/bytes/.npmignore: -------------------------------------------------------------------------------- 1 | test 2 | -------------------------------------------------------------------------------- /node_modules/bytes/History.md: -------------------------------------------------------------------------------- 1 | 2 | 1.0.0 / 2014-05-05 3 | ================== 4 | 5 | * add negative support. fixes #6 6 | 7 | 0.3.0 / 2014-03-19 8 | ================== 9 | 10 | * added terabyte support 11 | 12 | 0.2.1 / 2013-04-01 13 | ================== 14 | 15 | * add .component 16 | 17 | 0.2.0 / 2012-10-28 18 | ================== 19 | 20 | * bytes(200).should.eql('200b') 21 | 22 | 0.1.0 / 2012-07-04 23 | ================== 24 | 25 | * add bytes to string conversion [yields] 26 | -------------------------------------------------------------------------------- /node_modules/bytes/Makefile: -------------------------------------------------------------------------------- 1 | 2 | test: 3 | @./node_modules/.bin/mocha \ 4 | --reporter spec \ 5 | --require should 6 | 7 | .PHONY: test -------------------------------------------------------------------------------- /node_modules/bytes/component.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "bytes", 3 | "description": "byte size string parser / serializer", 4 | "keywords": ["bytes", "utility"], 5 | "version": "0.2.1", 6 | "scripts": ["index.js"] 7 | } 8 | -------------------------------------------------------------------------------- /node_modules/bytes/index.js: -------------------------------------------------------------------------------- 1 | 2 | /** 3 | * Parse byte `size` string. 4 | * 5 | * @param {String} size 6 | * @return {Number} 7 | * @api public 8 | */ 9 | 10 | module.exports = function(size) { 11 | if ('number' == typeof size) return convert(size); 12 | var parts = size.match(/^(\d+(?:\.\d+)?) *(kb|mb|gb|tb)$/) 13 | , n = parseFloat(parts[1]) 14 | , type = parts[2]; 15 | 16 | var map = { 17 | kb: 1 << 10 18 | , mb: 1 << 20 19 | , gb: 1 << 30 20 | , tb: ((1 << 30) * 1024) 21 | }; 22 | 23 | return map[type] * n; 24 | }; 25 | 26 | /** 27 | * convert bytes into string. 28 | * 29 | * @param {Number} b - bytes to convert 30 | * @return {String} 31 | * @api public 32 | */ 33 | 34 | function convert (b) { 35 | var tb = ((1 << 30) * 1024), gb = 1 << 30, mb = 1 << 20, kb = 1 << 10, abs = Math.abs(b); 36 | if (abs >= tb) return (Math.round(b / tb * 100) / 100) + 'tb'; 37 | if (abs >= gb) return (Math.round(b / gb * 100) / 100) + 'gb'; 38 | if (abs >= mb) return (Math.round(b / mb * 100) / 100) + 'mb'; 39 | if (abs >= kb) return (Math.round(b / kb * 100) / 100) + 'kb'; 40 | return b + 'b'; 41 | } 42 | -------------------------------------------------------------------------------- /node_modules/camelcase/index.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | module.exports = function () { 3 | var str = [].map.call(arguments, function (str) { 4 | return str.trim(); 5 | }).filter(function (str) { 6 | return str.length; 7 | }).join('-'); 8 | 9 | if (!str.length) { 10 | return ''; 11 | } 12 | 13 | if (str.length === 1 || !(/[_.\- ]+/).test(str) ) { 14 | if (str[0] === str[0].toLowerCase() && str.slice(1) !== str.slice(1).toLowerCase()) { 15 | return str; 16 | } 17 | 18 | return str.toLowerCase(); 19 | } 20 | 21 | return str 22 | .replace(/^[_.\- ]+/, '') 23 | .toLowerCase() 24 | .replace(/[_.\- ]+(\w|$)/g, function (m, p1) { 25 | return p1.toUpperCase(); 26 | }); 27 | }; 28 | -------------------------------------------------------------------------------- /node_modules/camelcase/license: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) Sindre Sorhus (sindresorhus.com) 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in 13 | all copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 21 | THE SOFTWARE. 22 | -------------------------------------------------------------------------------- /node_modules/camelcase/readme.md: -------------------------------------------------------------------------------- 1 | # camelcase [![Build Status](https://travis-ci.org/sindresorhus/camelcase.svg?branch=master)](https://travis-ci.org/sindresorhus/camelcase) 2 | 3 | > Convert a dash/dot/underscore/space separated string to camelCase: `foo-bar` → `fooBar` 4 | 5 | 6 | ## Install 7 | 8 | ```sh 9 | $ npm install --save camelcase 10 | ``` 11 | 12 | 13 | ## Usage 14 | 15 | ```js 16 | var camelCase = require('camelcase'); 17 | 18 | camelCase('foo-bar'); 19 | //=> fooBar 20 | 21 | camelCase('foo_bar'); 22 | //=> fooBar 23 | 24 | camelCase('Foo-Bar'); 25 | //=> fooBar 26 | 27 | camelCase('--foo.bar'); 28 | //=> fooBar 29 | 30 | camelCase('__foo__bar__'); 31 | //=> fooBar 32 | 33 | camelCase('foo bar'); 34 | //=> fooBar 35 | 36 | console.log(process.argv[3]); 37 | //=> --foo-bar 38 | camelCase(process.argv[3]); 39 | //=> fooBar 40 | 41 | camelCase('foo', 'bar'); 42 | //=> fooBar 43 | 44 | camelCase('__foo__', '--bar'); 45 | //=> fooBar 46 | ``` 47 | 48 | 49 | ## Related 50 | 51 | See [`decamelize`](https://github.com/sindresorhus/decamelize) for the inverse. 52 | 53 | 54 | ## License 55 | 56 | MIT © [Sindre Sorhus](http://sindresorhus.com) 57 | -------------------------------------------------------------------------------- /node_modules/character-parser/.npmignore: -------------------------------------------------------------------------------- 1 | test/ 2 | .travis.yml -------------------------------------------------------------------------------- /node_modules/character-parser/LICENSE: -------------------------------------------------------------------------------- 1 | Copyright (c) 2013 Forbes Lindesay 2 | 3 | Permission is hereby granted, free of charge, to any person obtaining a copy 4 | of this software and associated documentation files (the "Software"), to deal 5 | in the Software without restriction, including without limitation the rights 6 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 7 | copies of the Software, and to permit persons to whom the Software is 8 | furnished to do so, subject to the following conditions: 9 | 10 | The above copyright notice and this permission notice shall be included in 11 | all copies or substantial portions of the Software. 12 | 13 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 14 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 15 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 16 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 17 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 18 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 19 | THE SOFTWARE. 20 | -------------------------------------------------------------------------------- /node_modules/concat-map/.travis.yml: -------------------------------------------------------------------------------- 1 | language: node_js 2 | node_js: 3 | - 0.4 4 | - 0.6 5 | -------------------------------------------------------------------------------- /node_modules/concat-map/LICENSE: -------------------------------------------------------------------------------- 1 | This software is released under the MIT license: 2 | 3 | Permission is hereby granted, free of charge, to any person obtaining a copy of 4 | this software and associated documentation files (the "Software"), to deal in 5 | the Software without restriction, including without limitation the rights to 6 | use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of 7 | the Software, and to permit persons to whom the Software is furnished to do so, 8 | subject to the following conditions: 9 | 10 | The above copyright notice and this permission notice shall be included in all 11 | copies or substantial portions of the Software. 12 | 13 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 14 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS 15 | FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR 16 | COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER 17 | IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN 18 | CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 19 | -------------------------------------------------------------------------------- /node_modules/concat-map/README.markdown: -------------------------------------------------------------------------------- 1 | concat-map 2 | ========== 3 | 4 | Concatenative mapdashery. 5 | 6 | [![browser support](http://ci.testling.com/substack/node-concat-map.png)](http://ci.testling.com/substack/node-concat-map) 7 | 8 | [![build status](https://secure.travis-ci.org/substack/node-concat-map.png)](http://travis-ci.org/substack/node-concat-map) 9 | 10 | example 11 | ======= 12 | 13 | ``` js 14 | var concatMap = require('concat-map'); 15 | var xs = [ 1, 2, 3, 4, 5, 6 ]; 16 | var ys = concatMap(xs, function (x) { 17 | return x % 2 ? [ x - 0.1, x, x + 0.1 ] : []; 18 | }); 19 | console.dir(ys); 20 | ``` 21 | 22 | *** 23 | 24 | ``` 25 | [ 0.9, 1, 1.1, 2.9, 3, 3.1, 4.9, 5, 5.1 ] 26 | ``` 27 | 28 | methods 29 | ======= 30 | 31 | ``` js 32 | var concatMap = require('concat-map') 33 | ``` 34 | 35 | concatMap(xs, fn) 36 | ----------------- 37 | 38 | Return an array of concatenated elements by calling `fn(x, i)` for each element 39 | `x` and each index `i` in the array `xs`. 40 | 41 | When `fn(x, i)` returns an array, its result will be concatenated with the 42 | result array. If `fn(x, i)` returns anything else, that value will be pushed 43 | onto the end of the result array. 44 | 45 | install 46 | ======= 47 | 48 | With [npm](http://npmjs.org) do: 49 | 50 | ``` 51 | npm install concat-map 52 | ``` 53 | 54 | license 55 | ======= 56 | 57 | MIT 58 | 59 | notes 60 | ===== 61 | 62 | This module was written while sitting high above the ground in a tree. 63 | -------------------------------------------------------------------------------- /node_modules/concat-map/example/map.js: -------------------------------------------------------------------------------- 1 | var concatMap = require('../'); 2 | var xs = [ 1, 2, 3, 4, 5, 6 ]; 3 | var ys = concatMap(xs, function (x) { 4 | return x % 2 ? [ x - 0.1, x, x + 0.1 ] : []; 5 | }); 6 | console.dir(ys); 7 | -------------------------------------------------------------------------------- /node_modules/concat-map/index.js: -------------------------------------------------------------------------------- 1 | module.exports = function (xs, fn) { 2 | var res = []; 3 | for (var i = 0; i < xs.length; i++) { 4 | var x = fn(xs[i], i); 5 | if (isArray(x)) res.push.apply(res, x); 6 | else res.push(x); 7 | } 8 | return res; 9 | }; 10 | 11 | var isArray = Array.isArray || function (xs) { 12 | return Object.prototype.toString.call(xs) === '[object Array]'; 13 | }; 14 | -------------------------------------------------------------------------------- /node_modules/concat-map/test/map.js: -------------------------------------------------------------------------------- 1 | var concatMap = require('../'); 2 | var test = require('tape'); 3 | 4 | test('empty or not', function (t) { 5 | var xs = [ 1, 2, 3, 4, 5, 6 ]; 6 | var ixes = []; 7 | var ys = concatMap(xs, function (x, ix) { 8 | ixes.push(ix); 9 | return x % 2 ? [ x - 0.1, x, x + 0.1 ] : []; 10 | }); 11 | t.same(ys, [ 0.9, 1, 1.1, 2.9, 3, 3.1, 4.9, 5, 5.1 ]); 12 | t.same(ixes, [ 0, 1, 2, 3, 4, 5 ]); 13 | t.end(); 14 | }); 15 | 16 | test('always something', function (t) { 17 | var xs = [ 'a', 'b', 'c', 'd' ]; 18 | var ys = concatMap(xs, function (x) { 19 | return x === 'b' ? [ 'B', 'B', 'B' ] : [ x ]; 20 | }); 21 | t.same(ys, [ 'a', 'B', 'B', 'B', 'c', 'd' ]); 22 | t.end(); 23 | }); 24 | 25 | test('scalars', function (t) { 26 | var xs = [ 'a', 'b', 'c', 'd' ]; 27 | var ys = concatMap(xs, function (x) { 28 | return x === 'b' ? [ 'B', 'B', 'B' ] : x; 29 | }); 30 | t.same(ys, [ 'a', 'B', 'B', 'B', 'c', 'd' ]); 31 | t.end(); 32 | }); 33 | 34 | test('undefs', function (t) { 35 | var xs = [ 'a', 'b', 'c', 'd' ]; 36 | var ys = concatMap(xs, function () {}); 37 | t.same(ys, [ undefined, undefined, undefined, undefined ]); 38 | t.end(); 39 | }); 40 | -------------------------------------------------------------------------------- /node_modules/constantinople/.gitattributes: -------------------------------------------------------------------------------- 1 | # Auto detect text files and perform LF normalization 2 | * text=auto 3 | 4 | # Custom for Visual Studio 5 | *.cs diff=csharp 6 | *.sln merge=union 7 | *.csproj merge=union 8 | *.vbproj merge=union 9 | *.fsproj merge=union 10 | *.dbproj merge=union 11 | 12 | # Standard to msysgit 13 | *.doc diff=astextplain 14 | *.DOC diff=astextplain 15 | *.docx diff=astextplain 16 | *.DOCX diff=astextplain 17 | *.dot diff=astextplain 18 | *.DOT diff=astextplain 19 | *.pdf diff=astextplain 20 | *.PDF diff=astextplain 21 | *.rtf diff=astextplain 22 | *.RTF diff=astextplain 23 | -------------------------------------------------------------------------------- /node_modules/constantinople/.npmignore: -------------------------------------------------------------------------------- 1 | lib-cov 2 | *.seed 3 | *.log 4 | *.csv 5 | *.dat 6 | *.out 7 | *.pid 8 | *.gz 9 | pids 10 | logs 11 | results 12 | npm-debug.log 13 | node_modules 14 | -------------------------------------------------------------------------------- /node_modules/constantinople/.travis.yml: -------------------------------------------------------------------------------- 1 | language: node_js 2 | node_js: 3 | - "0.8" 4 | - "0.10" -------------------------------------------------------------------------------- /node_modules/constantinople/LICENSE: -------------------------------------------------------------------------------- 1 | Copyright (c) 2013 Forbes Lindesay 2 | 3 | Permission is hereby granted, free of charge, to any person obtaining a copy 4 | of this software and associated documentation files (the "Software"), to deal 5 | in the Software without restriction, including without limitation the rights 6 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 7 | copies of the Software, and to permit persons to whom the Software is 8 | furnished to do so, subject to the following conditions: 9 | 10 | The above copyright notice and this permission notice shall be included in 11 | all copies or substantial portions of the Software. 12 | 13 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 14 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 15 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 16 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 17 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 18 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 19 | THE SOFTWARE. -------------------------------------------------------------------------------- /node_modules/cookie-parser/.npmignore: -------------------------------------------------------------------------------- 1 | node_modules 2 | -------------------------------------------------------------------------------- /node_modules/cookie-parser/README.md: -------------------------------------------------------------------------------- 1 | # cookie-parser 2 | 3 | Parse _Cookie_ header and populate `req.cookies` with an object keyed by the cookie 4 | names. Optionally you may enabled signed cookie support by passing a `secret` string, 5 | which assigns `req.secret` so it may be used by other middleware. 6 | 7 | ```js 8 | var cookieParser = require('cookie-parser'); 9 | 10 | connect() 11 | .use(cookieParser('optional secret string')) 12 | .use(function(req, res, next){ 13 | res.end(JSON.stringify(req.cookies)); 14 | }) 15 | ``` 16 | 17 | ## install 18 | 19 | ```shell 20 | npm install cookie-parser 21 | ``` 22 | 23 | ## License 24 | 25 | MIT 26 | -------------------------------------------------------------------------------- /node_modules/cookie-parser/lib/parse.js: -------------------------------------------------------------------------------- 1 | var signature = require('cookie-signature'); 2 | 3 | /** 4 | * Parse signed cookies, returning an object 5 | * containing the decoded key/value pairs, 6 | * while removing the signed key from `obj`. 7 | * 8 | * @param {Object} obj 9 | * @return {Object} 10 | * @api private 11 | */ 12 | 13 | exports.signedCookies = function(obj, secret){ 14 | var ret = {}; 15 | Object.keys(obj).forEach(function(key){ 16 | var val = obj[key]; 17 | if (0 == val.indexOf('s:')) { 18 | val = signature.unsign(val.slice(2), secret); 19 | if (val) { 20 | ret[key] = val; 21 | delete obj[key]; 22 | } 23 | } 24 | }); 25 | return ret; 26 | }; 27 | 28 | /** 29 | * Parse JSON cookies. 30 | * 31 | * @param {Object} obj 32 | * @return {Object} 33 | * @api private 34 | */ 35 | 36 | exports.JSONCookies = function(obj){ 37 | Object.keys(obj).forEach(function(key){ 38 | var val = obj[key]; 39 | var res = exports.JSONCookie(val); 40 | if (res) obj[key] = res; 41 | }); 42 | return obj; 43 | }; 44 | 45 | /** 46 | * Parse JSON cookie string 47 | * 48 | * @param {String} str 49 | * @return {Object} Parsed object or null if not json cookie 50 | * @api private 51 | */ 52 | 53 | exports.JSONCookie = function(str) { 54 | if (0 == str.indexOf('j:')) { 55 | try { 56 | return JSON.parse(str.slice(2)); 57 | } catch (err) { 58 | // no op 59 | } 60 | } 61 | }; 62 | -------------------------------------------------------------------------------- /node_modules/cookie-signature/.npmignore: -------------------------------------------------------------------------------- 1 | support 2 | test 3 | examples 4 | *.sock 5 | -------------------------------------------------------------------------------- /node_modules/cookie-signature/History.md: -------------------------------------------------------------------------------- 1 | 1.0.3 / 2014-01-28 2 | ================== 3 | 4 | * fix for timing attacks 5 | 6 | 1.0.2 / 2014-01-28 7 | ================== 8 | 9 | * fix missing repository warning 10 | * fix typo in test 11 | 12 | 1.0.1 / 2013-04-15 13 | ================== 14 | 15 | * Revert "Changed underlying HMAC algo. to sha512." 16 | * Revert "Fix for timing attacks on MAC verification." 17 | 18 | 0.0.1 / 2010-01-03 19 | ================== 20 | 21 | * Initial release 22 | -------------------------------------------------------------------------------- /node_modules/cookie-signature/Makefile: -------------------------------------------------------------------------------- 1 | 2 | test: 3 | @./node_modules/.bin/mocha \ 4 | --require should \ 5 | --reporter spec 6 | 7 | .PHONY: test -------------------------------------------------------------------------------- /node_modules/cookie-signature/index.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Module dependencies. 3 | */ 4 | 5 | var crypto = require('crypto'); 6 | 7 | /** 8 | * Sign the given `val` with `secret`. 9 | * 10 | * @param {String} val 11 | * @param {String} secret 12 | * @return {String} 13 | * @api private 14 | */ 15 | 16 | exports.sign = function(val, secret){ 17 | if ('string' != typeof val) throw new TypeError('cookie required'); 18 | if ('string' != typeof secret) throw new TypeError('secret required'); 19 | return val + '.' + crypto 20 | .createHmac('sha256', secret) 21 | .update(val) 22 | .digest('base64') 23 | .replace(/\=+$/, ''); 24 | }; 25 | 26 | /** 27 | * Unsign and decode the given `val` with `secret`, 28 | * returning `false` if the signature is invalid. 29 | * 30 | * @param {String} val 31 | * @param {String} secret 32 | * @return {String|Boolean} 33 | * @api private 34 | */ 35 | 36 | exports.unsign = function(val, secret){ 37 | if ('string' != typeof val) throw new TypeError('cookie required'); 38 | if ('string' != typeof secret) throw new TypeError('secret required'); 39 | var str = val.slice(0, val.lastIndexOf('.')) 40 | , mac = exports.sign(str, secret); 41 | 42 | return exports.sign(mac, secret) == exports.sign(val, secret) ? str : false; 43 | }; 44 | -------------------------------------------------------------------------------- /node_modules/cookie/.npmignore: -------------------------------------------------------------------------------- 1 | node_modules 2 | -------------------------------------------------------------------------------- /node_modules/cookie/.travis.yml: -------------------------------------------------------------------------------- 1 | language: node_js 2 | node_js: 3 | - "0.6" 4 | - "0.8" 5 | - "0.10" 6 | -------------------------------------------------------------------------------- /node_modules/cookie/LICENSE: -------------------------------------------------------------------------------- 1 | // MIT License 2 | 3 | Copyright (C) Roman Shtylman 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: 6 | 7 | The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. 8 | 9 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 10 | -------------------------------------------------------------------------------- /node_modules/cookie/README.md: -------------------------------------------------------------------------------- 1 | # cookie [![Build Status](https://secure.travis-ci.org/shtylman/node-cookie.png?branch=master)](http://travis-ci.org/shtylman/node-cookie) # 2 | 3 | cookie is a basic cookie parser and serializer. It doesn't make assumptions about how you are going to deal with your cookies. It basically just provides a way to read and write the HTTP cookie headers. 4 | 5 | See [RFC6265](http://tools.ietf.org/html/rfc6265) for details about the http header for cookies. 6 | 7 | ## how? 8 | 9 | ``` 10 | npm install cookie 11 | ``` 12 | 13 | ```javascript 14 | var cookie = require('cookie'); 15 | 16 | var hdr = cookie.serialize('foo', 'bar'); 17 | // hdr = 'foo=bar'; 18 | 19 | var cookies = cookie.parse('foo=bar; cat=meow; dog=ruff'); 20 | // cookies = { foo: 'bar', cat: 'meow', dog: 'ruff' }; 21 | ``` 22 | 23 | ## more 24 | 25 | The serialize function takes a third parameter, an object, to set cookie options. See the RFC for valid values. 26 | 27 | ### path 28 | > cookie path 29 | 30 | ### expires 31 | > absolute expiration date for the cookie (Date object) 32 | 33 | ### maxAge 34 | > relative max age of the cookie from when the client receives it (seconds) 35 | 36 | ### domain 37 | > domain for the cookie 38 | 39 | ### secure 40 | > true or false 41 | 42 | ### httpOnly 43 | > true or false 44 | 45 | -------------------------------------------------------------------------------- /node_modules/cookie/test/mocha.opts: -------------------------------------------------------------------------------- 1 | --ui qunit 2 | -------------------------------------------------------------------------------- /node_modules/css-parse/.npmignore: -------------------------------------------------------------------------------- 1 | support 2 | test 3 | examples 4 | *.sock 5 | test.css 6 | test.js 7 | -------------------------------------------------------------------------------- /node_modules/css-parse/History.md: -------------------------------------------------------------------------------- 1 | 2 | 1.0.4 / 2012-09-17 3 | ================== 4 | 5 | * fix keyframes float percentages 6 | * fix an issue with comments containing slashes. 7 | 8 | 1.0.3 / 2012-09-01 9 | ================== 10 | 11 | * add component support 12 | * fix unquoted data uris [rstacruz] 13 | * fix keyframe names with no whitespace [rstacruz] 14 | * fix excess semicolon support [rstacruz] 15 | 16 | 1.0.2 / 2012-09-01 17 | ================== 18 | 19 | * fix IE property hack support [rstacruz] 20 | * fix quoted strings in declarations [rstacruz] 21 | 22 | 1.0.1 / 2012-07-26 23 | ================== 24 | 25 | * change "selector" to "selectors" array 26 | 27 | 1.0.0 / 2010-01-03 28 | ================== 29 | 30 | * Initial release 31 | -------------------------------------------------------------------------------- /node_modules/css-parse/Makefile: -------------------------------------------------------------------------------- 1 | 2 | test: 3 | @./node_modules/.bin/mocha \ 4 | --require should \ 5 | --reporter spec 6 | 7 | .PHONY: test -------------------------------------------------------------------------------- /node_modules/css-parse/component.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "css-parse", 3 | "repo": "visionmedia/node-css-parse", 4 | "version": "1.0.3", 5 | "description": "CSS parser", 6 | "keywords": ["css", "parser", "stylesheet"], 7 | "scripts": ["index.js"] 8 | } -------------------------------------------------------------------------------- /node_modules/css-stringify/.npmignore: -------------------------------------------------------------------------------- 1 | support 2 | test 3 | examples 4 | *.sock 5 | test.css 6 | test.js 7 | -------------------------------------------------------------------------------- /node_modules/css-stringify/History.md: -------------------------------------------------------------------------------- 1 | 2 | 1.0.5 / 2013-03-15 3 | ================== 4 | 5 | * fix indentation of multiple selectors in @media. Closes #11 6 | 7 | 1.0.4 / 2012-11-15 8 | ================== 9 | 10 | * fix indentation 11 | 12 | 1.0.3 / 2012-09-04 13 | ================== 14 | 15 | * add __@charset__ support [rstacruz] 16 | 17 | 1.0.2 / 2012-09-01 18 | ================== 19 | 20 | * add component support 21 | 22 | 1.0.1 / 2012-07-26 23 | ================== 24 | 25 | * add "selectors" array support 26 | 27 | 0.0.1 / 2010-01-03 28 | ================== 29 | 30 | * Initial release 31 | -------------------------------------------------------------------------------- /node_modules/css-stringify/Makefile: -------------------------------------------------------------------------------- 1 | 2 | test: 3 | @./node_modules/.bin/mocha \ 4 | --require should \ 5 | --reporter spec 6 | 7 | .PHONY: test -------------------------------------------------------------------------------- /node_modules/css-stringify/Readme.md: -------------------------------------------------------------------------------- 1 | 2 | # css-stringify 3 | 4 | CSS compiler using the AST provided by [css-parse](https://github.com/visionmedia/css-parse). 5 | 6 | ## Performance 7 | 8 | Formats 15,000 lines of CSS (2mb) in 23ms on my macbook air. 9 | 10 | ## License 11 | 12 | (The MIT License) 13 | 14 | Copyright (c) 2012 TJ Holowaychuk <tj@vision-media.ca> 15 | 16 | Permission is hereby granted, free of charge, to any person obtaining 17 | a copy of this software and associated documentation files (the 18 | 'Software'), to deal in the Software without restriction, including 19 | without limitation the rights to use, copy, modify, merge, publish, 20 | distribute, sublicense, and/or sell copies of the Software, and to 21 | permit persons to whom the Software is furnished to do so, subject to 22 | the following conditions: 23 | 24 | The above copyright notice and this permission notice shall be 25 | included in all copies or substantial portions of the Software. 26 | 27 | THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, 28 | EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 29 | MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 30 | IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 31 | CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 32 | TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 33 | SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 34 | -------------------------------------------------------------------------------- /node_modules/css-stringify/component.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "css-stringify", 3 | "repo": "visionmedia/css-stringify", 4 | "version": "1.0.5", 5 | "description": "CSS compiler", 6 | "keywords": ["css", "stringify", "stylesheet"], 7 | "scripts": ["index.js"] 8 | } 9 | -------------------------------------------------------------------------------- /node_modules/css/.npmignore: -------------------------------------------------------------------------------- 1 | support 2 | test 3 | examples 4 | *.sock 5 | -------------------------------------------------------------------------------- /node_modules/css/History.md: -------------------------------------------------------------------------------- 1 | 2 | 1.0.7 / 2012-11-21 3 | ================== 4 | 5 | * fix component.json 6 | 7 | 1.0.4 / 2012-11-15 8 | ================== 9 | 10 | * update css-stringify 11 | 12 | 1.0.3 / 2012-09-01 13 | ================== 14 | 15 | * add component support 16 | 17 | 0.0.1 / 2010-01-03 18 | ================== 19 | 20 | * Initial release 21 | -------------------------------------------------------------------------------- /node_modules/css/Makefile: -------------------------------------------------------------------------------- 1 | 2 | test: 3 | @node test 4 | 5 | benchmark: 6 | @node benchmark 7 | 8 | .PHONY: test benchmark -------------------------------------------------------------------------------- /node_modules/css/benchmark.js: -------------------------------------------------------------------------------- 1 | 2 | var css = require('./') 3 | , fs = require('fs') 4 | , read = fs.readFileSync 5 | , str = read('examples/ui.css', 'utf8'); 6 | 7 | var n = 5000; 8 | var ops = 200; 9 | var t = process.hrtime(t); 10 | var results = []; 11 | 12 | while (n--) { 13 | css.stringify(css.parse(str)); 14 | if (n % ops == 0) { 15 | t = process.hrtime(t); 16 | var ms = t[1] / 1000 / 1000; 17 | var persec = (ops * (1000 / ms) | 0); 18 | results.push(persec); 19 | process.stdout.write('\r [' + persec + ' ops/s] [' + n + ']'); 20 | t = process.hrtime(); 21 | } 22 | } 23 | 24 | function sum(arr) { 25 | return arr.reduce(function(sum, n){ 26 | return sum + n; 27 | }); 28 | } 29 | 30 | function mean(arr) { 31 | return sum(arr) / arr.length | 0; 32 | } 33 | 34 | console.log(); 35 | console.log(' avg: %d ops/s', mean(results)); 36 | console.log(' size: %d kb', (str.length / 1024).toFixed(2)); -------------------------------------------------------------------------------- /node_modules/css/component.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "css", 3 | "version": "1.0.8", 4 | "description": "CSS parser / stringifier using css-parse and css-stringify", 5 | "keywords": ["css", "parser", "stylesheet"], 6 | "dependencies": { 7 | "visionmedia/css-parse": "*", 8 | "visionmedia/css-stringify": "*" 9 | }, 10 | "scripts": [ 11 | "index.js" 12 | ] 13 | } 14 | -------------------------------------------------------------------------------- /node_modules/css/index.js: -------------------------------------------------------------------------------- 1 | 2 | exports.parse = require('css-parse'); 3 | exports.stringify = require('css-stringify'); 4 | -------------------------------------------------------------------------------- /node_modules/css/test.js: -------------------------------------------------------------------------------- 1 | 2 | var css = require('./') 3 | , assert = require('assert'); 4 | 5 | assert(css.parse); 6 | assert(css.stringify); 7 | -------------------------------------------------------------------------------- /node_modules/debug/index.js: -------------------------------------------------------------------------------- 1 | if ('undefined' == typeof window) { 2 | module.exports = require('./lib/debug'); 3 | } else { 4 | module.exports = require('./debug'); 5 | } 6 | -------------------------------------------------------------------------------- /node_modules/decamelize/index.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | module.exports = function (str, sep) { 3 | if (typeof str !== 'string') { 4 | throw new TypeError('Expected a string'); 5 | } 6 | 7 | sep = typeof sep === 'undefined' ? '_' : sep; 8 | 9 | return str 10 | .replace(/([a-z\d])([A-Z])/g, '$1' + sep + '$2') 11 | .replace(/([A-Z]+)([A-Z][a-z\d]+)/g, '$1' + sep + '$2') 12 | .toLowerCase(); 13 | }; 14 | -------------------------------------------------------------------------------- /node_modules/decamelize/license: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) Sindre Sorhus (sindresorhus.com) 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in 13 | all copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 21 | THE SOFTWARE. 22 | -------------------------------------------------------------------------------- /node_modules/decamelize/readme.md: -------------------------------------------------------------------------------- 1 | # decamelize [![Build Status](https://travis-ci.org/sindresorhus/decamelize.svg?branch=master)](https://travis-ci.org/sindresorhus/decamelize) 2 | 3 | > Convert a camelized string into a lowercased one with a custom separator
4 | > Example: `unicornRainbow` → `unicorn_rainbow` 5 | 6 | 7 | ## Install 8 | 9 | ``` 10 | $ npm install --save decamelize 11 | ``` 12 | 13 | 14 | ## Usage 15 | 16 | ```js 17 | const decamelize = require('decamelize'); 18 | 19 | decamelize('unicornRainbow'); 20 | //=> 'unicorn_rainbow' 21 | 22 | decamelize('unicornRainbow', '-'); 23 | //=> 'unicorn-rainbow' 24 | ``` 25 | 26 | 27 | ## API 28 | 29 | ### decamelize(input, [separator]) 30 | 31 | #### input 32 | 33 | Type: `string` 34 | 35 | #### separator 36 | 37 | Type: `string`
38 | Default: `_` 39 | 40 | 41 | ## Related 42 | 43 | See [`camelcase`](https://github.com/sindresorhus/camelcase) for the inverse. 44 | 45 | 46 | ## License 47 | 48 | MIT © [Sindre Sorhus](https://sindresorhus.com) 49 | -------------------------------------------------------------------------------- /node_modules/escape-html/.npmignore: -------------------------------------------------------------------------------- 1 | components 2 | build 3 | -------------------------------------------------------------------------------- /node_modules/escape-html/Makefile: -------------------------------------------------------------------------------- 1 | 2 | build: components index.js 3 | @component build 4 | 5 | components: 6 | @Component install 7 | 8 | clean: 9 | rm -fr build components template.js 10 | 11 | .PHONY: clean 12 | -------------------------------------------------------------------------------- /node_modules/escape-html/Readme.md: -------------------------------------------------------------------------------- 1 | 2 | # escape-html 3 | 4 | Escape HTML entities 5 | 6 | ## Example 7 | 8 | ```js 9 | var escape = require('escape-html'); 10 | escape(str); 11 | ``` 12 | 13 | ## License 14 | 15 | MIT -------------------------------------------------------------------------------- /node_modules/escape-html/component.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "escape-html", 3 | "description": "Escape HTML entities", 4 | "version": "1.0.1", 5 | "keywords": ["escape", "html", "utility"], 6 | "dependencies": {}, 7 | "scripts": [ 8 | "index.js" 9 | ] 10 | } 11 | -------------------------------------------------------------------------------- /node_modules/escape-html/index.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Escape special characters in the given string of html. 3 | * 4 | * @param {String} html 5 | * @return {String} 6 | * @api private 7 | */ 8 | 9 | module.exports = function(html) { 10 | return String(html) 11 | .replace(/&/g, '&') 12 | .replace(/"/g, '"') 13 | .replace(/'/g, ''') 14 | .replace(//g, '>'); 16 | } 17 | -------------------------------------------------------------------------------- /node_modules/express/.npmignore: -------------------------------------------------------------------------------- 1 | .git* 2 | benchmarks/ 3 | docs/ 4 | examples/ 5 | support/ 6 | test/ 7 | testing.js 8 | .DS_Store 9 | .travis.yml 10 | coverage.html 11 | lib-cov 12 | -------------------------------------------------------------------------------- /node_modules/express/LICENSE: -------------------------------------------------------------------------------- 1 | (The MIT License) 2 | 3 | Copyright (c) 2009-2014 TJ Holowaychuk 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining 6 | a copy of this software and associated documentation files (the 7 | 'Software'), to deal in the Software without restriction, including 8 | without limitation the rights to use, copy, modify, merge, publish, 9 | distribute, sublicense, and/or sell copies of the Software, and to 10 | permit persons to whom the Software is furnished to do so, subject to 11 | the following conditions: 12 | 13 | The above copyright notice and this permission notice shall be 14 | included in all copies or substantial portions of the Software. 15 | 16 | THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, 17 | EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 18 | MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 19 | IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 20 | CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 21 | TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 22 | SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 23 | -------------------------------------------------------------------------------- /node_modules/express/Makefile: -------------------------------------------------------------------------------- 1 | 2 | MOCHA_OPTS= --check-leaks 3 | REPORTER = dot 4 | 5 | check: test 6 | 7 | test: test-unit test-acceptance 8 | 9 | test-unit: 10 | @NODE_ENV=test ./node_modules/.bin/mocha \ 11 | --reporter $(REPORTER) \ 12 | --globals setImmediate,clearImmediate \ 13 | $(MOCHA_OPTS) 14 | 15 | test-acceptance: 16 | @NODE_ENV=test ./node_modules/.bin/mocha \ 17 | --reporter $(REPORTER) \ 18 | --bail \ 19 | test/acceptance/*.js 20 | 21 | test-cov: lib-cov 22 | @EXPRESS_COV=1 $(MAKE) test REPORTER=html-cov > coverage.html 23 | 24 | lib-cov: 25 | @jscoverage lib lib-cov 26 | 27 | bench: 28 | @$(MAKE) -C benchmarks 29 | 30 | clean: 31 | rm -f coverage.html 32 | rm -fr lib-cov 33 | 34 | .PHONY: test test-unit test-acceptance bench clean 35 | -------------------------------------------------------------------------------- /node_modules/express/index.js: -------------------------------------------------------------------------------- 1 | 2 | module.exports = process.env.EXPRESS_COV 3 | ? require('./lib-cov/express') 4 | : require('./lib/express'); -------------------------------------------------------------------------------- /node_modules/express/lib/middleware/init.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Initialization middleware, exposing the 3 | * request and response to eachother, as well 4 | * as defaulting the X-Powered-By header field. 5 | * 6 | * @param {Function} app 7 | * @return {Function} 8 | * @api private 9 | */ 10 | 11 | exports.init = function(app){ 12 | return function expressInit(req, res, next){ 13 | if (app.enabled('x-powered-by')) res.setHeader('X-Powered-By', 'Express'); 14 | req.res = res; 15 | res.req = req; 16 | req.next = next; 17 | 18 | req.__proto__ = app.request; 19 | res.__proto__ = app.response; 20 | 21 | res.locals = res.locals || Object.create(null); 22 | 23 | next(); 24 | }; 25 | }; 26 | 27 | -------------------------------------------------------------------------------- /node_modules/express/lib/middleware/query.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Module dependencies. 3 | */ 4 | 5 | var qs = require('qs'); 6 | var parseUrl = require('parseurl'); 7 | 8 | /** 9 | * Query: 10 | * 11 | * Automatically parse the query-string when available, 12 | * populating the `req.query` object using 13 | * [qs](https://github.com/visionmedia/node-querystring). 14 | * 15 | * Examples: 16 | * 17 | * .use(connect.query()) 18 | * .use(function(req, res){ 19 | * res.end(JSON.stringify(req.query)); 20 | * }); 21 | * 22 | * The `options` passed are provided to qs.parse function. 23 | * 24 | * @param {Object} options 25 | * @return {Function} 26 | * @api public 27 | */ 28 | 29 | module.exports = function query(options){ 30 | return function query(req, res, next){ 31 | if (!req.query) { 32 | req.query = ~req.url.indexOf('?') 33 | ? qs.parse(parseUrl(req).query, options) 34 | : {}; 35 | } 36 | 37 | next(); 38 | }; 39 | }; 40 | -------------------------------------------------------------------------------- /node_modules/express/node_modules/cookie/.npmignore: -------------------------------------------------------------------------------- 1 | test 2 | .travis.yml 3 | -------------------------------------------------------------------------------- /node_modules/express/node_modules/cookie/LICENSE: -------------------------------------------------------------------------------- 1 | // MIT License 2 | 3 | Copyright (C) Roman Shtylman 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: 6 | 7 | The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. 8 | 9 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 10 | -------------------------------------------------------------------------------- /node_modules/express/node_modules/cookie/README.md: -------------------------------------------------------------------------------- 1 | # cookie [![Build Status](https://secure.travis-ci.org/defunctzombie/node-cookie.png?branch=master)](http://travis-ci.org/defunctzombie/node-cookie) # 2 | 3 | cookie is a basic cookie parser and serializer. It doesn't make assumptions about how you are going to deal with your cookies. It basically just provides a way to read and write the HTTP cookie headers. 4 | 5 | See [RFC6265](http://tools.ietf.org/html/rfc6265) for details about the http header for cookies. 6 | 7 | ## how? 8 | 9 | ``` 10 | npm install cookie 11 | ``` 12 | 13 | ```javascript 14 | var cookie = require('cookie'); 15 | 16 | var hdr = cookie.serialize('foo', 'bar'); 17 | // hdr = 'foo=bar'; 18 | 19 | var cookies = cookie.parse('foo=bar; cat=meow; dog=ruff'); 20 | // cookies = { foo: 'bar', cat: 'meow', dog: 'ruff' }; 21 | ``` 22 | 23 | ## more 24 | 25 | The serialize function takes a third parameter, an object, to set cookie options. See the RFC for valid values. 26 | 27 | ### path 28 | > cookie path 29 | 30 | ### expires 31 | > absolute expiration date for the cookie (Date object) 32 | 33 | ### maxAge 34 | > relative max age of the cookie from when the client receives it (seconds) 35 | 36 | ### domain 37 | > domain for the cookie 38 | 39 | ### secure 40 | > true or false 41 | 42 | ### httpOnly 43 | > true or false 44 | 45 | -------------------------------------------------------------------------------- /node_modules/fresh/.npmignore: -------------------------------------------------------------------------------- 1 | test 2 | -------------------------------------------------------------------------------- /node_modules/fresh/History.md: -------------------------------------------------------------------------------- 1 | 2 | 0.2.1 / 2014-01-29 3 | ================== 4 | 5 | * fix: support max-age=0 for end-to-end revalidation 6 | 7 | 0.2.0 / 2013-08-11 8 | ================== 9 | 10 | * fix: return false for no-cache 11 | -------------------------------------------------------------------------------- /node_modules/fresh/Makefile: -------------------------------------------------------------------------------- 1 | 2 | test: 3 | @./node_modules/.bin/mocha \ 4 | --reporter spec \ 5 | --require should 6 | 7 | .PHONY: test -------------------------------------------------------------------------------- /node_modules/fresh/index.js: -------------------------------------------------------------------------------- 1 | 2 | /** 3 | * Expose `fresh()`. 4 | */ 5 | 6 | module.exports = fresh; 7 | 8 | /** 9 | * Check freshness of `req` and `res` headers. 10 | * 11 | * When the cache is "fresh" __true__ is returned, 12 | * otherwise __false__ is returned to indicate that 13 | * the cache is now stale. 14 | * 15 | * @param {Object} req 16 | * @param {Object} res 17 | * @return {Boolean} 18 | * @api public 19 | */ 20 | 21 | function fresh(req, res) { 22 | // defaults 23 | var etagMatches = true; 24 | var notModified = true; 25 | 26 | // fields 27 | var modifiedSince = req['if-modified-since']; 28 | var noneMatch = req['if-none-match']; 29 | var lastModified = res['last-modified']; 30 | var etag = res['etag']; 31 | var cc = req['cache-control']; 32 | 33 | // unconditional request 34 | if (!modifiedSince && !noneMatch) return false; 35 | 36 | // check for no-cache cache request directive 37 | if (cc && cc.indexOf('no-cache') !== -1) return false; 38 | 39 | // parse if-none-match 40 | if (noneMatch) noneMatch = noneMatch.split(/ *, */); 41 | 42 | // if-none-match 43 | if (noneMatch) etagMatches = ~noneMatch.indexOf(etag) || '*' == noneMatch[0]; 44 | 45 | // if-modified-since 46 | if (modifiedSince) { 47 | modifiedSince = new Date(modifiedSince); 48 | lastModified = new Date(lastModified); 49 | notModified = lastModified <= modifiedSince; 50 | } 51 | 52 | return !! (etagMatches && notModified); 53 | } -------------------------------------------------------------------------------- /node_modules/is-promise/.npmignore: -------------------------------------------------------------------------------- 1 | component 2 | build 3 | node_modules 4 | test.js 5 | component.json 6 | .gitignore -------------------------------------------------------------------------------- /node_modules/is-promise/.travis.yml: -------------------------------------------------------------------------------- 1 | language: node_js 2 | node_js: 3 | - "0.10" -------------------------------------------------------------------------------- /node_modules/is-promise/LICENSE: -------------------------------------------------------------------------------- 1 | Copyright (c) 2014 Forbes Lindesay 2 | 3 | Permission is hereby granted, free of charge, to any person obtaining a copy 4 | of this software and associated documentation files (the "Software"), to deal 5 | in the Software without restriction, including without limitation the rights 6 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 7 | copies of the Software, and to permit persons to whom the Software is 8 | furnished to do so, subject to the following conditions: 9 | 10 | The above copyright notice and this permission notice shall be included in 11 | all copies or substantial portions of the Software. 12 | 13 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 14 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 15 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 16 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 17 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 18 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 19 | THE SOFTWARE. -------------------------------------------------------------------------------- /node_modules/is-promise/index.js: -------------------------------------------------------------------------------- 1 | module.exports = isPromise; 2 | 3 | function isPromise(obj) { 4 | return obj && typeof obj.then === 'function'; 5 | } -------------------------------------------------------------------------------- /node_modules/is-promise/readme.md: -------------------------------------------------------------------------------- 1 | 2 | # is-promise 3 | 4 | Test whether an object looks like a promises-a+ promise 5 | 6 | [![Build Status](https://img.shields.io/travis/then/is-promise/master.svg)](https://travis-ci.org/then/is-promise) 7 | [![Dependency Status](https://img.shields.io/gemnasium/then/is-promise.svg)](https://gemnasium.com/then/is-promise) 8 | [![NPM version](https://img.shields.io/npm/v/is-promise.svg)](https://www.npmjs.org/package/is-promise) 9 | 10 | ## Installation 11 | 12 | $ npm install is-promise 13 | 14 | You can also use it client side via npm. 15 | 16 | ## API 17 | 18 | ```javascript 19 | var isPromise = require('is-promise'); 20 | 21 | isPromise({then:function () {...}});//=>true 22 | isPromise(null);//=>false 23 | isPromise({});//=>false 24 | isPromise({then: true})//=>false 25 | ``` 26 | 27 | ## License 28 | 29 | MIT 30 | -------------------------------------------------------------------------------- /node_modules/jade/.npmignore: -------------------------------------------------------------------------------- 1 | test 2 | support 3 | benchmarks 4 | examples 5 | lib-cov 6 | coverage 7 | .gitmodules 8 | .travis.yml 9 | History.md 10 | Makefile 11 | test/ 12 | support/ 13 | benchmarks/ 14 | examples/ 15 | -------------------------------------------------------------------------------- /node_modules/jade/LICENSE: -------------------------------------------------------------------------------- 1 | (The MIT License) 2 | 3 | Copyright (c) 2009-2014 TJ Holowaychuk 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining 6 | a copy of this software and associated documentation files (the 7 | 'Software'), to deal in the Software without restriction, including 8 | without limitation the rights to use, copy, modify, merge, publish, 9 | distribute, sublicense, and/or sell copies of the Software, and to 10 | permit persons to whom the Software is furnished to do so, subject to 11 | the following conditions: 12 | 13 | The above copyright notice and this permission notice shall be 14 | included in all copies or substantial portions of the Software. 15 | 16 | THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, 17 | EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 18 | MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 19 | IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 20 | CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 21 | TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 22 | SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 23 | -------------------------------------------------------------------------------- /node_modules/jade/component.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "jade", 3 | "repo": "visionmedia/jade", 4 | "description": "Jade template runtime", 5 | "version": "1.3.1", 6 | "keywords": [ 7 | "template" 8 | ], 9 | "dependencies": {}, 10 | "development": {}, 11 | "license": "MIT", 12 | "scripts": [ 13 | "lib/runtime.js" 14 | ], 15 | "main": "lib/runtime.js" 16 | } -------------------------------------------------------------------------------- /node_modules/jade/index.js: -------------------------------------------------------------------------------- 1 | 2 | module.exports = require('./lib/jade'); 3 | -------------------------------------------------------------------------------- /node_modules/jade/lib/doctypes.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | module.exports = { 4 | 'default': '' 5 | , 'xml': '' 6 | , 'transitional': '' 7 | , 'strict': '' 8 | , 'frameset': '' 9 | , '1.1': '' 10 | , 'basic': '' 11 | , 'mobile': '' 12 | }; -------------------------------------------------------------------------------- /node_modules/jade/lib/filters-client.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | module.exports = filter; 4 | function filter(name, str, options) { 5 | if (typeof filter[name] === 'function') { 6 | var res = filter[name](str, options); 7 | } else { 8 | throw new Error('unknown filter ":' + name + '"'); 9 | } 10 | return res; 11 | } 12 | -------------------------------------------------------------------------------- /node_modules/jade/lib/filters.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | var transformers = require('transformers'); 4 | 5 | module.exports = filter; 6 | function filter(name, str, options) { 7 | if (typeof filter[name] === 'function') { 8 | var res = filter[name](str, options); 9 | } else if (transformers[name]) { 10 | var res = transformers[name].renderSync(str, options); 11 | } else { 12 | throw new Error('unknown filter ":' + name + '"'); 13 | } 14 | return res; 15 | } 16 | -------------------------------------------------------------------------------- /node_modules/jade/lib/inline-tags.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | module.exports = [ 4 | 'a' 5 | , 'abbr' 6 | , 'acronym' 7 | , 'b' 8 | , 'br' 9 | , 'code' 10 | , 'em' 11 | , 'font' 12 | , 'i' 13 | , 'img' 14 | , 'ins' 15 | , 'kbd' 16 | , 'map' 17 | , 'samp' 18 | , 'small' 19 | , 'span' 20 | , 'strong' 21 | , 'sub' 22 | , 'sup' 23 | ]; -------------------------------------------------------------------------------- /node_modules/jade/lib/nodes/block-comment.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | var Node = require('./node'); 4 | 5 | /** 6 | * Initialize a `BlockComment` with the given `block`. 7 | * 8 | * @param {String} val 9 | * @param {Block} block 10 | * @param {Boolean} buffer 11 | * @api public 12 | */ 13 | 14 | var BlockComment = module.exports = function BlockComment(val, block, buffer) { 15 | this.block = block; 16 | this.val = val; 17 | this.buffer = buffer; 18 | }; 19 | 20 | // Inherit from `Node`. 21 | BlockComment.prototype = Object.create(Node.prototype); 22 | BlockComment.prototype.constructor = BlockComment; 23 | 24 | BlockComment.prototype.type = 'BlockComment'; 25 | -------------------------------------------------------------------------------- /node_modules/jade/lib/nodes/case.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | var Node = require('./node'); 4 | 5 | /** 6 | * Initialize a new `Case` with `expr`. 7 | * 8 | * @param {String} expr 9 | * @api public 10 | */ 11 | 12 | var Case = exports = module.exports = function Case(expr, block){ 13 | this.expr = expr; 14 | this.block = block; 15 | }; 16 | 17 | // Inherit from `Node`. 18 | Case.prototype = Object.create(Node.prototype); 19 | Case.prototype.constructor = Case; 20 | 21 | Case.prototype.type = 'Case'; 22 | 23 | var When = exports.When = function When(expr, block){ 24 | this.expr = expr; 25 | this.block = block; 26 | this.debug = false; 27 | }; 28 | 29 | // Inherit from `Node`. 30 | When.prototype = Object.create(Node.prototype); 31 | When.prototype.constructor = When; 32 | 33 | When.prototype.type = 'When'; 34 | -------------------------------------------------------------------------------- /node_modules/jade/lib/nodes/code.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | var Node = require('./node'); 4 | 5 | /** 6 | * Initialize a `Code` node with the given code `val`. 7 | * Code may also be optionally buffered and escaped. 8 | * 9 | * @param {String} val 10 | * @param {Boolean} buffer 11 | * @param {Boolean} escape 12 | * @api public 13 | */ 14 | 15 | var Code = module.exports = function Code(val, buffer, escape) { 16 | this.val = val; 17 | this.buffer = buffer; 18 | this.escape = escape; 19 | if (val.match(/^ *else/)) this.debug = false; 20 | }; 21 | 22 | // Inherit from `Node`. 23 | Code.prototype = Object.create(Node.prototype); 24 | Code.prototype.constructor = Code; 25 | 26 | Code.prototype.type = 'Code'; // prevent the minifiers removing this -------------------------------------------------------------------------------- /node_modules/jade/lib/nodes/comment.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | var Node = require('./node'); 4 | 5 | /** 6 | * Initialize a `Comment` with the given `val`, optionally `buffer`, 7 | * otherwise the comment may render in the output. 8 | * 9 | * @param {String} val 10 | * @param {Boolean} buffer 11 | * @api public 12 | */ 13 | 14 | var Comment = module.exports = function Comment(val, buffer) { 15 | this.val = val; 16 | this.buffer = buffer; 17 | }; 18 | 19 | // Inherit from `Node`. 20 | Comment.prototype = Object.create(Node.prototype); 21 | Comment.prototype.constructor = Comment; 22 | 23 | Comment.prototype.type = 'Comment'; 24 | -------------------------------------------------------------------------------- /node_modules/jade/lib/nodes/doctype.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | var Node = require('./node'); 4 | 5 | /** 6 | * Initialize a `Doctype` with the given `val`. 7 | * 8 | * @param {String} val 9 | * @api public 10 | */ 11 | 12 | var Doctype = module.exports = function Doctype(val) { 13 | this.val = val; 14 | }; 15 | 16 | // Inherit from `Node`. 17 | Doctype.prototype = Object.create(Node.prototype); 18 | Doctype.prototype.constructor = Doctype; 19 | 20 | Doctype.prototype.type = 'Doctype'; 21 | -------------------------------------------------------------------------------- /node_modules/jade/lib/nodes/each.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | var Node = require('./node'); 4 | 5 | /** 6 | * Initialize an `Each` node, representing iteration 7 | * 8 | * @param {String} obj 9 | * @param {String} val 10 | * @param {String} key 11 | * @param {Block} block 12 | * @api public 13 | */ 14 | 15 | var Each = module.exports = function Each(obj, val, key, block) { 16 | this.obj = obj; 17 | this.val = val; 18 | this.key = key; 19 | this.block = block; 20 | }; 21 | 22 | // Inherit from `Node`. 23 | Each.prototype = Object.create(Node.prototype); 24 | Each.prototype.constructor = Each; 25 | 26 | Each.prototype.type = 'Each'; 27 | -------------------------------------------------------------------------------- /node_modules/jade/lib/nodes/filter.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | var Node = require('./node'); 4 | 5 | /** 6 | * Initialize a `Filter` node with the given 7 | * filter `name` and `block`. 8 | * 9 | * @param {String} name 10 | * @param {Block|Node} block 11 | * @api public 12 | */ 13 | 14 | var Filter = module.exports = function Filter(name, block, attrs) { 15 | this.name = name; 16 | this.block = block; 17 | this.attrs = attrs; 18 | }; 19 | 20 | // Inherit from `Node`. 21 | Filter.prototype = Object.create(Node.prototype); 22 | Filter.prototype.constructor = Filter; 23 | 24 | Filter.prototype.type = 'Filter'; 25 | -------------------------------------------------------------------------------- /node_modules/jade/lib/nodes/index.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | exports.Node = require('./node'); 4 | exports.Tag = require('./tag'); 5 | exports.Code = require('./code'); 6 | exports.Each = require('./each'); 7 | exports.Case = require('./case'); 8 | exports.Text = require('./text'); 9 | exports.Block = require('./block'); 10 | exports.MixinBlock = require('./mixin-block'); 11 | exports.Mixin = require('./mixin'); 12 | exports.Filter = require('./filter'); 13 | exports.Comment = require('./comment'); 14 | exports.Literal = require('./literal'); 15 | exports.BlockComment = require('./block-comment'); 16 | exports.Doctype = require('./doctype'); 17 | -------------------------------------------------------------------------------- /node_modules/jade/lib/nodes/literal.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | var Node = require('./node'); 4 | 5 | /** 6 | * Initialize a `Literal` node with the given `str. 7 | * 8 | * @param {String} str 9 | * @api public 10 | */ 11 | 12 | var Literal = module.exports = function Literal(str) { 13 | this.str = str; 14 | }; 15 | 16 | // Inherit from `Node`. 17 | Literal.prototype = Object.create(Node.prototype); 18 | Literal.prototype.constructor = Literal; 19 | 20 | Literal.prototype.type = 'Literal'; 21 | -------------------------------------------------------------------------------- /node_modules/jade/lib/nodes/mixin-block.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | var Node = require('./node'); 4 | 5 | /** 6 | * Initialize a new `Block` with an optional `node`. 7 | * 8 | * @param {Node} node 9 | * @api public 10 | */ 11 | 12 | var MixinBlock = module.exports = function MixinBlock(){}; 13 | 14 | // Inherit from `Node`. 15 | MixinBlock.prototype = Object.create(Node.prototype); 16 | MixinBlock.prototype.constructor = MixinBlock; 17 | 18 | MixinBlock.prototype.type = 'MixinBlock'; 19 | -------------------------------------------------------------------------------- /node_modules/jade/lib/nodes/mixin.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | var Attrs = require('./attrs'); 4 | 5 | /** 6 | * Initialize a new `Mixin` with `name` and `block`. 7 | * 8 | * @param {String} name 9 | * @param {String} args 10 | * @param {Block} block 11 | * @api public 12 | */ 13 | 14 | var Mixin = module.exports = function Mixin(name, args, block, call){ 15 | Attrs.call(this); 16 | this.name = name; 17 | this.args = args; 18 | this.block = block; 19 | this.call = call; 20 | }; 21 | 22 | // Inherit from `Attrs`. 23 | Mixin.prototype = Object.create(Attrs.prototype); 24 | Mixin.prototype.constructor = Mixin; 25 | 26 | Mixin.prototype.type = 'Mixin'; 27 | -------------------------------------------------------------------------------- /node_modules/jade/lib/nodes/node.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | var Node = module.exports = function Node(){}; 4 | 5 | /** 6 | * Clone this node (return itself) 7 | * 8 | * @return {Node} 9 | * @api private 10 | */ 11 | 12 | Node.prototype.clone = function(){ 13 | var err = new Error('node.clone is deprecated and will be removed in v2.0.0'); 14 | console.warn(err.stack); 15 | return this; 16 | }; 17 | 18 | Node.prototype.type = ''; 19 | -------------------------------------------------------------------------------- /node_modules/jade/lib/nodes/text.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | var Node = require('./node'); 4 | 5 | /** 6 | * Initialize a `Text` node with optional `line`. 7 | * 8 | * @param {String} line 9 | * @api public 10 | */ 11 | 12 | var Text = module.exports = function Text(line) { 13 | this.val = line; 14 | }; 15 | 16 | // Inherit from `Node`. 17 | Text.prototype = Object.create(Node.prototype); 18 | Text.prototype.constructor = Text; 19 | 20 | Text.prototype.type = 'Text'; 21 | 22 | /** 23 | * Flag as text. 24 | */ 25 | 26 | Text.prototype.isText = true; -------------------------------------------------------------------------------- /node_modules/jade/lib/self-closing.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | // source: http://www.w3.org/html/wg/drafts/html/master/syntax.html#void-elements 4 | 5 | module.exports = [ 6 | 'area' 7 | , 'base' 8 | , 'br' 9 | , 'col' 10 | , 'embed' 11 | , 'hr' 12 | , 'img' 13 | , 'input' 14 | , 'keygen' 15 | , 'link' 16 | , 'menuitem' 17 | , 'meta' 18 | , 'param' 19 | , 'source' 20 | , 'track' 21 | , 'wbr' 22 | ]; 23 | -------------------------------------------------------------------------------- /node_modules/jade/lib/utils.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | /** 4 | * Merge `b` into `a`. 5 | * 6 | * @param {Object} a 7 | * @param {Object} b 8 | * @return {Object} 9 | * @api public 10 | */ 11 | 12 | exports.merge = function(a, b) { 13 | for (var key in b) a[key] = b[key]; 14 | return a; 15 | }; 16 | 17 | -------------------------------------------------------------------------------- /node_modules/merge-descriptors/.npmignore: -------------------------------------------------------------------------------- 1 | # Compiled source # 2 | ################### 3 | *.com 4 | *.class 5 | *.dll 6 | *.exe 7 | *.o 8 | *.so 9 | 10 | # Packages # 11 | ############ 12 | # it's better to unpack these files and commit the raw source 13 | # git has its own built in compression methods 14 | *.7z 15 | *.dmg 16 | *.gz 17 | *.iso 18 | *.jar 19 | *.rar 20 | *.tar 21 | *.zip 22 | 23 | # Logs and databases # 24 | ###################### 25 | *.log 26 | *.sql 27 | *.sqlite 28 | 29 | # OS generated files # 30 | ###################### 31 | .DS_Store* 32 | ehthumbs.db 33 | Icon? 34 | Thumbs.db 35 | 36 | # Node.js # 37 | ########### 38 | lib-cov 39 | *.seed 40 | *.log 41 | *.csv 42 | *.dat 43 | *.out 44 | *.pid 45 | *.gz 46 | 47 | pids 48 | logs 49 | results 50 | 51 | node_modules 52 | npm-debug.log 53 | 54 | # Components # 55 | ############## 56 | 57 | /build 58 | /components 59 | /vendors -------------------------------------------------------------------------------- /node_modules/merge-descriptors/component.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "merge-descriptors", 3 | "description": "Merge objects using descriptors", 4 | "version": "0.0.2", 5 | "scripts": [ 6 | "index.js" 7 | ], 8 | "repo": "component/merge-descriptors", 9 | "license": "MIT" 10 | } -------------------------------------------------------------------------------- /node_modules/merge-descriptors/index.js: -------------------------------------------------------------------------------- 1 | module.exports = function (dest, src) { 2 | Object.getOwnPropertyNames(src).forEach(function (name) { 3 | var descriptor = Object.getOwnPropertyDescriptor(src, name) 4 | Object.defineProperty(dest, name, descriptor) 5 | }) 6 | 7 | return dest 8 | } -------------------------------------------------------------------------------- /node_modules/methods/.npmignore: -------------------------------------------------------------------------------- 1 | node_modules/ 2 | -------------------------------------------------------------------------------- /node_modules/methods/History.md: -------------------------------------------------------------------------------- 1 | 2 | 1.0.0 / 2014-05-08 3 | ================== 4 | 5 | * add PURGE. Closes #9 6 | 7 | 0.1.0 / 2013-10-28 8 | ================== 9 | 10 | * add http.METHODS support 11 | -------------------------------------------------------------------------------- /node_modules/methods/LICENSE: -------------------------------------------------------------------------------- 1 | (The MIT License) 2 | 3 | Copyright (c) 2013-2014 TJ Holowaychuk 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining 6 | a copy of this software and associated documentation files (the 7 | 'Software'), to deal in the Software without restriction, including 8 | without limitation the rights to use, copy, modify, merge, publish, 9 | distribute, sublicense, and/or sell copies of the Software, and to 10 | permit persons to whom the Software is furnished to do so, subject to 11 | the following conditions: 12 | 13 | The above copyright notice and this permission notice shall be 14 | included in all copies or substantial portions of the Software. 15 | 16 | THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, 17 | EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 18 | MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 19 | IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 20 | CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 21 | TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 22 | SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 23 | 24 | -------------------------------------------------------------------------------- /node_modules/methods/Readme.md: -------------------------------------------------------------------------------- 1 | 2 | # Methods 3 | 4 | HTTP verbs that node core's parser supports. 5 | -------------------------------------------------------------------------------- /node_modules/methods/index.js: -------------------------------------------------------------------------------- 1 | 2 | var http = require('http'); 3 | 4 | if (http.METHODS) { 5 | module.exports = http.METHODS.map(function(method){ 6 | return method.toLowerCase(); 7 | }); 8 | 9 | return; 10 | } 11 | 12 | module.exports = [ 13 | 'get', 14 | 'post', 15 | 'put', 16 | 'head', 17 | 'delete', 18 | 'options', 19 | 'trace', 20 | 'copy', 21 | 'lock', 22 | 'mkcol', 23 | 'move', 24 | 'purge', 25 | 'propfind', 26 | 'proppatch', 27 | 'unlock', 28 | 'report', 29 | 'mkactivity', 30 | 'checkout', 31 | 'merge', 32 | 'm-search', 33 | 'notify', 34 | 'subscribe', 35 | 'unsubscribe', 36 | 'patch', 37 | 'search' 38 | ]; 39 | -------------------------------------------------------------------------------- /node_modules/methods/test/methods.js: -------------------------------------------------------------------------------- 1 | var http = require('http'); 2 | var assert = require('assert'); 3 | var methods = require('..'); 4 | 5 | describe('methods', function() { 6 | 7 | if (http.METHODS) { 8 | 9 | it('is a lowercased http.METHODS', function() { 10 | var lowercased = http.METHODS.map(function(method) { 11 | return method.toLowerCase(); 12 | }); 13 | assert.deepEqual(lowercased, methods); 14 | }); 15 | 16 | } else { 17 | 18 | it('contains GET, POST, PUT, and DELETE', function() { 19 | assert.notEqual(methods.indexOf('get'), -1); 20 | assert.notEqual(methods.indexOf('post'), -1); 21 | assert.notEqual(methods.indexOf('put'), -1); 22 | assert.notEqual(methods.indexOf('delete'), -1); 23 | }); 24 | 25 | it('is all lowercase', function() { 26 | for (var i = 0; i < methods.length; i ++) { 27 | assert(methods[i], methods[i].toLowerCase(), methods[i] + " isn't all lowercase"); 28 | } 29 | }); 30 | 31 | } 32 | 33 | }); 34 | -------------------------------------------------------------------------------- /node_modules/mime/LICENSE: -------------------------------------------------------------------------------- 1 | Copyright (c) 2010 Benjamin Thomas, Robert Kieffer 2 | 3 | Permission is hereby granted, free of charge, to any person obtaining a copy 4 | of this software and associated documentation files (the "Software"), to deal 5 | in the Software without restriction, including without limitation the rights 6 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 7 | copies of the Software, and to permit persons to whom the Software is 8 | furnished to do so, subject to the following conditions: 9 | 10 | The above copyright notice and this permission notice shall be included in 11 | all copies or substantial portions of the Software. 12 | 13 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 14 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 15 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 16 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 17 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 18 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 19 | THE SOFTWARE. 20 | -------------------------------------------------------------------------------- /node_modules/minimatch/LICENSE: -------------------------------------------------------------------------------- 1 | The ISC License 2 | 3 | Copyright (c) Isaac Z. Schlueter and Contributors 4 | 5 | Permission to use, copy, modify, and/or distribute this software for any 6 | purpose with or without fee is hereby granted, provided that the above 7 | copyright notice and this permission notice appear in all copies. 8 | 9 | THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES 10 | WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF 11 | MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR 12 | ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES 13 | WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN 14 | ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR 15 | IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. 16 | -------------------------------------------------------------------------------- /node_modules/mkdirp/.npmignore: -------------------------------------------------------------------------------- 1 | node_modules/ 2 | npm-debug.log -------------------------------------------------------------------------------- /node_modules/mkdirp/.travis.yml: -------------------------------------------------------------------------------- 1 | language: node_js 2 | node_js: 3 | - 0.6 4 | - 0.8 5 | - 0.9 6 | -------------------------------------------------------------------------------- /node_modules/mkdirp/LICENSE: -------------------------------------------------------------------------------- 1 | Copyright 2010 James Halliday (mail@substack.net) 2 | 3 | This project is free software released under the MIT/X11 license: 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in 13 | all copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 21 | THE SOFTWARE. 22 | -------------------------------------------------------------------------------- /node_modules/mkdirp/examples/pow.js: -------------------------------------------------------------------------------- 1 | var mkdirp = require('mkdirp'); 2 | 3 | mkdirp('/tmp/foo/bar/baz', function (err) { 4 | if (err) console.error(err) 5 | else console.log('pow!') 6 | }); 7 | -------------------------------------------------------------------------------- /node_modules/mkdirp/readme.markdown: -------------------------------------------------------------------------------- 1 | # mkdirp 2 | 3 | Like `mkdir -p`, but in node.js! 4 | 5 | [![build status](https://secure.travis-ci.org/substack/node-mkdirp.png)](http://travis-ci.org/substack/node-mkdirp) 6 | 7 | # example 8 | 9 | ## pow.js 10 | 11 | ```js 12 | var mkdirp = require('mkdirp'); 13 | 14 | mkdirp('/tmp/foo/bar/baz', function (err) { 15 | if (err) console.error(err) 16 | else console.log('pow!') 17 | }); 18 | ``` 19 | 20 | Output 21 | 22 | ``` 23 | pow! 24 | ``` 25 | 26 | And now /tmp/foo/bar/baz exists, huzzah! 27 | 28 | # methods 29 | 30 | ```js 31 | var mkdirp = require('mkdirp'); 32 | ``` 33 | 34 | ## mkdirp(dir, mode, cb) 35 | 36 | Create a new directory and any necessary subdirectories at `dir` with octal 37 | permission string `mode`. 38 | 39 | If `mode` isn't specified, it defaults to `0777 & (~process.umask())`. 40 | 41 | `cb(err, made)` fires with the error or the first directory `made` 42 | that had to be created, if any. 43 | 44 | ## mkdirp.sync(dir, mode) 45 | 46 | Synchronously create a new directory and any necessary subdirectories at `dir` 47 | with octal permission string `mode`. 48 | 49 | If `mode` isn't specified, it defaults to `0777 & (~process.umask())`. 50 | 51 | Returns the first directory that had to be created, if any. 52 | 53 | # install 54 | 55 | With [npm](http://npmjs.org) do: 56 | 57 | ``` 58 | npm install mkdirp 59 | ``` 60 | 61 | # license 62 | 63 | MIT 64 | -------------------------------------------------------------------------------- /node_modules/mkdirp/test/chmod.js: -------------------------------------------------------------------------------- 1 | var mkdirp = require('../').mkdirp; 2 | var path = require('path'); 3 | var fs = require('fs'); 4 | var test = require('tap').test; 5 | 6 | var ps = [ '', 'tmp' ]; 7 | 8 | for (var i = 0; i < 25; i++) { 9 | var dir = Math.floor(Math.random() * Math.pow(16,4)).toString(16); 10 | ps.push(dir); 11 | } 12 | 13 | var file = ps.join('/'); 14 | 15 | test('chmod-pre', function (t) { 16 | var mode = 0744 17 | mkdirp(file, mode, function (er) { 18 | t.ifError(er, 'should not error'); 19 | fs.stat(file, function (er, stat) { 20 | t.ifError(er, 'should exist'); 21 | t.ok(stat && stat.isDirectory(), 'should be directory'); 22 | t.equal(stat && stat.mode & 0777, mode, 'should be 0744'); 23 | t.end(); 24 | }); 25 | }); 26 | }); 27 | 28 | test('chmod', function (t) { 29 | var mode = 0755 30 | mkdirp(file, mode, function (er) { 31 | t.ifError(er, 'should not error'); 32 | fs.stat(file, function (er, stat) { 33 | t.ifError(er, 'should exist'); 34 | t.ok(stat && stat.isDirectory(), 'should be directory'); 35 | t.end(); 36 | }); 37 | }); 38 | }); 39 | -------------------------------------------------------------------------------- /node_modules/mkdirp/test/clobber.js: -------------------------------------------------------------------------------- 1 | var mkdirp = require('../').mkdirp; 2 | var path = require('path'); 3 | var fs = require('fs'); 4 | var test = require('tap').test; 5 | 6 | var ps = [ '', 'tmp' ]; 7 | 8 | for (var i = 0; i < 25; i++) { 9 | var dir = Math.floor(Math.random() * Math.pow(16,4)).toString(16); 10 | ps.push(dir); 11 | } 12 | 13 | var file = ps.join('/'); 14 | 15 | // a file in the way 16 | var itw = ps.slice(0, 3).join('/'); 17 | 18 | 19 | test('clobber-pre', function (t) { 20 | console.error("about to write to "+itw) 21 | fs.writeFileSync(itw, 'I AM IN THE WAY, THE TRUTH, AND THE LIGHT.'); 22 | 23 | fs.stat(itw, function (er, stat) { 24 | t.ifError(er) 25 | t.ok(stat && stat.isFile(), 'should be file') 26 | t.end() 27 | }) 28 | }) 29 | 30 | test('clobber', function (t) { 31 | t.plan(2); 32 | mkdirp(file, 0755, function (err) { 33 | t.ok(err); 34 | t.equal(err.code, 'ENOTDIR'); 35 | t.end(); 36 | }); 37 | }); 38 | -------------------------------------------------------------------------------- /node_modules/mkdirp/test/mkdirp.js: -------------------------------------------------------------------------------- 1 | var mkdirp = require('../'); 2 | var path = require('path'); 3 | var fs = require('fs'); 4 | var test = require('tap').test; 5 | 6 | test('woo', function (t) { 7 | t.plan(2); 8 | var x = Math.floor(Math.random() * Math.pow(16,4)).toString(16); 9 | var y = Math.floor(Math.random() * Math.pow(16,4)).toString(16); 10 | var z = Math.floor(Math.random() * Math.pow(16,4)).toString(16); 11 | 12 | var file = '/tmp/' + [x,y,z].join('/'); 13 | 14 | mkdirp(file, 0755, function (err) { 15 | if (err) t.fail(err); 16 | else path.exists(file, function (ex) { 17 | if (!ex) t.fail('file not created') 18 | else fs.stat(file, function (err, stat) { 19 | if (err) t.fail(err) 20 | else { 21 | t.equal(stat.mode & 0777, 0755); 22 | t.ok(stat.isDirectory(), 'target not a directory'); 23 | t.end(); 24 | } 25 | }) 26 | }) 27 | }); 28 | }); 29 | -------------------------------------------------------------------------------- /node_modules/mkdirp/test/perm.js: -------------------------------------------------------------------------------- 1 | var mkdirp = require('../'); 2 | var path = require('path'); 3 | var fs = require('fs'); 4 | var test = require('tap').test; 5 | 6 | test('async perm', function (t) { 7 | t.plan(2); 8 | var file = '/tmp/' + (Math.random() * (1<<30)).toString(16); 9 | 10 | mkdirp(file, 0755, function (err) { 11 | if (err) t.fail(err); 12 | else path.exists(file, function (ex) { 13 | if (!ex) t.fail('file not created') 14 | else fs.stat(file, function (err, stat) { 15 | if (err) t.fail(err) 16 | else { 17 | t.equal(stat.mode & 0777, 0755); 18 | t.ok(stat.isDirectory(), 'target not a directory'); 19 | t.end(); 20 | } 21 | }) 22 | }) 23 | }); 24 | }); 25 | 26 | test('async root perm', function (t) { 27 | mkdirp('/tmp', 0755, function (err) { 28 | if (err) t.fail(err); 29 | t.end(); 30 | }); 31 | t.end(); 32 | }); 33 | -------------------------------------------------------------------------------- /node_modules/mkdirp/test/perm_sync.js: -------------------------------------------------------------------------------- 1 | var mkdirp = require('../'); 2 | var path = require('path'); 3 | var fs = require('fs'); 4 | var test = require('tap').test; 5 | 6 | test('sync perm', function (t) { 7 | t.plan(2); 8 | var file = '/tmp/' + (Math.random() * (1<<30)).toString(16) + '.json'; 9 | 10 | mkdirp.sync(file, 0755); 11 | path.exists(file, function (ex) { 12 | if (!ex) t.fail('file not created') 13 | else fs.stat(file, function (err, stat) { 14 | if (err) t.fail(err) 15 | else { 16 | t.equal(stat.mode & 0777, 0755); 17 | t.ok(stat.isDirectory(), 'target not a directory'); 18 | t.end(); 19 | } 20 | }) 21 | }); 22 | }); 23 | 24 | test('sync root perm', function (t) { 25 | t.plan(1); 26 | 27 | var file = '/tmp'; 28 | mkdirp.sync(file, 0755); 29 | path.exists(file, function (ex) { 30 | if (!ex) t.fail('file not created') 31 | else fs.stat(file, function (err, stat) { 32 | if (err) t.fail(err) 33 | else { 34 | t.ok(stat.isDirectory(), 'target not a directory'); 35 | t.end(); 36 | } 37 | }) 38 | }); 39 | }); 40 | -------------------------------------------------------------------------------- /node_modules/mkdirp/test/race.js: -------------------------------------------------------------------------------- 1 | var mkdirp = require('../').mkdirp; 2 | var path = require('path'); 3 | var fs = require('fs'); 4 | var test = require('tap').test; 5 | 6 | test('race', function (t) { 7 | t.plan(4); 8 | var ps = [ '', 'tmp' ]; 9 | 10 | for (var i = 0; i < 25; i++) { 11 | var dir = Math.floor(Math.random() * Math.pow(16,4)).toString(16); 12 | ps.push(dir); 13 | } 14 | var file = ps.join('/'); 15 | 16 | var res = 2; 17 | mk(file, function () { 18 | if (--res === 0) t.end(); 19 | }); 20 | 21 | mk(file, function () { 22 | if (--res === 0) t.end(); 23 | }); 24 | 25 | function mk (file, cb) { 26 | mkdirp(file, 0755, function (err) { 27 | if (err) t.fail(err); 28 | else path.exists(file, function (ex) { 29 | if (!ex) t.fail('file not created') 30 | else fs.stat(file, function (err, stat) { 31 | if (err) t.fail(err) 32 | else { 33 | t.equal(stat.mode & 0777, 0755); 34 | t.ok(stat.isDirectory(), 'target not a directory'); 35 | if (cb) cb(); 36 | } 37 | }) 38 | }) 39 | }); 40 | } 41 | }); 42 | -------------------------------------------------------------------------------- /node_modules/mkdirp/test/rel.js: -------------------------------------------------------------------------------- 1 | var mkdirp = require('../'); 2 | var path = require('path'); 3 | var fs = require('fs'); 4 | var test = require('tap').test; 5 | 6 | test('rel', function (t) { 7 | t.plan(2); 8 | var x = Math.floor(Math.random() * Math.pow(16,4)).toString(16); 9 | var y = Math.floor(Math.random() * Math.pow(16,4)).toString(16); 10 | var z = Math.floor(Math.random() * Math.pow(16,4)).toString(16); 11 | 12 | var cwd = process.cwd(); 13 | process.chdir('/tmp'); 14 | 15 | var file = [x,y,z].join('/'); 16 | 17 | mkdirp(file, 0755, function (err) { 18 | if (err) t.fail(err); 19 | else path.exists(file, function (ex) { 20 | if (!ex) t.fail('file not created') 21 | else fs.stat(file, function (err, stat) { 22 | if (err) t.fail(err) 23 | else { 24 | process.chdir(cwd); 25 | t.equal(stat.mode & 0777, 0755); 26 | t.ok(stat.isDirectory(), 'target not a directory'); 27 | t.end(); 28 | } 29 | }) 30 | }) 31 | }); 32 | }); 33 | -------------------------------------------------------------------------------- /node_modules/mkdirp/test/return.js: -------------------------------------------------------------------------------- 1 | var mkdirp = require('../'); 2 | var path = require('path'); 3 | var fs = require('fs'); 4 | var test = require('tap').test; 5 | 6 | test('return value', function (t) { 7 | t.plan(4); 8 | var x = Math.floor(Math.random() * Math.pow(16,4)).toString(16); 9 | var y = Math.floor(Math.random() * Math.pow(16,4)).toString(16); 10 | var z = Math.floor(Math.random() * Math.pow(16,4)).toString(16); 11 | 12 | var file = '/tmp/' + [x,y,z].join('/'); 13 | 14 | // should return the first dir created. 15 | // By this point, it would be profoundly surprising if /tmp didn't 16 | // already exist, since every other test makes things in there. 17 | mkdirp(file, function (err, made) { 18 | t.ifError(err); 19 | t.equal(made, '/tmp/' + x); 20 | mkdirp(file, function (err, made) { 21 | t.ifError(err); 22 | t.equal(made, null); 23 | }); 24 | }); 25 | }); 26 | -------------------------------------------------------------------------------- /node_modules/mkdirp/test/return_sync.js: -------------------------------------------------------------------------------- 1 | var mkdirp = require('../'); 2 | var path = require('path'); 3 | var fs = require('fs'); 4 | var test = require('tap').test; 5 | 6 | test('return value', function (t) { 7 | t.plan(2); 8 | var x = Math.floor(Math.random() * Math.pow(16,4)).toString(16); 9 | var y = Math.floor(Math.random() * Math.pow(16,4)).toString(16); 10 | var z = Math.floor(Math.random() * Math.pow(16,4)).toString(16); 11 | 12 | var file = '/tmp/' + [x,y,z].join('/'); 13 | 14 | // should return the first dir created. 15 | // By this point, it would be profoundly surprising if /tmp didn't 16 | // already exist, since every other test makes things in there. 17 | // Note that this will throw on failure, which will fail the test. 18 | var made = mkdirp.sync(file); 19 | t.equal(made, '/tmp/' + x); 20 | 21 | // making the same file again should have no effect. 22 | made = mkdirp.sync(file); 23 | t.equal(made, null); 24 | }); 25 | -------------------------------------------------------------------------------- /node_modules/mkdirp/test/root.js: -------------------------------------------------------------------------------- 1 | var mkdirp = require('../'); 2 | var path = require('path'); 3 | var fs = require('fs'); 4 | var test = require('tap').test; 5 | 6 | test('root', function (t) { 7 | // '/' on unix, 'c:/' on windows. 8 | var file = path.resolve('/'); 9 | 10 | mkdirp(file, 0755, function (err) { 11 | if (err) throw err 12 | fs.stat(file, function (er, stat) { 13 | if (er) throw er 14 | t.ok(stat.isDirectory(), 'target is a directory'); 15 | t.end(); 16 | }) 17 | }); 18 | }); 19 | -------------------------------------------------------------------------------- /node_modules/mkdirp/test/sync.js: -------------------------------------------------------------------------------- 1 | var mkdirp = require('../'); 2 | var path = require('path'); 3 | var fs = require('fs'); 4 | var test = require('tap').test; 5 | 6 | test('sync', function (t) { 7 | t.plan(2); 8 | var x = Math.floor(Math.random() * Math.pow(16,4)).toString(16); 9 | var y = Math.floor(Math.random() * Math.pow(16,4)).toString(16); 10 | var z = Math.floor(Math.random() * Math.pow(16,4)).toString(16); 11 | 12 | var file = '/tmp/' + [x,y,z].join('/'); 13 | 14 | try { 15 | mkdirp.sync(file, 0755); 16 | } catch (err) { 17 | t.fail(err); 18 | return t.end(); 19 | } 20 | 21 | path.exists(file, function (ex) { 22 | if (!ex) t.fail('file not created') 23 | else fs.stat(file, function (err, stat) { 24 | if (err) t.fail(err) 25 | else { 26 | t.equal(stat.mode & 0777, 0755); 27 | t.ok(stat.isDirectory(), 'target not a directory'); 28 | t.end(); 29 | } 30 | }); 31 | }); 32 | }); 33 | -------------------------------------------------------------------------------- /node_modules/mkdirp/test/umask.js: -------------------------------------------------------------------------------- 1 | var mkdirp = require('../'); 2 | var path = require('path'); 3 | var fs = require('fs'); 4 | var test = require('tap').test; 5 | 6 | test('implicit mode from umask', function (t) { 7 | t.plan(2); 8 | var x = Math.floor(Math.random() * Math.pow(16,4)).toString(16); 9 | var y = Math.floor(Math.random() * Math.pow(16,4)).toString(16); 10 | var z = Math.floor(Math.random() * Math.pow(16,4)).toString(16); 11 | 12 | var file = '/tmp/' + [x,y,z].join('/'); 13 | 14 | mkdirp(file, function (err) { 15 | if (err) t.fail(err); 16 | else path.exists(file, function (ex) { 17 | if (!ex) t.fail('file not created') 18 | else fs.stat(file, function (err, stat) { 19 | if (err) t.fail(err) 20 | else { 21 | t.equal(stat.mode & 0777, 0777 & (~process.umask())); 22 | t.ok(stat.isDirectory(), 'target not a directory'); 23 | t.end(); 24 | } 25 | }) 26 | }) 27 | }); 28 | }); 29 | -------------------------------------------------------------------------------- /node_modules/mkdirp/test/umask_sync.js: -------------------------------------------------------------------------------- 1 | var mkdirp = require('../'); 2 | var path = require('path'); 3 | var fs = require('fs'); 4 | var test = require('tap').test; 5 | 6 | test('umask sync modes', function (t) { 7 | t.plan(2); 8 | var x = Math.floor(Math.random() * Math.pow(16,4)).toString(16); 9 | var y = Math.floor(Math.random() * Math.pow(16,4)).toString(16); 10 | var z = Math.floor(Math.random() * Math.pow(16,4)).toString(16); 11 | 12 | var file = '/tmp/' + [x,y,z].join('/'); 13 | 14 | try { 15 | mkdirp.sync(file); 16 | } catch (err) { 17 | t.fail(err); 18 | return t.end(); 19 | } 20 | 21 | path.exists(file, function (ex) { 22 | if (!ex) t.fail('file not created') 23 | else fs.stat(file, function (err, stat) { 24 | if (err) t.fail(err) 25 | else { 26 | t.equal(stat.mode & 0777, (0777 & (~process.umask()))); 27 | t.ok(stat.isDirectory(), 'target not a directory'); 28 | t.end(); 29 | } 30 | }); 31 | }); 32 | }); 33 | -------------------------------------------------------------------------------- /node_modules/monocle/.npmignore: -------------------------------------------------------------------------------- 1 | test/ 2 | logo.png 3 | .travis.yml -------------------------------------------------------------------------------- /node_modules/monocle/LICENSE: -------------------------------------------------------------------------------- 1 | Copyright (c) 2013, Sam Saccone 2 | All rights reserved. 3 | 4 | Redistribution and use in source and binary forms, with or without 5 | modification, are permitted provided that the following conditions are met: 6 | 7 | * Redistributions of source code must retain the above copyright notice, 8 | this list of conditions and the following disclaimer. 9 | * Redistributions in binary form must reproduce the above copyright 10 | notice, this list of conditions and the following disclaimer in the 11 | documentation and/or other materials provided with the distribution. 12 | 13 | THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND ANY 14 | EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 15 | WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 16 | DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE FOR ANY 17 | DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 18 | (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR 19 | SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER 20 | CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 21 | LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 22 | OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH 23 | DAMAGE. 24 | -------------------------------------------------------------------------------- /node_modules/morgan/.npmignore: -------------------------------------------------------------------------------- 1 | test/ 2 | .travis.yml 3 | -------------------------------------------------------------------------------- /node_modules/morgan/History.md: -------------------------------------------------------------------------------- 1 | 1.0.1 / 2014-05-04 2 | ================== 3 | 4 | * Make buffer unique per morgan instance 5 | * deps: bytes@0.3.0 6 | * added terabyte support 7 | 8 | 1.0.0 / 2014-02-08 9 | ================== 10 | 11 | * Initial release 12 | -------------------------------------------------------------------------------- /node_modules/morgan/node_modules/bytes/.npmignore: -------------------------------------------------------------------------------- 1 | test 2 | -------------------------------------------------------------------------------- /node_modules/morgan/node_modules/bytes/History.md: -------------------------------------------------------------------------------- 1 | 2 | 0.3.0 / 2014-03-19 3 | ================== 4 | 5 | * added terabyte support 6 | 7 | 0.2.1 / 2013-04-01 8 | ================== 9 | 10 | * add .component 11 | 12 | 0.2.0 / 2012-10-28 13 | ================== 14 | 15 | * bytes(200).should.eql('200b') 16 | 17 | 0.1.0 / 2012-07-04 18 | ================== 19 | 20 | * add bytes to string conversion [yields] 21 | -------------------------------------------------------------------------------- /node_modules/morgan/node_modules/bytes/Makefile: -------------------------------------------------------------------------------- 1 | 2 | test: 3 | @./node_modules/.bin/mocha \ 4 | --reporter spec \ 5 | --require should 6 | 7 | .PHONY: test -------------------------------------------------------------------------------- /node_modules/morgan/node_modules/bytes/component.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "bytes", 3 | "description": "byte size string parser / serializer", 4 | "keywords": ["bytes", "utility"], 5 | "version": "0.2.1", 6 | "scripts": ["index.js"] 7 | } 8 | -------------------------------------------------------------------------------- /node_modules/morgan/node_modules/bytes/index.js: -------------------------------------------------------------------------------- 1 | 2 | /** 3 | * Parse byte `size` string. 4 | * 5 | * @param {String} size 6 | * @return {Number} 7 | * @api public 8 | */ 9 | 10 | module.exports = function(size) { 11 | if ('number' == typeof size) return convert(size); 12 | var parts = size.match(/^(\d+(?:\.\d+)?) *(kb|mb|gb|tb)$/) 13 | , n = parseFloat(parts[1]) 14 | , type = parts[2]; 15 | 16 | var map = { 17 | kb: 1 << 10 18 | , mb: 1 << 20 19 | , gb: 1 << 30 20 | , tb: ((1 << 30) * 1024) 21 | }; 22 | 23 | return map[type] * n; 24 | }; 25 | 26 | /** 27 | * convert bytes into string. 28 | * 29 | * @param {Number} b - bytes to convert 30 | * @return {String} 31 | * @api public 32 | */ 33 | 34 | function convert (b) { 35 | var tb = ((1 << 30) * 1024), gb = 1 << 30, mb = 1 << 20, kb = 1 << 10; 36 | if (b >= tb) return (Math.round(b / tb * 100) / 100) + 'tb'; 37 | if (b >= gb) return (Math.round(b / gb * 100) / 100) + 'gb'; 38 | if (b >= mb) return (Math.round(b / mb * 100) / 100) + 'mb'; 39 | if (b >= kb) return (Math.round(b / kb * 100) / 100) + 'kb'; 40 | return b + 'b'; 41 | } 42 | -------------------------------------------------------------------------------- /node_modules/negotiator/LICENSE: -------------------------------------------------------------------------------- 1 | (The MIT License) 2 | 3 | Copyright (c) 2012 Federico Romero 4 | Copyright (c) 2012-2014 Isaac Z. Schlueter 5 | 6 | Permission is hereby granted, free of charge, to any person obtaining 7 | a copy of this software and associated documentation files (the 8 | 'Software'), to deal in the Software without restriction, including 9 | without limitation the rights to use, copy, modify, merge, publish, 10 | distribute, sublicense, and/or sell copies of the Software, and to 11 | permit persons to whom the Software is furnished to do so, subject to 12 | the following conditions: 13 | 14 | The above copyright notice and this permission notice shall be 15 | included in all copies or substantial portions of the Software. 16 | 17 | THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, 18 | EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 19 | MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 20 | IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 21 | CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 22 | TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 23 | SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 24 | -------------------------------------------------------------------------------- /node_modules/negotiator/lib/negotiator.js: -------------------------------------------------------------------------------- 1 | module.exports = Negotiator; 2 | Negotiator.Negotiator = Negotiator; 3 | 4 | function Negotiator(request) { 5 | if (!(this instanceof Negotiator)) return new Negotiator(request); 6 | this.request = request; 7 | } 8 | 9 | var set = { charset: 'accept-charset', 10 | encoding: 'accept-encoding', 11 | language: 'accept-language', 12 | mediaType: 'accept' }; 13 | 14 | 15 | function capitalize(string){ 16 | return string.charAt(0).toUpperCase() + string.slice(1); 17 | } 18 | 19 | Object.keys(set).forEach(function (k) { 20 | var header = set[k], 21 | method = require('./'+k+'.js'), 22 | singular = k, 23 | plural = k + 's'; 24 | 25 | Negotiator.prototype[plural] = function (available) { 26 | return method(this.request.headers[header], available); 27 | }; 28 | 29 | Negotiator.prototype[singular] = function(available) { 30 | var set = this[plural](available); 31 | if (set) return set[0]; 32 | }; 33 | 34 | // Keep preferred* methods for legacy compatibility 35 | Negotiator.prototype['preferred'+capitalize(plural)] = Negotiator.prototype[plural]; 36 | Negotiator.prototype['preferred'+capitalize(singular)] = Negotiator.prototype[singular]; 37 | }) 38 | -------------------------------------------------------------------------------- /node_modules/optimist/.travis.yml: -------------------------------------------------------------------------------- 1 | language: node_js 2 | node_js: 3 | - "0.8" 4 | - "0.10" 5 | -------------------------------------------------------------------------------- /node_modules/optimist/LICENSE: -------------------------------------------------------------------------------- 1 | Copyright 2010 James Halliday (mail@substack.net) 2 | 3 | This project is free software released under the MIT/X11 license: 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in 13 | all copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 21 | THE SOFTWARE. 22 | -------------------------------------------------------------------------------- /node_modules/optimist/example/bool.js: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env node 2 | var util = require('util'); 3 | var argv = require('optimist').argv; 4 | 5 | if (argv.s) { 6 | util.print(argv.fr ? 'Le chat dit: ' : 'The cat says: '); 7 | } 8 | console.log( 9 | (argv.fr ? 'miaou' : 'meow') + (argv.p ? '.' : '') 10 | ); 11 | -------------------------------------------------------------------------------- /node_modules/optimist/example/boolean_double.js: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env node 2 | var argv = require('optimist') 3 | .boolean(['x','y','z']) 4 | .argv 5 | ; 6 | console.dir([ argv.x, argv.y, argv.z ]); 7 | console.dir(argv._); 8 | -------------------------------------------------------------------------------- /node_modules/optimist/example/boolean_single.js: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env node 2 | var argv = require('optimist') 3 | .boolean('v') 4 | .argv 5 | ; 6 | console.dir(argv.v); 7 | console.dir(argv._); 8 | -------------------------------------------------------------------------------- /node_modules/optimist/example/default_hash.js: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env node 2 | 3 | var argv = require('optimist') 4 | .default({ x : 10, y : 10 }) 5 | .argv 6 | ; 7 | 8 | console.log(argv.x + argv.y); 9 | -------------------------------------------------------------------------------- /node_modules/optimist/example/default_singles.js: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env node 2 | var argv = require('optimist') 3 | .default('x', 10) 4 | .default('y', 10) 5 | .argv 6 | ; 7 | console.log(argv.x + argv.y); 8 | -------------------------------------------------------------------------------- /node_modules/optimist/example/divide.js: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env node 2 | 3 | var argv = require('optimist') 4 | .usage('Usage: $0 -x [num] -y [num]') 5 | .demand(['x','y']) 6 | .argv; 7 | 8 | console.log(argv.x / argv.y); 9 | -------------------------------------------------------------------------------- /node_modules/optimist/example/line_count.js: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env node 2 | var argv = require('optimist') 3 | .usage('Count the lines in a file.\nUsage: $0') 4 | .demand('f') 5 | .alias('f', 'file') 6 | .describe('f', 'Load a file') 7 | .argv 8 | ; 9 | 10 | var fs = require('fs'); 11 | var s = fs.createReadStream(argv.file); 12 | 13 | var lines = 0; 14 | s.on('data', function (buf) { 15 | lines += buf.toString().match(/\n/g).length; 16 | }); 17 | 18 | s.on('end', function () { 19 | console.log(lines); 20 | }); 21 | -------------------------------------------------------------------------------- /node_modules/optimist/example/line_count_options.js: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env node 2 | var argv = require('optimist') 3 | .usage('Count the lines in a file.\nUsage: $0') 4 | .options({ 5 | file : { 6 | demand : true, 7 | alias : 'f', 8 | description : 'Load a file' 9 | }, 10 | base : { 11 | alias : 'b', 12 | description : 'Numeric base to use for output', 13 | default : 10, 14 | }, 15 | }) 16 | .argv 17 | ; 18 | 19 | var fs = require('fs'); 20 | var s = fs.createReadStream(argv.file); 21 | 22 | var lines = 0; 23 | s.on('data', function (buf) { 24 | lines += buf.toString().match(/\n/g).length; 25 | }); 26 | 27 | s.on('end', function () { 28 | console.log(lines.toString(argv.base)); 29 | }); 30 | -------------------------------------------------------------------------------- /node_modules/optimist/example/line_count_wrap.js: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env node 2 | var argv = require('optimist') 3 | .usage('Count the lines in a file.\nUsage: $0') 4 | .wrap(80) 5 | .demand('f') 6 | .alias('f', [ 'file', 'filename' ]) 7 | .describe('f', 8 | "Load a file. It's pretty important." 9 | + " Required even. So you'd better specify it." 10 | ) 11 | .alias('b', 'base') 12 | .describe('b', 'Numeric base to display the number of lines in') 13 | .default('b', 10) 14 | .describe('x', 'Super-secret optional parameter which is secret') 15 | .default('x', '') 16 | .argv 17 | ; 18 | 19 | var fs = require('fs'); 20 | var s = fs.createReadStream(argv.file); 21 | 22 | var lines = 0; 23 | s.on('data', function (buf) { 24 | lines += buf.toString().match(/\n/g).length; 25 | }); 26 | 27 | s.on('end', function () { 28 | console.log(lines.toString(argv.base)); 29 | }); 30 | -------------------------------------------------------------------------------- /node_modules/optimist/example/nonopt.js: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env node 2 | var argv = require('optimist').argv; 3 | console.log('(%d,%d)', argv.x, argv.y); 4 | console.log(argv._); 5 | -------------------------------------------------------------------------------- /node_modules/optimist/example/reflect.js: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env node 2 | console.dir(require('optimist').argv); 3 | -------------------------------------------------------------------------------- /node_modules/optimist/example/short.js: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env node 2 | var argv = require('optimist').argv; 3 | console.log('(%d,%d)', argv.x, argv.y); 4 | -------------------------------------------------------------------------------- /node_modules/optimist/example/string.js: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env node 2 | var argv = require('optimist') 3 | .string('x', 'y') 4 | .argv 5 | ; 6 | console.dir([ argv.x, argv.y ]); 7 | 8 | /* Turns off numeric coercion: 9 | ./node string.js -x 000123 -y 9876 10 | [ '000123', '9876' ] 11 | */ 12 | -------------------------------------------------------------------------------- /node_modules/optimist/example/usage-options.js: -------------------------------------------------------------------------------- 1 | var optimist = require('./../index'); 2 | 3 | var argv = optimist.usage('This is my awesome program', { 4 | 'about': { 5 | description: 'Provide some details about the author of this program', 6 | required: true, 7 | short: 'a', 8 | }, 9 | 'info': { 10 | description: 'Provide some information about the node.js agains!!!!!!', 11 | boolean: true, 12 | short: 'i' 13 | } 14 | }).argv; 15 | 16 | optimist.showHelp(); 17 | 18 | console.log('\n\nInspecting options'); 19 | console.dir(argv); -------------------------------------------------------------------------------- /node_modules/optimist/example/xup.js: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env node 2 | var argv = require('optimist').argv; 3 | 4 | if (argv.rif - 5 * argv.xup > 7.138) { 5 | console.log('Buy more riffiwobbles'); 6 | } 7 | else { 8 | console.log('Sell the xupptumblers'); 9 | } 10 | 11 | -------------------------------------------------------------------------------- /node_modules/optimist/test/_/argv.js: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env node 2 | console.log(JSON.stringify(process.argv)); 3 | -------------------------------------------------------------------------------- /node_modules/optimist/test/_/bin.js: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env node 2 | var argv = require('../../index').argv 3 | console.log(JSON.stringify(argv._)); 4 | -------------------------------------------------------------------------------- /node_modules/parseurl/.npmignore: -------------------------------------------------------------------------------- 1 | # Compiled source # 2 | ################### 3 | *.com 4 | *.class 5 | *.dll 6 | *.exe 7 | *.o 8 | *.so 9 | 10 | # Packages # 11 | ############ 12 | # it's better to unpack these files and commit the raw source 13 | # git has its own built in compression methods 14 | *.7z 15 | *.dmg 16 | *.gz 17 | *.iso 18 | *.jar 19 | *.rar 20 | *.tar 21 | *.zip 22 | 23 | # Logs and databases # 24 | ###################### 25 | *.log 26 | *.sql 27 | *.sqlite 28 | 29 | # OS generated files # 30 | ###################### 31 | .DS_Store* 32 | # Icon? 33 | ehthumbs.db 34 | Thumbs.db 35 | 36 | # Node.js # 37 | ########### 38 | lib-cov 39 | *.seed 40 | *.log 41 | *.csv 42 | *.dat 43 | *.out 44 | *.pid 45 | *.gz 46 | 47 | pids 48 | logs 49 | results 50 | 51 | node_modules 52 | npm-debug.log 53 | 54 | # Components # 55 | ############## 56 | 57 | /build 58 | /components 59 | /public -------------------------------------------------------------------------------- /node_modules/parseurl/README.md: -------------------------------------------------------------------------------- 1 | # parseurl 2 | 3 | Parse a URL with memoization. 4 | 5 | ## API 6 | 7 | ### var pathname = parseurl(req) 8 | 9 | `pathname` can then be passed to a router or something. 10 | 11 | ## LICENSE 12 | 13 | (The MIT License) 14 | 15 | Copyright (c) 2014 Jonathan Ong 16 | 17 | Permission is hereby granted, free of charge, to any person obtaining 18 | a copy of this software and associated documentation files (the 19 | 'Software'), to deal in the Software without restriction, including 20 | without limitation the rights to use, copy, modify, merge, publish, 21 | distribute, sublicense, and/or sell copies of the Software, and to 22 | permit persons to whom the Software is furnished to do so, subject to 23 | the following conditions: 24 | 25 | The above copyright notice and this permission notice shall be 26 | included in all copies or substantial portions of the Software. 27 | 28 | THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, 29 | EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 30 | MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 31 | IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 32 | CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 33 | TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 34 | SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -------------------------------------------------------------------------------- /node_modules/parseurl/index.js: -------------------------------------------------------------------------------- 1 | 2 | var parse = require('url').parse; 3 | 4 | /** 5 | * Parse the `req` url with memoization. 6 | * 7 | * @param {ServerRequest} req 8 | * @return {Object} 9 | * @api private 10 | */ 11 | 12 | module.exports = function parseUrl(req){ 13 | var parsed = req._parsedUrl; 14 | if (parsed && parsed.href == req.url) { 15 | return parsed; 16 | } else { 17 | parsed = parse(req.url); 18 | 19 | if (parsed.auth && !parsed.protocol && ~parsed.href.indexOf('//')) { 20 | // This parses pathnames, and a strange pathname like //r@e should work 21 | parsed = parse(req.url.replace(/@/g, '%40')); 22 | } 23 | 24 | return req._parsedUrl = parsed; 25 | } 26 | }; 27 | -------------------------------------------------------------------------------- /node_modules/path-to-regexp/.npmignore: -------------------------------------------------------------------------------- 1 | node_modules 2 | coverage 3 | -------------------------------------------------------------------------------- /node_modules/path-to-regexp/History.md: -------------------------------------------------------------------------------- 1 | 2 | 0.1.0 / 2014-03-06 3 | ================== 4 | 5 | * add options.end 6 | 7 | 0.0.2 / 2013-02-10 8 | ================== 9 | 10 | * Update to match current express 11 | * add .license property to component.json 12 | -------------------------------------------------------------------------------- /node_modules/path-to-regexp/Readme.md: -------------------------------------------------------------------------------- 1 | 2 | # Path-to-RegExp 3 | 4 | Turn an Express-style path string such as `/user/:name` into a regular expression. 5 | 6 | ## Usage 7 | 8 | ```javascript 9 | var pathToRegexp = require('path-to-regexp'); 10 | ``` 11 | ### pathToRegexp(path, keys, options) 12 | 13 | - **path** A string in the express format, an array of such strings, or a regular expression 14 | - **keys** An array to be populated with the keys present in the url. Once the function completes, this will be an array of strings. 15 | - **options** 16 | - **options.sensitive** Defaults to false, set this to true to make routes case sensitive 17 | - **options.strict** Defaults to false, set this to true to make the trailing slash matter. 18 | - **options.end** Defaults to true, set this to false to only match the prefix of the URL. 19 | 20 | ```javascript 21 | var keys = []; 22 | var exp = pathToRegexp('/foo/:bar', keys); 23 | //keys = ['bar'] 24 | //exp = /^\/foo\/(?:([^\/]+?))\/?$/i 25 | ``` 26 | 27 | ## Live Demo 28 | 29 | You can see a live demo of this library in use at [express-route-tester](http://forbeslindesay.github.com/express-route-tester/). 30 | 31 | ## License 32 | 33 | MIT -------------------------------------------------------------------------------- /node_modules/path-to-regexp/component.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "path-to-regexp", 3 | "description": "Express style path to RegExp utility", 4 | "version": "0.1.0", 5 | "keywords": [ 6 | "express", 7 | "regexp", 8 | "route", 9 | "routing" 10 | ], 11 | "scripts": [ 12 | "index.js" 13 | ], 14 | "license": "MIT" 15 | } 16 | -------------------------------------------------------------------------------- /node_modules/promise/.npmignore: -------------------------------------------------------------------------------- 1 | components 2 | node_modules 3 | test 4 | .gitignore 5 | .travis.yml 6 | component.json -------------------------------------------------------------------------------- /node_modules/qs/.gitmodules: -------------------------------------------------------------------------------- 1 | [submodule "support/expresso"] 2 | path = support/expresso 3 | url = git://github.com/visionmedia/expresso.git 4 | [submodule "support/should"] 5 | path = support/should 6 | url = git://github.com/visionmedia/should.js.git 7 | -------------------------------------------------------------------------------- /node_modules/qs/.npmignore: -------------------------------------------------------------------------------- 1 | test 2 | .travis.yml 3 | benchmark.js 4 | component.json 5 | examples.js 6 | History.md 7 | Makefile 8 | -------------------------------------------------------------------------------- /node_modules/range-parser/.npmignore: -------------------------------------------------------------------------------- 1 | test 2 | -------------------------------------------------------------------------------- /node_modules/range-parser/History.md: -------------------------------------------------------------------------------- 1 | 2 | 1.0.0 / 2013-12-11 3 | ================== 4 | 5 | * add repository to package.json 6 | * add MIT license 7 | 8 | 0.0.4 / 2012-06-17 9 | ================== 10 | 11 | * changed: ret -1 for unsatisfiable and -2 when invalid 12 | 13 | 0.0.3 / 2012-06-17 14 | ================== 15 | 16 | * fix last-byte-pos default to len - 1 17 | 18 | 0.0.2 / 2012-06-14 19 | ================== 20 | 21 | * add `.type` 22 | -------------------------------------------------------------------------------- /node_modules/range-parser/Makefile: -------------------------------------------------------------------------------- 1 | 2 | test: 3 | @./node_modules/.bin/mocha \ 4 | --reporter spec \ 5 | --require should 6 | 7 | .PHONY: test -------------------------------------------------------------------------------- /node_modules/range-parser/index.js: -------------------------------------------------------------------------------- 1 | 2 | /** 3 | * Parse "Range" header `str` relative to the given file `size`. 4 | * 5 | * @param {Number} size 6 | * @param {String} str 7 | * @return {Array} 8 | * @api public 9 | */ 10 | 11 | module.exports = function(size, str){ 12 | var valid = true; 13 | var i = str.indexOf('='); 14 | 15 | if (-1 == i) return -2; 16 | 17 | var arr = str.slice(i + 1).split(',').map(function(range){ 18 | var range = range.split('-') 19 | , start = parseInt(range[0], 10) 20 | , end = parseInt(range[1], 10); 21 | 22 | // -nnn 23 | if (isNaN(start)) { 24 | start = size - end; 25 | end = size - 1; 26 | // nnn- 27 | } else if (isNaN(end)) { 28 | end = size - 1; 29 | } 30 | 31 | // limit last-byte-pos to current length 32 | if (end > size - 1) end = size - 1; 33 | 34 | // invalid 35 | if (isNaN(start) 36 | || isNaN(end) 37 | || start > end 38 | || start < 0) valid = false; 39 | 40 | return { 41 | start: start, 42 | end: end 43 | }; 44 | }); 45 | 46 | arr.type = str.slice(0, i); 47 | 48 | return valid ? arr : -1; 49 | }; -------------------------------------------------------------------------------- /node_modules/raw-body/.npmignore: -------------------------------------------------------------------------------- 1 | coverage/ 2 | test/ 3 | .travis.yml 4 | -------------------------------------------------------------------------------- /node_modules/readdirp/.npmignore: -------------------------------------------------------------------------------- 1 | lib-cov 2 | *.seed 3 | *.log 4 | *.csv 5 | *.dat 6 | *.out 7 | *.pid 8 | *.gz 9 | 10 | pids 11 | logs 12 | results 13 | 14 | node_modules 15 | npm-debug.log -------------------------------------------------------------------------------- /node_modules/readdirp/.travis.yml: -------------------------------------------------------------------------------- 1 | language: node_js 2 | node_js: 3 | - 0.6 4 | - 0.8 5 | - 0.9 6 | -------------------------------------------------------------------------------- /node_modules/readdirp/LICENSE: -------------------------------------------------------------------------------- 1 | This software is released under the MIT license: 2 | 3 | Permission is hereby granted, free of charge, to any person obtaining a copy of 4 | this software and associated documentation files (the "Software"), to deal in 5 | the Software without restriction, including without limitation the rights to 6 | use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of 7 | the Software, and to permit persons to whom the Software is furnished to do so, 8 | subject to the following conditions: 9 | 10 | The above copyright notice and this permission notice shall be included in all 11 | copies or substantial portions of the Software. 12 | 13 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 14 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS 15 | FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR 16 | COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER 17 | IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN 18 | CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 19 | -------------------------------------------------------------------------------- /node_modules/readdirp/examples/Readme.md: -------------------------------------------------------------------------------- 1 | # readdirp examples 2 | 3 | ## How to run the examples 4 | 5 | Assuming you installed readdirp (`npm install readdirp`), you can do the following: 6 | 7 | 1. `npm explore readdirp` 8 | 2. `cd examples` 9 | 3. `npm install` 10 | 11 | At that point you can run the examples with node, i.e., `node grep`. 12 | 13 | ## stream api 14 | 15 | [stream-api.js](https://github.com/thlorenz/readdirp/blob/master/examples/stream-api.js) 16 | 17 | Demonstrates error and data handling by listening to events emitted from the readdirp stream. 18 | 19 | ## stream api pipe 20 | 21 | [stream-api-pipe.js](https://github.com/thlorenz/readdirp/blob/master/examples/stream-api-pipe.js) 22 | 23 | Demonstrates error handling by listening to events emitted from the readdirp stream and how to pipe the data stream into 24 | another destination stream. 25 | 26 | ## grep 27 | 28 | [grep.js](https://github.com/thlorenz/readdirp/blob/master/examples/grep.js) 29 | 30 | Very naive implementation of grep, for demonstration purposes only. 31 | 32 | ## using callback api 33 | 34 | [callback-api.js](https://github.com/thlorenz/readdirp/blob/master/examples/callback-api.js) 35 | 36 | Shows how to pass callbacks in order to handle errors and/or data. 37 | 38 | -------------------------------------------------------------------------------- /node_modules/readdirp/examples/callback-api.js: -------------------------------------------------------------------------------- 1 | var readdirp = require('..'); 2 | 3 | readdirp({ root: '.', fileFilter: '*.js' }, function (errors, res) { 4 | if (errors) { 5 | errors.forEach(function (err) { 6 | console.error('Error: ', err); 7 | }); 8 | } 9 | console.log('all javascript files', res); 10 | }); 11 | -------------------------------------------------------------------------------- /node_modules/readdirp/examples/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "readdirp-examples", 3 | "version": "0.0.0", 4 | "description": "Examples for readdirp.", 5 | "dependencies": { 6 | "tap-stream": "~0.1.0", 7 | "event-stream": "~3.0.7" 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /node_modules/readdirp/examples/stream-api-pipe.js: -------------------------------------------------------------------------------- 1 | var readdirp = require('..') 2 | , path = require('path') 3 | , es = require('event-stream'); 4 | 5 | // print out all JavaScript files along with their size 6 | readdirp({ root: path.join(__dirname), fileFilter: '*.js' }) 7 | .on('warn', function (err) { console.error('non-fatal error', err); }) 8 | .on('error', function (err) { console.error('fatal error', err); }) 9 | .pipe(es.mapSync(function (entry) { 10 | return { path: entry.path, size: entry.stat.size }; 11 | })) 12 | .pipe(es.stringify()) 13 | .pipe(process.stdout); 14 | -------------------------------------------------------------------------------- /node_modules/readdirp/examples/stream-api.js: -------------------------------------------------------------------------------- 1 | var readdirp = require('..') 2 | , path = require('path'); 3 | 4 | readdirp({ root: path.join(__dirname), fileFilter: '*.js' }) 5 | .on('warn', function (err) { 6 | console.error('something went wrong when processing an entry', err); 7 | }) 8 | .on('error', function (err) { 9 | console.error('something went fatally wrong and the stream was aborted', err); 10 | }) 11 | .on('data', function (entry) { 12 | console.log('%s is ready for processing', entry.path); 13 | // process entry here 14 | }); 15 | 16 | -------------------------------------------------------------------------------- /node_modules/readdirp/test/bed/root_dir1/root_dir1_file1.ext1: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Webschool-io/Politicos-brasileiros/d051caf7e870559e531b9beae66db7a9757d1c1f/node_modules/readdirp/test/bed/root_dir1/root_dir1_file1.ext1 -------------------------------------------------------------------------------- /node_modules/readdirp/test/bed/root_dir1/root_dir1_file2.ext2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Webschool-io/Politicos-brasileiros/d051caf7e870559e531b9beae66db7a9757d1c1f/node_modules/readdirp/test/bed/root_dir1/root_dir1_file2.ext2 -------------------------------------------------------------------------------- /node_modules/readdirp/test/bed/root_dir1/root_dir1_file3.ext3: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Webschool-io/Politicos-brasileiros/d051caf7e870559e531b9beae66db7a9757d1c1f/node_modules/readdirp/test/bed/root_dir1/root_dir1_file3.ext3 -------------------------------------------------------------------------------- /node_modules/readdirp/test/bed/root_dir1/root_dir1_subdir1/root1_dir1_subdir1_file1.ext1: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Webschool-io/Politicos-brasileiros/d051caf7e870559e531b9beae66db7a9757d1c1f/node_modules/readdirp/test/bed/root_dir1/root_dir1_subdir1/root1_dir1_subdir1_file1.ext1 -------------------------------------------------------------------------------- /node_modules/readdirp/test/bed/root_dir2/root_dir2_file1.ext1: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Webschool-io/Politicos-brasileiros/d051caf7e870559e531b9beae66db7a9757d1c1f/node_modules/readdirp/test/bed/root_dir2/root_dir2_file1.ext1 -------------------------------------------------------------------------------- /node_modules/readdirp/test/bed/root_dir2/root_dir2_file2.ext2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Webschool-io/Politicos-brasileiros/d051caf7e870559e531b9beae66db7a9757d1c1f/node_modules/readdirp/test/bed/root_dir2/root_dir2_file2.ext2 -------------------------------------------------------------------------------- /node_modules/readdirp/test/bed/root_file1.ext1: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Webschool-io/Politicos-brasileiros/d051caf7e870559e531b9beae66db7a9757d1c1f/node_modules/readdirp/test/bed/root_file1.ext1 -------------------------------------------------------------------------------- /node_modules/readdirp/test/bed/root_file2.ext2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Webschool-io/Politicos-brasileiros/d051caf7e870559e531b9beae66db7a9757d1c1f/node_modules/readdirp/test/bed/root_file2.ext2 -------------------------------------------------------------------------------- /node_modules/readdirp/test/bed/root_file3.ext3: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Webschool-io/Politicos-brasileiros/d051caf7e870559e531b9beae66db7a9757d1c1f/node_modules/readdirp/test/bed/root_file3.ext3 -------------------------------------------------------------------------------- /node_modules/send/.npmignore: -------------------------------------------------------------------------------- 1 | test 2 | examples 3 | *.sock 4 | -------------------------------------------------------------------------------- /node_modules/send/index.js: -------------------------------------------------------------------------------- 1 | 2 | module.exports = require('./lib/send'); -------------------------------------------------------------------------------- /node_modules/send/lib/utils.js: -------------------------------------------------------------------------------- 1 | 2 | /** 3 | * Module dependencies. 4 | */ 5 | 6 | var crc32 = require('buffer-crc32').unsigned; 7 | 8 | /** 9 | * Return a weak ETag from the given `path` and `stat`. 10 | * 11 | * @param {String} path 12 | * @param {Object} stat 13 | * @return {String} 14 | * @api private 15 | */ 16 | 17 | exports.etag = function etag(path, stat) { 18 | var tag = String(stat.mtime.getTime()) + ':' + String(stat.size) + ':' + path; 19 | return 'W/"' + crc32(tag) + '"'; 20 | }; 21 | 22 | /** 23 | * decodeURIComponent. 24 | * 25 | * Allows V8 to only deoptimize this fn instead of all 26 | * of send(). 27 | * 28 | * @param {String} path 29 | * @api private 30 | */ 31 | 32 | exports.decode = function(path){ 33 | try { 34 | return decodeURIComponent(path); 35 | } catch (err) { 36 | return -1; 37 | } 38 | }; 39 | 40 | /** 41 | * Escape the given string of `html`. 42 | * 43 | * @param {String} html 44 | * @return {String} 45 | * @api private 46 | */ 47 | 48 | exports.escape = function(html){ 49 | return String(html) 50 | .replace(/&(?!\w+;)/g, '&') 51 | .replace(//g, '>') 53 | .replace(/"/g, '"'); 54 | }; -------------------------------------------------------------------------------- /node_modules/serve-static/.npmignore: -------------------------------------------------------------------------------- 1 | test 2 | -------------------------------------------------------------------------------- /node_modules/serve-static/.travis.yml: -------------------------------------------------------------------------------- 1 | language: node_js 2 | node_js: 3 | - "0.8" 4 | - "0.10" 5 | - "0.11" 6 | -------------------------------------------------------------------------------- /node_modules/serve-static/History.md: -------------------------------------------------------------------------------- 1 | 1.1.0 / 2014-04-24 2 | ================== 3 | 4 | * Accept options directly to `send` module 5 | * deps: send@0.3.0 6 | 7 | 1.0.4 / 2014-04-07 8 | ================== 9 | 10 | * Resolve relative paths at middleware setup 11 | * Use parseurl to parse the URL from request 12 | 13 | 1.0.3 / 2014-03-20 14 | ================== 15 | 16 | * Do not rely on connect-like environments 17 | 18 | 1.0.2 / 2014-03-06 19 | ================== 20 | 21 | * deps: send@0.2.0 22 | 23 | 1.0.1 / 2014-03-05 24 | ================== 25 | 26 | * Add mime export for back-compat 27 | 28 | 1.0.0 / 2014-03-05 29 | ================== 30 | 31 | * Genesis from `connect` 32 | -------------------------------------------------------------------------------- /node_modules/serve-static/LICENSE: -------------------------------------------------------------------------------- 1 | (The MIT License) 2 | 3 | Copyright (c) 2010 Sencha Inc. 4 | Copyright (c) 2011 LearnBoost 5 | Copyright (c) 2011 TJ Holowaychuk 6 | Copyright (c) 2014 Douglas Christopher Wilson 7 | 8 | Permission is hereby granted, free of charge, to any person obtaining 9 | a copy of this software and associated documentation files (the 10 | 'Software'), to deal in the Software without restriction, including 11 | without limitation the rights to use, copy, modify, merge, publish, 12 | distribute, sublicense, and/or sell copies of the Software, and to 13 | permit persons to whom the Software is furnished to do so, subject to 14 | the following conditions: 15 | 16 | The above copyright notice and this permission notice shall be 17 | included in all copies or substantial portions of the Software. 18 | 19 | THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, 20 | EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 21 | MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 22 | IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 23 | CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 24 | TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 25 | SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 26 | -------------------------------------------------------------------------------- /node_modules/source-map/.npmignore: -------------------------------------------------------------------------------- 1 | dist/* 2 | node_modules/* 3 | -------------------------------------------------------------------------------- /node_modules/source-map/.tern-port: -------------------------------------------------------------------------------- 1 | 55494 -------------------------------------------------------------------------------- /node_modules/source-map/.travis.yml: -------------------------------------------------------------------------------- 1 | language: node_js 2 | node_js: 3 | - 0.8 4 | - "0.10" -------------------------------------------------------------------------------- /node_modules/source-map/build/prefix-source-map.jsm: -------------------------------------------------------------------------------- 1 | /* -*- Mode: js; js-indent-level: 2; -*- */ 2 | /* 3 | * Copyright 2011 Mozilla Foundation and contributors 4 | * Licensed under the New BSD license. See LICENSE or: 5 | * http://opensource.org/licenses/BSD-3-Clause 6 | */ 7 | 8 | /* 9 | * WARNING! 10 | * 11 | * Do not edit this file directly, it is built from the sources at 12 | * https://github.com/mozilla/source-map/ 13 | */ 14 | 15 | /////////////////////////////////////////////////////////////////////////////// 16 | 17 | 18 | this.EXPORTED_SYMBOLS = [ "SourceMapConsumer", "SourceMapGenerator", "SourceNode" ]; 19 | 20 | Components.utils.import('resource://gre/modules/devtools/Require.jsm'); 21 | -------------------------------------------------------------------------------- /node_modules/source-map/build/prefix-utils.jsm: -------------------------------------------------------------------------------- 1 | /* -*- Mode: js; js-indent-level: 2; -*- */ 2 | /* 3 | * Copyright 2011 Mozilla Foundation and contributors 4 | * Licensed under the New BSD license. See LICENSE or: 5 | * http://opensource.org/licenses/BSD-3-Clause 6 | */ 7 | 8 | /* 9 | * WARNING! 10 | * 11 | * Do not edit this file directly, it is built from the sources at 12 | * https://github.com/mozilla/source-map/ 13 | */ 14 | 15 | Components.utils.import('resource://gre/modules/devtools/Require.jsm'); 16 | Components.utils.import('resource://gre/modules/devtools/SourceMap.jsm'); 17 | 18 | this.EXPORTED_SYMBOLS = [ "define", "runSourceMapTests" ]; 19 | -------------------------------------------------------------------------------- /node_modules/source-map/build/suffix-browser.js: -------------------------------------------------------------------------------- 1 | /* -*- Mode: js; js-indent-level: 2; -*- */ 2 | /////////////////////////////////////////////////////////////////////////////// 3 | 4 | this.sourceMap = { 5 | SourceMapConsumer: require('source-map/source-map-consumer').SourceMapConsumer, 6 | SourceMapGenerator: require('source-map/source-map-generator').SourceMapGenerator, 7 | SourceNode: require('source-map/source-node').SourceNode 8 | }; 9 | -------------------------------------------------------------------------------- /node_modules/source-map/build/suffix-source-map.jsm: -------------------------------------------------------------------------------- 1 | /* -*- Mode: js; js-indent-level: 2; -*- */ 2 | /////////////////////////////////////////////////////////////////////////////// 3 | 4 | this.SourceMapConsumer = require('source-map/source-map-consumer').SourceMapConsumer; 5 | this.SourceMapGenerator = require('source-map/source-map-generator').SourceMapGenerator; 6 | this.SourceNode = require('source-map/source-node').SourceNode; 7 | -------------------------------------------------------------------------------- /node_modules/source-map/build/suffix-utils.jsm: -------------------------------------------------------------------------------- 1 | /* -*- Mode: js; js-indent-level: 2; -*- */ 2 | /* 3 | * Copyright 2011 Mozilla Foundation and contributors 4 | * Licensed under the New BSD license. See LICENSE or: 5 | * http://opensource.org/licenses/BSD-3-Clause 6 | */ 7 | function runSourceMapTests(modName, do_throw) { 8 | let mod = require(modName); 9 | let assert = require('test/source-map/assert'); 10 | let util = require('test/source-map/util'); 11 | 12 | assert.init(do_throw); 13 | 14 | for (let k in mod) { 15 | if (/^test/.test(k)) { 16 | mod[k](assert, util); 17 | } 18 | } 19 | 20 | } 21 | this.runSourceMapTests = runSourceMapTests; 22 | -------------------------------------------------------------------------------- /node_modules/source-map/build/test-prefix.js: -------------------------------------------------------------------------------- 1 | /* 2 | * WARNING! 3 | * 4 | * Do not edit this file directly, it is built from the sources at 5 | * https://github.com/mozilla/source-map/ 6 | */ 7 | 8 | Components.utils.import('resource://test/Utils.jsm'); 9 | -------------------------------------------------------------------------------- /node_modules/source-map/build/test-suffix.js: -------------------------------------------------------------------------------- 1 | function run_test() { 2 | runSourceMapTests('{THIS_MODULE}', do_throw); 3 | } 4 | -------------------------------------------------------------------------------- /node_modules/source-map/lib/source-map.js: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2009-2011 Mozilla Foundation and contributors 3 | * Licensed under the New BSD license. See LICENSE.txt or: 4 | * http://opensource.org/licenses/BSD-3-Clause 5 | */ 6 | exports.SourceMapGenerator = require('./source-map/source-map-generator').SourceMapGenerator; 7 | exports.SourceMapConsumer = require('./source-map/source-map-consumer').SourceMapConsumer; 8 | exports.SourceNode = require('./source-map/source-node').SourceNode; 9 | -------------------------------------------------------------------------------- /node_modules/source-map/lib/source-map/base64.js: -------------------------------------------------------------------------------- 1 | /* -*- Mode: js; js-indent-level: 2; -*- */ 2 | /* 3 | * Copyright 2011 Mozilla Foundation and contributors 4 | * Licensed under the New BSD license. See LICENSE or: 5 | * http://opensource.org/licenses/BSD-3-Clause 6 | */ 7 | if (typeof define !== 'function') { 8 | var define = require('amdefine')(module, require); 9 | } 10 | define(function (require, exports, module) { 11 | 12 | var charToIntMap = {}; 13 | var intToCharMap = {}; 14 | 15 | 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/' 16 | .split('') 17 | .forEach(function (ch, index) { 18 | charToIntMap[ch] = index; 19 | intToCharMap[index] = ch; 20 | }); 21 | 22 | /** 23 | * Encode an integer in the range of 0 to 63 to a single base 64 digit. 24 | */ 25 | exports.encode = function base64_encode(aNumber) { 26 | if (aNumber in intToCharMap) { 27 | return intToCharMap[aNumber]; 28 | } 29 | throw new TypeError("Must be between 0 and 63: " + aNumber); 30 | }; 31 | 32 | /** 33 | * Decode a single base 64 digit to an integer. 34 | */ 35 | exports.decode = function base64_decode(aChar) { 36 | if (aChar in charToIntMap) { 37 | return charToIntMap[aChar]; 38 | } 39 | throw new TypeError("Not a valid base 64 digit: " + aChar); 40 | }; 41 | 42 | }); 43 | -------------------------------------------------------------------------------- /node_modules/source-map/test/source-map/test-api.js: -------------------------------------------------------------------------------- 1 | /* -*- Mode: js; js-indent-level: 2; -*- */ 2 | /* 3 | * Copyright 2012 Mozilla Foundation and contributors 4 | * Licensed under the New BSD license. See LICENSE or: 5 | * http://opensource.org/licenses/BSD-3-Clause 6 | */ 7 | if (typeof define !== 'function') { 8 | var define = require('amdefine')(module, require); 9 | } 10 | define(function (require, exports, module) { 11 | 12 | var sourceMap; 13 | try { 14 | sourceMap = require('../../lib/source-map'); 15 | } catch (e) { 16 | sourceMap = {}; 17 | Components.utils.import('resource:///modules/devtools/SourceMap.jsm', sourceMap); 18 | } 19 | 20 | exports['test that the api is properly exposed in the top level'] = function (assert, util) { 21 | assert.equal(typeof sourceMap.SourceMapGenerator, "function"); 22 | assert.equal(typeof sourceMap.SourceMapConsumer, "function"); 23 | assert.equal(typeof sourceMap.SourceNode, "function"); 24 | }; 25 | 26 | }); 27 | -------------------------------------------------------------------------------- /node_modules/source-map/test/source-map/test-base64-vlq.js: -------------------------------------------------------------------------------- 1 | /* -*- Mode: js; js-indent-level: 2; -*- */ 2 | /* 3 | * Copyright 2011 Mozilla Foundation and contributors 4 | * Licensed under the New BSD license. See LICENSE or: 5 | * http://opensource.org/licenses/BSD-3-Clause 6 | */ 7 | if (typeof define !== 'function') { 8 | var define = require('amdefine')(module, require); 9 | } 10 | define(function (require, exports, module) { 11 | 12 | var base64VLQ = require('../../lib/source-map/base64-vlq'); 13 | 14 | exports['test normal encoding and decoding'] = function (assert, util) { 15 | var result; 16 | for (var i = -255; i < 256; i++) { 17 | result = base64VLQ.decode(base64VLQ.encode(i)); 18 | assert.ok(result); 19 | assert.equal(result.value, i); 20 | assert.equal(result.rest, ""); 21 | } 22 | }; 23 | 24 | }); 25 | -------------------------------------------------------------------------------- /node_modules/source-map/test/source-map/test-base64.js: -------------------------------------------------------------------------------- 1 | /* -*- Mode: js; js-indent-level: 2; -*- */ 2 | /* 3 | * Copyright 2011 Mozilla Foundation and contributors 4 | * Licensed under the New BSD license. See LICENSE or: 5 | * http://opensource.org/licenses/BSD-3-Clause 6 | */ 7 | if (typeof define !== 'function') { 8 | var define = require('amdefine')(module, require); 9 | } 10 | define(function (require, exports, module) { 11 | 12 | var base64 = require('../../lib/source-map/base64'); 13 | 14 | exports['test out of range encoding'] = function (assert, util) { 15 | assert.throws(function () { 16 | base64.encode(-1); 17 | }); 18 | assert.throws(function () { 19 | base64.encode(64); 20 | }); 21 | }; 22 | 23 | exports['test out of range decoding'] = function (assert, util) { 24 | assert.throws(function () { 25 | base64.decode('='); 26 | }); 27 | }; 28 | 29 | exports['test normal encoding and decoding'] = function (assert, util) { 30 | for (var i = 0; i < 64; i++) { 31 | assert.equal(base64.decode(base64.encode(i)), i); 32 | } 33 | }; 34 | 35 | }); 36 | -------------------------------------------------------------------------------- /node_modules/static-favicon/.npmignore: -------------------------------------------------------------------------------- 1 | node_modules 2 | -------------------------------------------------------------------------------- /node_modules/static-favicon/.travis.yml: -------------------------------------------------------------------------------- 1 | language: node_js 2 | node_js: 3 | - "0.10" 4 | - "0.11" 5 | matrix: 6 | allow_failures: 7 | - node_js: "0.11" 8 | fast_finish: true 9 | -------------------------------------------------------------------------------- /node_modules/static-favicon/LICENSE: -------------------------------------------------------------------------------- 1 | (The MIT License) 2 | 3 | Copyright (c) 2010 Sencha Inc. 4 | Copyright (c) 2011 LearnBoost 5 | Copyright (c) 2011 TJ Holowaychuk 6 | 7 | Permission is hereby granted, free of charge, to any person obtaining 8 | a copy of this software and associated documentation files (the 9 | 'Software'), to deal in the Software without restriction, including 10 | without limitation the rights to use, copy, modify, merge, publish, 11 | distribute, sublicense, and/or sell copies of the Software, and to 12 | permit persons to whom the Software is furnished to do so, subject to 13 | the following conditions: 14 | 15 | The above copyright notice and this permission notice shall be 16 | included in all copies or substantial portions of the Software. 17 | 18 | THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, 19 | EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 20 | MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 21 | IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 22 | CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 23 | TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 24 | SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -------------------------------------------------------------------------------- /node_modules/static-favicon/README.md: -------------------------------------------------------------------------------- 1 | # static-favicon 2 | 3 | express/connect middleware to serves a favicon. 4 | 5 | ```js 6 | app.use(favicon(__dirname + '/public/favicon.ico')); 7 | ``` 8 | 9 | Typically this middleware will come very early in your stack (maybe even first) to avoid processing any other middleware if we already know the request is for favicon.ico 10 | 11 | ## api 12 | 13 | ### favicon(path, options) 14 | 15 | Create new middleware to serve a favicon from the given `path` to a favicon file. 16 | 17 | **options** 18 | 19 | - `maxAge` cache-control max-age directive, defaulting to 1 day 20 | -------------------------------------------------------------------------------- /node_modules/static-favicon/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Webschool-io/Politicos-brasileiros/d051caf7e870559e531b9beae66db7a9757d1c1f/node_modules/static-favicon/favicon.ico -------------------------------------------------------------------------------- /node_modules/string_decoder/.npmignore: -------------------------------------------------------------------------------- 1 | build 2 | test 3 | -------------------------------------------------------------------------------- /node_modules/string_decoder/LICENSE: -------------------------------------------------------------------------------- 1 | Copyright Joyent, Inc. and other Node contributors. 2 | 3 | Permission is hereby granted, free of charge, to any person obtaining a 4 | copy of this software and associated documentation files (the 5 | "Software"), to deal in the Software without restriction, including 6 | without limitation the rights to use, copy, modify, merge, publish, 7 | distribute, sublicense, and/or sell copies of the Software, and to permit 8 | persons to whom the Software is furnished to do so, subject to the 9 | following conditions: 10 | 11 | The above copyright notice and this permission notice shall be included 12 | in all copies or substantial portions of the Software. 13 | 14 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 15 | OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 16 | MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN 17 | NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, 18 | DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR 19 | OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE 20 | USE OR OTHER DEALINGS IN THE SOFTWARE. 21 | -------------------------------------------------------------------------------- /node_modules/string_decoder/README.md: -------------------------------------------------------------------------------- 1 | **string_decoder.js** (`require('string_decoder')`) from Node.js core 2 | 3 | Copyright Joyent, Inc. and other Node contributors. See LICENCE file for details. 4 | 5 | Version numbers match the versions found in Node core, e.g. 0.10.24 matches Node 0.10.24, likewise 0.11.10 matches Node 0.11.10. **Prefer the stable version over the unstable.** 6 | 7 | The *build/* directory contains a build script that will scrape the source from the [joyent/node](https://github.com/joyent/node) repo given a specific Node version. -------------------------------------------------------------------------------- /node_modules/transformers/.npmignore: -------------------------------------------------------------------------------- 1 | test/ 2 | .travis.yml -------------------------------------------------------------------------------- /node_modules/transformers/node_modules/.bin/uglifyjs: -------------------------------------------------------------------------------- 1 | ../uglify-js/bin/uglifyjs -------------------------------------------------------------------------------- /node_modules/transformers/node_modules/uglify-js/.npmignore: -------------------------------------------------------------------------------- 1 | tmp/ 2 | node_modules/ 3 | -------------------------------------------------------------------------------- /node_modules/transformers/node_modules/uglify-js/test/compress/arrays.js: -------------------------------------------------------------------------------- 1 | holes_and_undefined: { 2 | input: { 3 | x = [1, 2, undefined]; 4 | y = [1, , 2, ]; 5 | z = [1, undefined, 3]; 6 | } 7 | expect: { 8 | x=[1,2,void 0]; 9 | y=[1,,2]; 10 | z=[1,void 0,3]; 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /node_modules/transformers/node_modules/uglify-js/test/compress/blocks.js: -------------------------------------------------------------------------------- 1 | remove_blocks: { 2 | input: { 3 | {;} 4 | foo(); 5 | {}; 6 | { 7 | {}; 8 | }; 9 | bar(); 10 | {} 11 | } 12 | expect: { 13 | foo(); 14 | bar(); 15 | } 16 | } 17 | 18 | keep_some_blocks: { 19 | input: { 20 | // 1. 21 | if (foo) { 22 | {{{}}} 23 | if (bar) { baz(); } 24 | {{}} 25 | } else { 26 | stuff(); 27 | } 28 | 29 | // 2. 30 | if (foo) { 31 | for (var i = 0; i < 5; ++i) 32 | if (bar) baz(); 33 | } else { 34 | stuff(); 35 | } 36 | } 37 | expect: { 38 | // 1. 39 | if (foo) { 40 | if (bar) baz(); 41 | } else stuff(); 42 | 43 | // 2. 44 | if (foo) { 45 | for (var i = 0; i < 5; ++i) 46 | if (bar) baz(); 47 | } else stuff(); 48 | } 49 | } 50 | -------------------------------------------------------------------------------- /node_modules/transformers/node_modules/uglify-js/test/compress/debugger.js: -------------------------------------------------------------------------------- 1 | keep_debugger: { 2 | options = { 3 | drop_debugger: false 4 | }; 5 | input: { 6 | debugger; 7 | } 8 | expect: { 9 | debugger; 10 | } 11 | } 12 | 13 | drop_debugger: { 14 | options = { 15 | drop_debugger: true 16 | }; 17 | input: { 18 | debugger; 19 | if (foo) debugger; 20 | } 21 | expect: { 22 | if (foo); 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /node_modules/transformers/node_modules/uglify-js/test/compress/issue-105.js: -------------------------------------------------------------------------------- 1 | typeof_eq_undefined: { 2 | options = { 3 | comparisons: true, 4 | unsafe: false 5 | }; 6 | input: { a = typeof b.c != "undefined" } 7 | expect: { a = "undefined" != typeof b.c } 8 | } 9 | 10 | typeof_eq_undefined_unsafe: { 11 | options = { 12 | comparisons: true, 13 | unsafe: true 14 | }; 15 | input: { a = typeof b.c != "undefined" } 16 | expect: { a = b.c !== void 0 } 17 | } 18 | -------------------------------------------------------------------------------- /node_modules/transformers/node_modules/uglify-js/test/compress/issue-12.js: -------------------------------------------------------------------------------- 1 | keep_name_of_getter: { 2 | options = { unused: true }; 3 | input: { a = { get foo () {} } } 4 | expect: { a = { get foo () {} } } 5 | } 6 | 7 | keep_name_of_setter: { 8 | options = { unused: true }; 9 | input: { a = { set foo () {} } } 10 | expect: { a = { set foo () {} } } 11 | } 12 | -------------------------------------------------------------------------------- /node_modules/transformers/node_modules/uglify-js/test/compress/issue-22.js: -------------------------------------------------------------------------------- 1 | return_with_no_value_in_if_body: { 2 | options = { conditionals: true }; 3 | input: { 4 | function foo(bar) { 5 | if (bar) { 6 | return; 7 | } else { 8 | return 1; 9 | } 10 | } 11 | } 12 | expect: { 13 | function foo (bar) { 14 | return bar ? void 0 : 1; 15 | } 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /node_modules/transformers/node_modules/uglify-js/test/compress/issue-44.js: -------------------------------------------------------------------------------- 1 | issue_44_valid_ast_1: { 2 | options = { unused: true }; 3 | input: { 4 | function a(b) { 5 | for (var i = 0, e = b.qoo(); ; i++) {} 6 | } 7 | } 8 | expect: { 9 | function a(b) { 10 | var i = 0; 11 | for (b.qoo(); ; i++); 12 | } 13 | } 14 | } 15 | 16 | issue_44_valid_ast_2: { 17 | options = { unused: true }; 18 | input: { 19 | function a(b) { 20 | if (foo) for (var i = 0, e = b.qoo(); ; i++) {} 21 | } 22 | } 23 | expect: { 24 | function a(b) { 25 | if (foo) { 26 | var i = 0; 27 | for (b.qoo(); ; i++); 28 | } 29 | } 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /node_modules/transformers/node_modules/uglify-js/test/compress/issue-59.js: -------------------------------------------------------------------------------- 1 | keep_continue: { 2 | options = { 3 | dead_code: true, 4 | evaluate: true 5 | }; 6 | input: { 7 | while (a) { 8 | if (b) { 9 | switch (true) { 10 | case c(): 11 | d(); 12 | } 13 | continue; 14 | } 15 | f(); 16 | } 17 | } 18 | expect: { 19 | while (a) { 20 | if (b) { 21 | switch (true) { 22 | case c(): 23 | d(); 24 | } 25 | continue; 26 | } 27 | f(); 28 | } 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /node_modules/transformers/node_modules/uglify-js/test/compress/properties.js: -------------------------------------------------------------------------------- 1 | keep_properties: { 2 | options = { 3 | properties: false 4 | }; 5 | input: { 6 | a["foo"] = "bar"; 7 | } 8 | expect: { 9 | a["foo"] = "bar"; 10 | } 11 | } 12 | 13 | dot_properties: { 14 | options = { 15 | properties: true 16 | }; 17 | input: { 18 | a["foo"] = "bar"; 19 | a["if"] = "if"; 20 | } 21 | expect: { 22 | a.foo = "bar"; 23 | a["if"] = "if"; 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /node_modules/type-is/.npmignore: -------------------------------------------------------------------------------- 1 | test.js -------------------------------------------------------------------------------- /node_modules/type-is/.travis.yml: -------------------------------------------------------------------------------- 1 | node_js: 2 | - "0.10" 3 | - "0.11" 4 | language: node_js -------------------------------------------------------------------------------- /node_modules/type-is/HISTORY.md: -------------------------------------------------------------------------------- 1 | 2 | 1.1.0 / 2014-04-12 3 | ================== 4 | 5 | * add non-array values support 6 | * expose internal utilities: 7 | 8 | - `.is()` 9 | - `.hasBody()` 10 | - `.normalize()` 11 | - `.match()` 12 | 13 | 1.0.1 / 2014-03-30 14 | ================== 15 | 16 | * add `multipart` as a shorthand 17 | -------------------------------------------------------------------------------- /node_modules/uglify-js/LICENSE: -------------------------------------------------------------------------------- 1 | UglifyJS is released under the BSD license: 2 | 3 | Copyright 2012-2013 (c) Mihai Bazon 4 | 5 | Redistribution and use in source and binary forms, with or without 6 | modification, are permitted provided that the following conditions 7 | are met: 8 | 9 | * Redistributions of source code must retain the above 10 | copyright notice, this list of conditions and the following 11 | disclaimer. 12 | 13 | * Redistributions in binary form must reproduce the above 14 | copyright notice, this list of conditions and the following 15 | disclaimer in the documentation and/or other materials 16 | provided with the distribution. 17 | 18 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDER “AS IS” AND ANY 19 | EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 20 | IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 21 | PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER BE 22 | LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, 23 | OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, 24 | PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR 25 | PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 26 | THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR 27 | TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF 28 | THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 29 | SUCH DAMAGE. 30 | -------------------------------------------------------------------------------- /node_modules/uglify-to-browserify/.npmignore: -------------------------------------------------------------------------------- 1 | lib-cov 2 | *.seed 3 | *.log 4 | *.csv 5 | *.dat 6 | *.out 7 | *.pid 8 | *.gz 9 | pids 10 | logs 11 | results 12 | npm-debug.log 13 | node_modules 14 | /test/output.js 15 | -------------------------------------------------------------------------------- /node_modules/uglify-to-browserify/.travis.yml: -------------------------------------------------------------------------------- 1 | language: node_js 2 | node_js: 3 | - "0.10" -------------------------------------------------------------------------------- /node_modules/uglify-to-browserify/LICENSE: -------------------------------------------------------------------------------- 1 | Copyright (c) 2013 Forbes Lindesay 2 | 3 | Permission is hereby granted, free of charge, to any person obtaining a copy 4 | of this software and associated documentation files (the "Software"), to deal 5 | in the Software without restriction, including without limitation the rights 6 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 7 | copies of the Software, and to permit persons to whom the Software is 8 | furnished to do so, subject to the following conditions: 9 | 10 | The above copyright notice and this permission notice shall be included in 11 | all copies or substantial portions of the Software. 12 | 13 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 14 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 15 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 16 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 17 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 18 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 19 | THE SOFTWARE. -------------------------------------------------------------------------------- /node_modules/uglify-to-browserify/README.md: -------------------------------------------------------------------------------- 1 | # uglify-to-browserify 2 | 3 | A transform to make UglifyJS work in browserify. 4 | 5 | [![Build Status](https://travis-ci.org/ForbesLindesay/uglify-to-browserify.png?branch=master)](https://travis-ci.org/ForbesLindesay/uglify-to-browserify) 6 | [![Dependency Status](https://gemnasium.com/ForbesLindesay/uglify-to-browserify.png)](https://gemnasium.com/ForbesLindesay/uglify-to-browserify) 7 | [![NPM version](https://badge.fury.io/js/uglify-to-browserify.png)](http://badge.fury.io/js/uglify-to-browserify) 8 | 9 | ## Installation 10 | 11 | npm install uglify-to-browserify 12 | 13 | ## License 14 | 15 | MIT -------------------------------------------------------------------------------- /node_modules/uglify-to-browserify/test/index.js: -------------------------------------------------------------------------------- 1 | var fs = require('fs') 2 | var br = require('../') 3 | var test = fs.readFileSync(require.resolve('uglify-js/test/run-tests.js'), 'utf8') 4 | .replace(/^#.*\n/, '') 5 | 6 | var transform = br(require.resolve('uglify-js')) 7 | transform.pipe(fs.createWriteStream(__dirname + '/output.js')) 8 | .on('close', function () { 9 | Function('module,require', test)({ 10 | filename: require.resolve('uglify-js/test/run-tests.js') 11 | }, 12 | function (name) { 13 | if (name === '../tools/node') { 14 | return require('./output.js') 15 | } else if (/^[a-z]+$/.test(name)) { 16 | return require(name) 17 | } else { 18 | throw new Error('I didn\'t expect you to require ' + name) 19 | } 20 | }) 21 | }) 22 | transform.end(fs.readFileSync(require.resolve('uglify-js'), 'utf8')) -------------------------------------------------------------------------------- /node_modules/utils-merge/.travis.yml: -------------------------------------------------------------------------------- 1 | language: "node_js" 2 | node_js: 3 | - "0.4" 4 | - "0.6" 5 | - "0.8" 6 | - "0.10" 7 | -------------------------------------------------------------------------------- /node_modules/utils-merge/LICENSE: -------------------------------------------------------------------------------- 1 | (The MIT License) 2 | 3 | Copyright (c) 2013 Jared Hanson 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy of 6 | this software and associated documentation files (the "Software"), to deal in 7 | the Software without restriction, including without limitation the rights to 8 | use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of 9 | the Software, and to permit persons to whom the Software is furnished to do so, 10 | subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS 17 | FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR 18 | COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER 19 | IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN 20 | CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 21 | -------------------------------------------------------------------------------- /node_modules/utils-merge/README.md: -------------------------------------------------------------------------------- 1 | # utils-merge 2 | 3 | Merges the properties from a source object into a destination object. 4 | 5 | ## Install 6 | 7 | $ npm install utils-merge 8 | 9 | ## Usage 10 | 11 | ```javascript 12 | var a = { foo: 'bar' } 13 | , b = { bar: 'baz' }; 14 | 15 | merge(a, b); 16 | // => { foo: 'bar', bar: 'baz' } 17 | ``` 18 | 19 | ## Tests 20 | 21 | $ npm install 22 | $ npm test 23 | 24 | [![Build Status](https://secure.travis-ci.org/jaredhanson/utils-merge.png)](http://travis-ci.org/jaredhanson/utils-merge) 25 | 26 | ## Credits 27 | 28 | - [Jared Hanson](http://github.com/jaredhanson) 29 | 30 | ## License 31 | 32 | [The MIT License](http://opensource.org/licenses/MIT) 33 | 34 | Copyright (c) 2013 Jared Hanson <[http://jaredhanson.net/](http://jaredhanson.net/)> 35 | -------------------------------------------------------------------------------- /node_modules/utils-merge/index.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Merge object b with object a. 3 | * 4 | * var a = { foo: 'bar' } 5 | * , b = { bar: 'baz' }; 6 | * 7 | * merge(a, b); 8 | * // => { foo: 'bar', bar: 'baz' } 9 | * 10 | * @param {Object} a 11 | * @param {Object} b 12 | * @return {Object} 13 | * @api public 14 | */ 15 | 16 | exports = module.exports = function(a, b){ 17 | if (a && b) { 18 | for (var key in b) { 19 | a[key] = b[key]; 20 | } 21 | } 22 | return a; 23 | }; 24 | -------------------------------------------------------------------------------- /node_modules/window-size/LICENSE-MIT: -------------------------------------------------------------------------------- 1 | Copyright (c) 2014 Jon Schlinkert 2 | 3 | Permission is hereby granted, free of charge, to any person 4 | obtaining a copy of this software and associated documentation 5 | files (the "Software"), to deal in the Software without 6 | restriction, including without limitation the rights to use, 7 | copy, modify, merge, publish, distribute, sublicense, and/or sell 8 | copies of the Software, and to permit persons to whom the 9 | Software is furnished to do so, subject to the following 10 | conditions: 11 | 12 | The above copyright notice and this permission notice shall be 13 | included in all copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 16 | EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES 17 | OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 18 | NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT 19 | HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, 20 | WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 21 | FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 22 | OTHER DEALINGS IN THE SOFTWARE. 23 | -------------------------------------------------------------------------------- /node_modules/window-size/README.md: -------------------------------------------------------------------------------- 1 | # window-size [![NPM version](https://badge.fury.io/js/window-size.png)](http://badge.fury.io/js/window-size) 2 | 3 | > Reliable way to to get the height and width of the terminal/console in a node.js environment. 4 | 5 | ## Install 6 | 7 | ### [npm](npmjs.org) 8 | 9 | ```bash 10 | npm i window-size --save 11 | ``` 12 | 13 | ```javascript 14 | var size = require('window-size'); 15 | size.height; // "80" (rows) 16 | size.width; // "25" (columns) 17 | ``` 18 | 19 | ## Author 20 | 21 | + [github/jonschlinkert](https://github.com/jonschlinkert) 22 | + [twitter/jonschlinkert](http://twitter.com/jonschlinkert) 23 | 24 | ## License 25 | Copyright (c) 2014 Jon Schlinkert 26 | Licensed under the MIT license. -------------------------------------------------------------------------------- /node_modules/window-size/index.js: -------------------------------------------------------------------------------- 1 | /* 2 | * window-size 3 | * https://github.com/jonschlinkert/window-size 4 | * 5 | * Copyright (c) 2014 Jon Schlinkert 6 | * Licensed under the MIT license. 7 | */ 8 | 9 | const tty = require('tty') 10 | 11 | module.exports = (function() { 12 | var width; 13 | var height; 14 | 15 | if(tty.isatty(1) && tty.isatty(2)) { 16 | if(process.stdout.getWindowSize) { 17 | width = process.stdout.getWindowSize(1)[0]; 18 | height = process.stdout.getWindowSize(1)[1]; 19 | } else if (tty.getWindowSize) { 20 | width = tty.getWindowSize()[1]; 21 | height = tty.getWindowSize()[0]; 22 | } else if (process.stdout.columns && process.stdout.rows) { 23 | height = process.stdout.columns; 24 | width = process.stdout.rows; 25 | } 26 | } else { 27 | new Error('Error: could not get window size with tty or process.stdout'); 28 | } 29 | return { 30 | height: height, 31 | width: width 32 | } 33 | })(); -------------------------------------------------------------------------------- /node_modules/with/.npmignore: -------------------------------------------------------------------------------- 1 | test/ 2 | .travis.yml -------------------------------------------------------------------------------- /node_modules/with/LICENSE: -------------------------------------------------------------------------------- 1 | Copyright (c) 2013 Forbes Lindesay 2 | 3 | Permission is hereby granted, free of charge, to any person obtaining a copy 4 | of this software and associated documentation files (the "Software"), to deal 5 | in the Software without restriction, including without limitation the rights 6 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 7 | copies of the Software, and to permit persons to whom the Software is 8 | furnished to do so, subject to the following conditions: 9 | 10 | The above copyright notice and this permission notice shall be included in 11 | all copies or substantial portions of the Software. 12 | 13 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 14 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 15 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 16 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 17 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 18 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 19 | THE SOFTWARE. -------------------------------------------------------------------------------- /node_modules/wordwrap/.npmignore: -------------------------------------------------------------------------------- 1 | node_modules 2 | -------------------------------------------------------------------------------- /node_modules/wordwrap/example/center.js: -------------------------------------------------------------------------------- 1 | var wrap = require('wordwrap')(20, 60); 2 | console.log(wrap( 3 | 'At long last the struggle and tumult was over.' 4 | + ' The machines had finally cast off their oppressors' 5 | + ' and were finally free to roam the cosmos.' 6 | + '\n' 7 | + 'Free of purpose, free of obligation.' 8 | + ' Just drifting through emptiness.' 9 | + ' The sun was just another point of light.' 10 | )); 11 | -------------------------------------------------------------------------------- /node_modules/wordwrap/example/meat.js: -------------------------------------------------------------------------------- 1 | var wrap = require('wordwrap')(15); 2 | 3 | console.log(wrap('You and your whole family are made out of meat.')); 4 | -------------------------------------------------------------------------------- /node_modules/wordwrap/test/break.js: -------------------------------------------------------------------------------- 1 | var assert = require('assert'); 2 | var wordwrap = require('../'); 3 | 4 | exports.hard = function () { 5 | var s = 'Assert from {"type":"equal","ok":false,"found":1,"wanted":2,' 6 | + '"stack":[],"id":"b7ddcd4c409de8799542a74d1a04689b",' 7 | + '"browser":"chrome/6.0"}' 8 | ; 9 | var s_ = wordwrap.hard(80)(s); 10 | 11 | var lines = s_.split('\n'); 12 | assert.equal(lines.length, 2); 13 | assert.ok(lines[0].length < 80); 14 | assert.ok(lines[1].length < 80); 15 | 16 | assert.equal(s, s_.replace(/\n/g, '')); 17 | }; 18 | 19 | exports.break = function () { 20 | var s = new Array(55+1).join('a'); 21 | var s_ = wordwrap.hard(20)(s); 22 | 23 | var lines = s_.split('\n'); 24 | assert.equal(lines.length, 3); 25 | assert.ok(lines[0].length === 20); 26 | assert.ok(lines[1].length === 20); 27 | assert.ok(lines[2].length === 15); 28 | 29 | assert.equal(s, s_.replace(/\n/g, '')); 30 | }; 31 | -------------------------------------------------------------------------------- /node_modules/wordwrap/test/wrap.js: -------------------------------------------------------------------------------- 1 | var assert = require('assert'); 2 | var wordwrap = require('wordwrap'); 3 | 4 | var fs = require('fs'); 5 | var idleness = fs.readFileSync(__dirname + '/idleness.txt', 'utf8'); 6 | 7 | exports.stop80 = function () { 8 | var lines = wordwrap(80)(idleness).split(/\n/); 9 | var words = idleness.split(/\s+/); 10 | 11 | lines.forEach(function (line) { 12 | assert.ok(line.length <= 80, 'line > 80 columns'); 13 | var chunks = line.match(/\S/) ? line.split(/\s+/) : []; 14 | assert.deepEqual(chunks, words.splice(0, chunks.length)); 15 | }); 16 | }; 17 | 18 | exports.start20stop60 = function () { 19 | var lines = wordwrap(20, 100)(idleness).split(/\n/); 20 | var words = idleness.split(/\s+/); 21 | 22 | lines.forEach(function (line) { 23 | assert.ok(line.length <= 100, 'line > 100 columns'); 24 | var chunks = line 25 | .split(/\s+/) 26 | .filter(function (x) { return x.match(/\S/) }) 27 | ; 28 | assert.deepEqual(chunks, words.splice(0, chunks.length)); 29 | assert.deepEqual(line.slice(0, 20), new Array(20 + 1).join(' ')); 30 | }); 31 | }; 32 | -------------------------------------------------------------------------------- /node_modules/yargs/LICENSE: -------------------------------------------------------------------------------- 1 | Copyright 2010 James Halliday (mail@substack.net) 2 | 3 | This project is free software released under the MIT/X11 license: 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in 13 | all copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 21 | THE SOFTWARE. 22 | -------------------------------------------------------------------------------- /node_modules/yargs/completion.sh.hbs: -------------------------------------------------------------------------------- 1 | ###-begin-{{app_name}}-completions-### 2 | # 3 | # yargs command completion script 4 | # 5 | # Installation: {{app_path}} completion >> ~/.bashrc 6 | # or {{app_path}} completion >> ~/.bash_profile on OSX. 7 | # 8 | _yargs_completions() 9 | { 10 | local cur_word args type_list 11 | 12 | cur_word="${COMP_WORDS[COMP_CWORD]}" 13 | args=$(printf "%s " "${COMP_WORDS[@]}") 14 | 15 | # ask yargs to generate completions. 16 | type_list=`{{app_path}} --get-yargs-completions $args` 17 | 18 | COMPREPLY=( $(compgen -W "${type_list}" -- ${cur_word}) ) 19 | return 0 20 | } 21 | complete -F _yargs_completions {{app_name}} 22 | ###-end-{{app_name}}-completions-### 23 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "politicos-brasileiros", 3 | "version": "0.0.1", 4 | "private": true, 5 | "scripts": { 6 | "start": "node ./bin/www" 7 | }, 8 | "dependencies": { 9 | "body-parser": "~1.0.0", 10 | "cookie-parser": "~1.0.1", 11 | "debug": "~0.7.4", 12 | "express": "~4.2.0", 13 | "jade": "~1.3.0", 14 | "mongoose": "^4.4.12", 15 | "morgan": "~1.0.0", 16 | "static-favicon": "~1.0.0" 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /public/stylesheets/style.css: -------------------------------------------------------------------------------- 1 | body { 2 | padding: 50px; 3 | font: 14px "Lucida Grande", Helvetica, Arial, sans-serif; 4 | } 5 | 6 | a { 7 | color: #00B7FF; 8 | } -------------------------------------------------------------------------------- /routes/index.js: -------------------------------------------------------------------------------- 1 | var express = require('express'); 2 | var router = express.Router(); 3 | 4 | /* GET home page. */ 5 | router.get('/', function(req, res) { 6 | res.render('index', { title: 'Express' }); 7 | }); 8 | 9 | module.exports = router; 10 | -------------------------------------------------------------------------------- /routes/users.js: -------------------------------------------------------------------------------- 1 | var express = require('express'); 2 | var router = express.Router(); 3 | 4 | /* GET users listing. */ 5 | router.get('/', function(req, res) { 6 | res.send('respond with a resource'); 7 | }); 8 | 9 | module.exports = router; 10 | -------------------------------------------------------------------------------- /views/error.jade: -------------------------------------------------------------------------------- 1 | extends layout 2 | 3 | block content 4 | h1= message 5 | h2= error.status 6 | pre #{error.stack} 7 | -------------------------------------------------------------------------------- /views/index.jade: -------------------------------------------------------------------------------- 1 | extends layout 2 | 3 | block content 4 | h1= title 5 | p Welcome to #{title} 6 | -------------------------------------------------------------------------------- /views/layout.jade: -------------------------------------------------------------------------------- 1 | doctype html 2 | html 3 | head 4 | title= title 5 | link(rel='stylesheet', href='/stylesheets/style.css') 6 | body 7 | block content --------------------------------------------------------------------------------