Socket
Socket
Sign inDemoInstall

it-glob

Package Overview
Dependencies
Maintainers
1
Versions
27
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

it-glob - npm Package Compare versions

Comparing version 0.0.8 to 0.0.9

tsconfig.json

27

index.js
'use strict'
// @ts-ignore
const fs = require('fs-extra')

@@ -7,2 +8,21 @@ const path = require('path')

/**
* @typedef {string} Glob
* @typedef {Object} OptionsExt
* @property {Glob[]} [ignore] - Glob patterns to ignore
* @property {string} [cwd=process.cwd()]
* @property {boolean} [absolute=false] - If true produces absolute paths
* @property {boolean} [nodir] - If true yields file paths and skip directories
*
* @typedef {OptionsExt & minimatch.IOptions} Options
*/
/**
* Async iterable filename pattern matcher
*
* @param {string} dir
* @param {string} pattern
* @param {Options} [options]
* @returns {AsyncIterable<string>}
*/
module.exports = async function * glob (dir, pattern, options = {}) {

@@ -27,2 +47,9 @@ const absoluteDir = path.resolve(dir)

/**
* @param {string} base
* @param {string} dir
* @param {Glob} pattern
* @param {Options} options
* @returns {AsyncIterable<string>}
*/
async function * _glob (base, dir, pattern, options) {

@@ -29,0 +56,0 @@ for await (const entry of await fs.readdir(path.join(base, dir))) {

28

package.json
{
"name": "it-glob",
"version": "0.0.8",
"version": "0.0.9",
"description": "Async iterable filename pattern matcher",

@@ -13,3 +13,6 @@ "main": "index.js",

"coverage": "nyc --reporter html --reporter lcov ava",
"clean": "rm -rf .nyc_output coverage"
"clean": "rm -rf .nyc_output coverage dist",
"check": "tsc --noEmit",
"build": "npm run build:types",
"build:types": "tsc --emitDeclarationOnly --declarationDir dist"
},

@@ -19,10 +22,11 @@ "author": "Alex Potsides <alex@achingbrain.net>",

"dependencies": {
"fs-extra": "^8.1.0",
"fs-extra": "^9.0.1",
"minimatch": "^3.0.4"
},
"devDependencies": {
"ava": "^2.4.0",
"it-all": "^1.0.2",
"nyc": "^14.0.0",
"standard": "^14.3.1"
"ava": "^3.12.1",
"it-all": "^1.0.3",
"nyc": "^15.1.0",
"standard": "^14.3.1",
"typescript": "^4.0.2"
},

@@ -32,3 +36,11 @@ "browser": {

},
"gitHead": "faf5c823bffd25e888b9c0353aed30efa5cf508d"
"typesVersions": {
"*": {
"*": [
".",
"dist/*"
]
}
},
"gitHead": "61b1da83cade51bd7bf217966a3eddaf35d2a76b"
}

@@ -1,5 +0,5 @@

import test from 'ava'
import all from 'it-all'
import glob from '.'
import path from 'path'
const test = require('ava')
const all = require('it-all')
const glob = require('.')
const path = require('path')

@@ -6,0 +6,0 @@ test('it should match file', async t => {

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