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

glob-plus

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

glob-plus

A glob that learned to read.

  • 0.0.2
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

glob+

A glob that learned to read.

Same as glob but also returns the content and stats of the file.

Installation

npm install --save glob-plus

Quickstart

const glob = require('glob-plus')

const plus = glob.plus('**', { ignore: 'node_modules/**' })

plus.on('file', ({ name, stats, data }) => {
    console.log(`Found file '${name}' with size ${stats.size}`)
})

plus.on('error', err => {
    console.error(err)
})

plus.on('end', () => {
    console.log('Done!')
})

API

glob.plus([pattern][, options])

  • pattern <String>: optional; the pattern to be matched; default: '**'
  • options <Object>: optional; the glob options; default: { nodir: true }
  • returns an <EventEmitter> with the following events:
    • file <Object>: when a file was matched, statted, and read
      • name <String>: the file name
      • stats <Stats>: the file stats
      • data <Buffer>: the file content
    • error <Error>: when an error occcured while matching, statting, or reading
    • end <>: when matching, statting, and reading has finished

glob.read([pattern][, options])

Same as glob.plus(..) but does not return file stats.

glob.stats([pattern][, options])

Same as glob.plus(..) but does not return file data.

License

WTFPL – Do What the F*ck You Want to Public License.

Made with :heart: by @MarkTiedemann.

Keywords

FAQs

Package last updated on 03 May 2016

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