npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

nodeon-file

v1.0.0

Published

A collection of file helpers.

Downloads

25

Readme

nodeON-file

A collection of file helpers.

Build Status

Install

Install the module using NPM:

npm install nodeON-file --save

Table of Contents

  1. Overview
  2. API

Overview

Lorem ipsum trololol.

API

Provides the following methods:

  • file.mkdir(dirpath, mode) Synchronous.
  • file.write(filepath, contents, options) Synchronous.
  • file.writeAsync(filepath, contents, optOptions) ASynchronous.
  • file.exists(args..*) Synchronous; Any number of arguments, gets joined up.
  • file.existsAsync(args..*) Asynchronous; Any number of arguments, gets joined up.
  • file.isLink(args..*) Synchronous; Any number of arguments, gets joined up.
  • file.isDir(args..*) Synchronous; Any number of arguments, gets joined up.
  • file.isDirAsync(directory) Asynchronous; Returns Promise, rejects if not dir.
  • file.isDirAsyncBool(directory) Asynchronous; Returns Promise with a boolean result.
  • file.isFile(args..*) Synchronous; Any number of arguments, gets joined up.
  • file.isPathAbsolute(args..*) Synchronous; Any number of arguments, gets joined up.
  • file.arePathsEquivalent(first, args..*) Synchronous; Any number of arguments, gets joined up.
  • file.doesPathContain(ancestor, args..*) Synchronous; Are descendant path(s) contained within ancestor path? Note: does not test if paths actually exist.
  • file.isPathCwd(args..*) Synchronous; Any number of arguments, gets joined up.
  • file.isPathInCwd(args..*) Synchronous; Any number of arguments, gets joined up.
  • file.copy(src, dst) Asynchronous; Returns Promise.
  • file.read(filepath, options) Synchronous.
  • file.readAsync(filepath) ASynchronous.
  • file.readJSON(filepath, options) Synchronous.
  • file.readYaml(filepath) Asynchronous; Returns Promise.
  • file.createTempDir() Asynchronous; Creates a temporary directory, returns full path.
  • file.changeCreateTime(filepath, date) Asynchronous; Changes the Create, Modify and Access times of the file specified, supply any JS parsable date object or string.

[⬆]

Release History

  • v1.0.0, 16 Aug 2016
    • Fixed space issue with changeCreateTime().
    • Honorary release.
  • v0.1.7, 12 Aug 2015
    • Added changeCreateTime method.
  • v0.1.6, 14 Nov 2014
    • Added isDirAsyncBool method.
  • v0.1.5, 24 Sep 2014
    • Added createTempDir() method.
  • v0.1.4, 24 Sep 2014
    • Added writeAsync() method.
  • v0.1.3, 17 Aug 2014
    • Added existsAsync() method.
  • v0.1.1, 16 Aug 2014
    • Added readAsync() method.
  • v0.1.0, 14 Aug 2014
    • Big Bang

License

Copyright (c) 2014 Thanasis Polychronakis. Licensed under the MIT license.

Mostly stripped from the Grunt file module.

Copyright (c) 2013 "Cowboy" Ben Alman Licensed under the MIT license. https://github.com/gruntjs/grunt/blob/master/LICENSE-MIT