Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

file-async

Package Overview
Dependencies
Maintainers
1
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

file-async

fs-extra + bluebird promisify

  • 0.1.1
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
26
decreased by-23.53%
Maintainers
1
Weekly downloads
 
Created
Source

file-async

NPM

Use async fs. No more blocking code. fs-extra + bluebird promisify

Install with npm

$ npm install --save file-async

Usage

var fsAsync = require('file-async');

var TMP_FILE_PATH = '/tmp/file_content.js';
// touch
return fsAsync.createFile(TMP_FILE_PATH).then(function () {
  // get stat
  return fsAsync.stat(TMP_FILE_PATH);
})
.then(function(file_stat) {
  // check
  console.log(TMP_FILE_PATH, 'is a file?', file_stat.isFile());
})
.then(function() {
  // remove tmp file
  return fsAsync.remove(TMP_FILE_PATH);
})
.then(function() {
  // exits?
  return fsAsync.exists(TMP_FILE_PATH);
})
.then(function(file_exists) {
  // check again
  console.log(TMP_FILE_PATH, 'is a file?', file_exists);
});

CONTRIBUTING

  • Install/Update dependencies:

    $ npm install --save-dev azk-dev
    $ gulp editor:config
    $ gulp babel:runtime:install
    $ npm install
    
  • Commit

    $ git add .
    $ git commit -m 'Updated azk-dev.'
    

azk-dev

Show all gulp tasks:

$ gulp help
Tests
# default (lint + test, no watch)
$ gulp lint test

# test + lint + watch
$ gulp watch:lint:test

# test + watch (no-lint)
$ gulp watch:test
Deploy npm package

You can deploy package with:

$ npm run deploy [<newversion> | major | minor | patch | premajor | preminor | prepatch | prerelease]

This should run the following steps:

  • Check if not tracked commits in git
  • Run tests with npm test
  • Upgrade version in package.json, commit and add tag
  • Publish package in npmjs.com

Keywords

FAQs

Package last updated on 11 Jun 2015

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc