This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| function add(...args) { | |
| const sum = args.reduce((prev, curr) => prev + curr, 0); | |
| const ret = add.bind(void 0, sum); | |
| ret.value = ret.valueOf = () => sum; | |
| ret.add = ret; | |
| return ret; | |
| } | |
| console.log(add(1, 2).value() === 3); | |
| console.log(add(1, 2)(3).value() === 6); |
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 Q = require('q'); | |
| var util = require('util'); | |
| var request = require('request'); | |
| var _ = require('lodash'); | |
| var sso = {}; | |
| /** | |
| * Redirect to the SSO login page. | |
| */ |
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 ApiQuery = function() { | |
| this.http = require('http'); | |
| this.q = require('q'); | |
| this.Connect = require('./conduit.connect'); | |
| this.initialize(); | |
| }; | |
| ApiQuery.prototype = { | |
| initialize: 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
| var Connect = function() { | |
| this.fs = require('fs'); | |
| this.crypto = require('crypto'); | |
| this.http = require('http'); | |
| this.url = require('url'); | |
| this.q = require('q'); | |
| this.initialize(); | |
| }; |
NewerOlder