Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 1 addition & 3 deletions src/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,4 @@ type Options = {

type FilePath = string;

declare function glob(str: string, opts?: Options): Promise<FilePath[]>;

export = glob;
export function glob(str: string, opts?: Options): Promise<FilePath[]>;
2 changes: 1 addition & 1 deletion src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ async function walk(output, prefix, lexer, opts, dirname='', level=0) {
* @param {Boolean} [options.flush=false] Reset cache object
* @returns {Array} array containing matching files
*/
export default async function (str, opts={}) {
export async function glob(str, opts={}) {
if (!str) return [];

let glob = globalyzer(str);
Expand Down
4 changes: 1 addition & 3 deletions src/sync.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,4 @@ type Options = {

type FilePath = string;

declare function glob(str: string, opts?: Options): FilePath[];

export = glob;
export function glob(str: string, opts?: Options): FilePath[];
2 changes: 1 addition & 1 deletion src/sync.js
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ function walk(output, prefix, lexer, opts, dirname='', level=0) {
* @param {Boolean} [options.flush=false] Reset cache object
* @returns {Array} array containing matching files
*/
export default function (str, opts={}) {
export function glob(str, opts={}) {
if (!str) return [];

let glob = globalyzer(str);
Expand Down
2 changes: 1 addition & 1 deletion test/glob.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
const test = require('tape');
const { join, resolve } = require('path');
const { order, unixify } = require('./helpers');
const glob = require('../dist');
const { glob } = require('../dist');

const cwd = join(__dirname, 'fixtures');

Expand Down