This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| var fs = require('fs'); | |
| function readFile(path, options) { | |
| return new Promise(function(resolve, reject) { | |
| fs.readFile(path, options, function(err, data) { | |
| if(err) { reject(err); } | |
| else { | |
| resolve(data); | |
| } | |
| }); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| var fs = require('fs'); | |
| fs.readFile('./fileA.json', function(err, a) { | |
| if(err) { throw err; } | |
| else { | |
| fs.readFile('./fileB.json', function(err, b) { | |
| if(err) { throw err; } | |
| else { | |
| fs.readFile('./fileC.json', function(err, c) { | |
| if(err) { throw err;} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| var fs = require('fs'); | |
| fs.readFile('./fileA.json', function(err, a) { | |
| fs.readFile('./fileB.json', function(err, b) { | |
| fs.readFile('./fileC.json', function(err, c) { | |
| fs.readFile('./fileD.json', function(err, d) { | |
| fs.readFile('./fileE.json', function(err, e) { | |
| console.log(a, b, c, d, 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
| prompting: function () { | |
| var done = this.async(); | |
| var log = function(answers) { this.log(answers); }.bind(this); | |
| var complete = function() { | |
| this.log('complete'); | |
| done(); | |
| }.bind(this); |
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
| describe('CTRL: Dashboard', function() { | |
| var ctr, scope, module; | |
| beforeEach(function() { | |
| module = angular.module('dashboard'); | |
| scope = {}; | |
| }); | |
| /*beforeEach(inject(function($controller) { | |
| scope = {}; | |
| ctrl = $controller("DasboardCtrl", {$scope: scope}); | |
| }));*/ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| var sideBarLength, rightSide, winLength, pointerX, sideShowing, transition; | |
| winLength = window.innerWidth || window.innerLength; | |
| sideBar = document.getElementsByClassName('side')[0]; | |
| rightSide = winLength - sideBar.clientWidth; | |
| sideShowing = true; | |
| transition = (function () { | |
| var vendors = ["Webkit", "Moz", "ms", "O"], result; | |
| for (var i = 0; i < vendors.length;) { | |
| if (vendors[i] + "Transition" in sideBar.style){ |
NewerOlder