denodeifies FirefoxProfile.encode
@param {FirefoxProfile} fp
@returns {Promise<string>}
358887
function encode(fp) {
  return new Promise((resolve, reject) => {
    fp.encode((err, encoded) => {
      if (err) {
        reject(err);

        return;
      }
      resolve(encoded);
    });
  });
}
897932
function _parserFirefox(error){
		// start parse the error stack string
		var lines	= error.stack.split("\n").slice(0, -1);
		var stacktrace	= [];
		lines.forEach(function(line){
			var matches	= line.match(/^(.*)@(.+):(\d+)$/);
			stacktrace.push(new Stacktrace.Frame({
				fct	: matches[1] === '' ? '<anonymous>' : matches[1],
				url	: matches[2],
				line	: parseInt(matches[3], 10),
				column	: 1
			}));
		});
		return stacktrace;
	}
1106305
function (filePath, encode) {
        encode = encode || 'utf-8';

        if (this.isFileSync(filePath)) {
            var raw = fs.readFileSync(filePath, encode);
            var exports = {};
            var context = {
                process: process,
                require: function(name) {
                    var module;
                    try {
                        module = require((function (_module) {
                            if (_module.charAt(0) !== '.') {
                                return _module;
                            }
                            return path.resolve(path.dirname(filePath), _module);
                        }(name)));
                    } catch (e) {
                        throw e;
                    }
                    return module;
                },
                __filename: __filename,
                __dirname: __dirname,
                console: console,
                module: {
                    exports: exports
                },
                exports: exports
            };

            try {
                return vm.runInNewContext(raw, context);
            } catch (e) {
                throw e;
            }
        }
        return {};
    }
286620
function encode(args) {
  const argc = args.length;
  let len = 1;
  let off = 0;
  var i;

  // data length
  for (i = 0; i < argc; i += 1) {
    len += 4 + args[i].length;
  }

  // buffer
  const buf = Buffer.alloc(len);

  // pack meta
  buf[off += 1] = (VERSION << 4) | argc;

  // pack args
  for (i = 0; i < argc; i += 1) {
    const arg = args[i];

    buf.writeUInt32BE(arg.length, off);
    off += 4;

    arg.copy(buf, off);
    off += arg.length;
  }

  return buf;
}
883337
def saveAsJSON(self, fp):
        
        first = True
        for record in self.records():
            if first:
                print(dumps(self.params, separators=(',', ':')), file=fp)
                first = False
            print(dumps(self._convertBlastRecordToDict(record),
                        separators=(',', ':')), file=fp)
190949
function encodePagesPath(pages) {
  pages.forEach((page) => {
    if (!page.path) {
      return;
    }
    page.path = encodePagePath(page.path);
  });
  return pages;
}
156115
function runFirefox (options) {
  options = options || {};
  var profilePath = options.profile;
  var env = extend({}, process.env, options.env || {});
  var args = [];
  if (profilePath) {
    if (isProfileName(profilePath)) {
      args.unshift("-P", profilePath);
    }
    else {
      args.unshift("-profile", profilePath);
    }
  }
  if (options["new-instance"]) {
    args.unshift("-new-instance");
  }
  if (options["no-remote"]) {
    args.unshift("-no-remote");
  }
  if (options["foreground"]) {
    args.unshift("-foreground");
  }
  if (options["binary-args"]) {
    if (Array.isArray(options["binary-args"])) {
      args = args.concat(options["binary-args"]);
    }
    else {
      args = args.concat(parse(options["binary-args"]));
    }
  }
  // support for starting the remote debugger server
  if (options["listen"]) {
    args.unshift(options.listen);
    args.unshift("-start-debugger-server");
  }

  return normalizeBinary(options.binary).then(function(binary) {
    // Using `spawn` so we can stream logging as they come in, rather than
    // buffer them up until the end, which can easily hit the max buffer size.
    var firefox = spawn(binary, args, { env: env });

    firefox.on("close", function () {
      process.removeListener("exit", killFirefox);
    });

    function killFirefox () {
      firefox.kill();
    }

    // Kill child process when main process is killed
    process.once("exit", killFirefox);

    return {
      process: firefox,
      binary: binary,
      args: args
    };
  });
}
1213910
static public void encodeGeography(final FastSerializer fs, GeographyValue value)
    throws IOException {
        ByteBuffer bb = ByteBuffer.allocate(value.getLengthInBytes());
        bb.order(ByteOrder.nativeOrder());
        value.flattenToBuffer(bb);
        byte[] array = bb.array();

        fs.writeInt(array.length);
        fs.write(array);
    }
270864
def encodeABI(cls, fn_name, args=None, kwargs=None, data=None):
        
        fn_abi, fn_selector, fn_arguments = get_function_info(
            fn_name, contract_abi=cls.abi, args=args, kwargs=kwargs,
        )

        if data is None:
            data = fn_selector

        return encode_abi(cls.web3, fn_abi, fn_arguments, data)
821492
function encodePath(path) {
    const replaced = path.replace(/\//g, SEP_PATH_POSIX).replace(/\\\\/g, SEP_PATH_WINDOWS);
    const formatted = encodeURIComponent(replaced);
    return formatted
        .split(SEP_PATH_WINDOWS)
        .join("\\\\")
        .split(SEP_PATH_POSIX)
        .join("/");
}
513190
function (filePatterns, destination, options) {
  try {
    var fse = require('fs-extra')
  } catch (e) {
    console.error('This method can only be used in server applications.\n' +
      'Consider using the alternative method "i18nCompile.fromString()" instead.')
  }

  options = options || {};
  var matchedFiles = _.map(filePatterns, function (pattern) {
    return glob.sync(pattern);
  });

  var files = _.uniq(_.flatten(matchedFiles));

  var srcList = files.filter(function (filepath) {
    // Warn on and remove invalid source files (if nonull was set).
    try {
      fse.accessSync(filepath);
      return true;
    } catch (e) {
      console.warn('Source file "' + filepath + '" not found.');
      return false;
    }
  }).map(function (filepath) {
    // Read YAML file.
    var content = yaml.safeLoad(fse.readFileSync(filepath, 'utf8'), {
      filename: filepath,
      schema: yaml.JSON_SCHEMA
    });

    return new SrcItem(filepath, content);
  });

  var compiled = compileTranslations(srcList);

  // Handle options.
  if (options.merge) {
    // Write the destination file(with all languages merged in the same file).
    fse.outputFileSync(destination, JSON.stringify(compiled));

    // Print a success message.
    console.log('File "' + destination + '" created.');

    return;
  }

  // Write the destination files.
  for (var lang in compiled) {
    var fileDest = langFileDest(destination, lang, options.langPlace);
    fse.outputFileSync(fileDest, JSON.stringify(compiled[lang]));

    // Print a success message.
    console.log('File "' + fileDest + '" created.');
  }
}
853109
function readData(fp, options) {
  // shallow clone options
  var opts = utils.extend({}, options);
  // get the loader for this file.
  var ext = opts.lang || path.extname(fp);
  if (ext && ext.charAt(0) !== '.') {
    ext = '.' + ext;
  }
  if (!this.dataLoaders.hasOwnProperty(ext)) {
    return this.dataLoader('read')(fp, opts);
  }
  return this.dataLoader(ext)(fp, opts);
}
1204045
function (fname) {

    _sclose();

    var num = 3;
    var fd  = null;
    while (!fd && num > 0) {
      try {
        fd = fs.openSync(fname, 'a+', 420);
      } catch (e) {
        if ('ENOENT' === e.code) {
          try {
            mkdirp.sync(path.dirname(fname), 493);  /**<  0755  */
          } catch (e) {
          }
        }
      }
      num--;
    }

    _inode_ = 0;
    _stream = fs.createWriteStream(fname, {'fd' : fd || 1, 'encoding' : 'utf8'});
    _stream.on('error', function (e) {});
  }
1231804
function getSource(fn) {
      var result = '';
      if (isStringable(fn)) {
        result = String(fn);
      } else if (support.decompilation) {
        // Escape the `{` for Firefox 1.
        result = _.result(/^[^{]+\{([\s\S]*)\}\s*$/.exec(fn), 1);
      }
      // Trim string.
      result = (result || '').replace(/^\s+|\s+$/g, '');

      // Detect strings containing only the "use strict" directive.
      return /^(?:\/\*+[\w\W]*?\*\/|\/\/.*?[\n\r\u2028\u2029]|\s)*(["'])use strict\1;?$/.test(result)
        ? ''
        : result;
    }
1118514
function _gpfPromiseSafeResolve (fn, onFulfilled, onRejected) {
    var safe = true;
    function makeSafe (callback) {
        return function (value) {
            if (safe) {
                safe = false;
                callback(value);
            }
        };
    }
    try {
        fn(makeSafe(onFulfilled), makeSafe(onRejected));
    } catch (e) {
        /* istanbul ignore else */ // compability.promise.1
        if (safe) {
            safe = false;
            onRejected(e);
        }
    }
}
197744
def encode(frame)
      frames = if frame[:type] == :headers || frame[:type] == :push_promise
        encode_headers(frame) # HEADERS and PUSH_PROMISE may create more than one frame
      else
        [frame]               # otherwise one frame
      end

      frames.map { |f| @framer.generate(f) }
    end
897800
function write(dir, code) {
  return new Promise(function (resolve, reject) {
    fse.ensureFile(dir, (err) => {
      if (err) return reject(err)
      fs.writeFile(dir, code, 'utf-8', (err) => {
        if (err) {
          return reject(err)
        }
        console.info(chalk.red(dir) + ' ' + chalk.green(getSize(code)))
        resolve()
      })
    })
  })
}