How to use the instance function from is

Find comprehensive JavaScript is.instance code examples handpicked from public code repositorys.

19
20
21
22
23
24
25
26
27
28
//TODO types: string of #FFF/#FFFFFF
function Pixel(fakeArgs) {
  var i;
  var args = slice(arguments);
  this.channels = [];
  if(args.length == 1 && is.instance(args[0], Pixel)) {
    this.channels = slice(args[0].channels);
  } else if(args.length == 1 && Buffer.isBuffer(args[0])) {
    for(i=0;i<args[0].length;i++) {
      this.channels.push(args[0][i]);
fork icon0
star icon6
watch icon3

+ 3 other calls in file