Tabnine Logo For Javascript
du
Code IndexAdd Tabnine to your IDE (free)

How to use du

Best JavaScript code snippets using du(Showing top 3 results out of 882)

origin: Level/rocksdb

const verify = function (location, compression, t) {
 du(location, function (err, size) {
  t.error(err)
  if (compression) {
   t.ok(size < dataSize, 'on-disk size (' + size + ') is less than data size (' + dataSize + ')')
  } else {
   t.ok(size >= dataSize, 'on-disk size (' + size + ') is greater than data size (' + dataSize + ')')
  }
  t.end()
 })
}
origin: WagonOfDoubt/kotoba.js

const getDirSize = ({dirname, dir}) => {
 return new Promise((resolve, reject) =>
  du(dir, (err, size) =>{
   if (err) {
    reject(err);
    return;
   }
   resolve({
    dirname: dirname,
    dir: dir,
    size: size,
    files: fs.readdirSync(dir)
     .map(filename => path.join(dir, filename))
     .filter(dir => fs.statSync(dir))
     .length
   });
  })
 );
}
origin: WagonOfDoubt/kotoba.js

Board.estimatedDocumentCount(),
new Promise((resolve, reject) => {
 du(config.html_path, (err, size) => {
  if (err) {
   reject(err);
du(npm)

Most used du functions

  • du

Popular in JavaScript

  • rimraf
    A deep deletion module for node (like `rm -rf`)
  • ws
    Simple to use, blazing fast and thoroughly tested websocket client and server for Node.js
  • axios
    Promise based HTTP client for the browser and node.js
  • through2
    A tiny wrapper around Node.js streams.Transform (Streams2/3) to avoid explicit subclassing noise
  • lodash
    Lodash modular utilities.
  • cheerio
    Tiny, fast, and elegant implementation of core jQuery designed specifically for the server
  • mocha
    simple, flexible, fun test framework
  • async
    Higher-order functions and common patterns for asynchronous code
  • yargs
    yargs the modern, pirate-themed, successor to optimist.
  • Top Vim plugins
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJavascript Code Index
Get Tabnine for your IDE now