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

prostore.glob-utils

Package Overview
Dependencies
Maintainers
1
Versions
14
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

prostore.glob-utils

Glob Utilities

  • 0.0.4
  • npm
  • Socket score

Version published
Weekly downloads
2
decreased by-33.33%
Maintainers
1
Weekly downloads
 
Created
Source

#Index

Modules

  • prostore.glob-utils

Typedefs

#prostore.glob-utils Lookup files in cwd directory matching glob pattern.

Usage:

var glob = require('prostore.glob-utils');

glob('base/directory', 'glob/pattern/*', function(err, files) {
  // ...
});

Dot-files (i.e. starting with dot) are not returned as per glob module. Directories are not returned either.

Params

  • cwd string - (current work directory) a directory where lookup is performed; this path is also stripped from resulting file paths.
  • pattern string - glob pattern
  • cb function - callback function(err, files), where files is an array of GlobFile

##glob-utils.diff(src, dst) Compares two lists of file descriptors yielding four arrays:

  • added — files existing in src but missing in dst
  • removed — files existing in dst but missing in src
  • modified — files existing in both src and dst but with different md5
  • unmodified — files with equal content in both src and dst

Usage:

var diff = glob.diff(oldFiles, newFiles);
// diff.added
// diff.removed
// diff.modified
// diff.unmodified

Params

#type: GlobFile File descriptor object.

Example:

{
  path: 'path/to/file/relative/to/cwd',
  mtime: 1234567890,
  md5: 'd41d8cd98f00b204e9800998ecf8427e'
}

Properties

  • path string - path relative to cwd
  • mtime number - last modification timestamp
  • md5 string - md5 hash of file content

Type: object

Keywords

FAQs

Package last updated on 26 Mar 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