How to use the Context function from bindings
Find comprehensive JavaScript bindings.Context code examples handpicked from public code repositorys.
4 5 6 7 8 9 10 11 12 13 14 15 16
'use strict'; const addon = require('bindings')('node_librealsense'); describe('Test Device interfaces', function() { let context = new addon.Context; let device = null; before(function(done) { context.getDevice(0).then((availableDevice) => {
21
23
0
GitHub: getdnsapi/getdns-node
33 34 35 36 37 38 39 40 41 42 43 44
// Wrap context creation. module.exports.createContext = function(options) { if (arguments.length > 1) { // NOTE: duplicated in getdns.js and GNContext.cpp. // TODO: use new getdns.Context(...args) when not supporting node.js v4 anymore. const tooManyArgumentsTypeError = new TypeError("Too many arguments."); tooManyArgumentsTypeError.code = getdns.constants.RETURN_INVALID_PARAMETER; throw tooManyArgumentsTypeError;
8
63
0
19 20 21 22 23 24 25 26 27 28
const Pulse = require('bindings')('pulse.node'); const Events = require('events'); const Stream = require('stream'); const PulseContext = Pulse.Context; const PulseStream = Pulse.Stream; function str2bit(val, set, def) { let bit = set[def];
3
14
4
GitHub: dimapaloskin/playcap
50 51 52 53 54 55
createDevice(options: DeviceOptions, cb: DataCallback): Device; } export var Context: { new(): Context } = playcap.Context;
0
2
3
bindings.createKey is the most popular function in bindings (8616 examples)