- Feathers
- feathers-mongoose
- only used for the model validation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <script src="../node_modules/steal/steal.js"> | |
| window.rerun = true; | |
| function rerunIfSuccessful() { | |
| var result = document.getElementById('qunit-testresult'); | |
| var failed = result.getElementsByClassName('failed'); | |
| if (!failed.length) { | |
| setTimeout(rerunIfSuccessful, 4000); | |
| } else if (failed[0].innerHTML === "0" && window.rerun) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| const app = {}; | |
| class Channel { | |
| constructor () { | |
| this.connections = []; | |
| } | |
| add (connection) { | |
| this.connections.push(connection); | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| const cmd = require('child_process').execSync; | |
| var yarnInstalled; | |
| try { | |
| cmd('yarn bin').toString(); | |
| yarnInstalled = true; | |
| } catch (err) { | |
| yarnInstalled = false; | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /* global window, document, choo, yo, extend */ | |
| // const extend = require('xtend'); | |
| var html = yo; | |
| const app = choo(); | |
| const store = { | |
| getAll: (storeName, cb) => { | |
| try { | |
| cb(JSON.parse(window.localStorage[storeName])); | |
| } catch (e) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| const request = require('request-promise'); | |
| const errors = require('feathers-errors'); | |
| const options = { | |
| idField: 'sub', | |
| issuer: 'iss' | |
| }; | |
| module.exports = function() { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| const findOrCreate = require('./hook.find-or-create.js') | |
| app.service('messages').hooks({ | |
| before: { | |
| create: [findOrCreate()] | |
| } | |
| }) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| https://www.npmjs.com/package/qtip2 | |
| <td qtip>content</td> | |
| <div class="qtip">here is popover content</div> | |
| <td qtip qtip-selector="qtip">content</td> | |
| <td> | |
| content |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| viewModel = { | |
| // Added implicitly | |
| validation: { | |
| comment: [], | |
| username: { | |
| required: "Username is required." | |
| } | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // Opt out of live binding by not using the property's compute. | |
| // Usage: {{~ 'propName'}} | |
| can.stache.registerHelper('~', function(prop, options) { | |
| return options.context[prop]; | |
| }); |