class="text grey right age">2 gadi atpakaļ 3394_vm 058f31828c first commit 2 gadi atpakaļ 3395 058f31828c first commit 2 gadi atpakaļ 3429 058f31828c first commit 2 gadi atpakaļ 3430 058f31828c first commit 2 gadi atpakaļ 3431 058f31828c first commit 2 gadi atpakaļ 3433 058f31828c first commit 2 gadi atpakaļ 3439 058f31828c first commit 2 gadi atpakaļ 3440 058f31828c first commit 2 gadi atpakaļ 3455 058f31828c first commit 2 gadi atpakaļ 3456 058f31828c first commit 2 gadi atpakaļ 3456_fsm 058f31828c first commit 2 gadi atpakaļ 3456_vm 058f31828c first commit 2 gadi atpakaļ 3466 058f31828c first commit 2 gadi atpakaļ 3467 058f31828c first commit 2 gadi atpakaļ 3468 058f31828c first commit 2 gadi atpakaļ 3501 058f31828c first commit 2 gadi atpakaļ 3502 058f31828c first commit 2 gadi atpakaļ 3503 058f31828c first commit 2 gadi atpakaļ 3534 058f31828c first commit 2 gadi atpakaļ 3541 058f31828c first commit 2 gadi atpakaļ 3541_fsm 058f31828c first commit 2 gadi atpakaļ 3541_vm 058f31828c first commit 2 gadi atpakaļ 3542 058f31828c first commit 2 gadi atpakaļ 3574 058f31828c first commit 2 gadi atpakaļ 3575 058f31828c first commit 2 gadi atpakaļ 3576 058f31828c first commit 2 gadi atpakaļ 3596 058f31828c first commit 2 gadi atpakaļ 3597 058f31828c first commit 2 gadi atpakaļ 3598 058f31828c first commit 2 gadi atpakaļ 3599 058f31828c first commit 2 gadi atpakaļ 3600 058f31828c first commit 2 gadi atpakaļ 3600_fsm 058f31828c first commit 2 gadi atpakaļ 3600_vm 058f31828c first commit 2 gadi atpakaļ 3601 058f31828c first commit 2 gadi atpakaļ 3601_fsm 058f31828c first commit 2 gadi atpakaļ 3601_vm 058f31828c first commit 2 gadi atpakaļ 3602 058f31828c first commit 2 gadi atpakaļ 3602_fsm 058f31828c first commit 2 gadi atpakaļ 3602_vm 058f31828c first commit 2 gadi atpakaļ 3603 058f31828c first commit 2 gadi atpakaļ 3603_fsm 058f31828c first commit 2 gadi atpakaļ 3603_vm 058f31828c first commit 2 gadi atpakaļ 3604 058f31828c first commit 2 gadi atpakaļ 3605 058f31828c first commit 2 gadi atpakaļ 3606 058f31828c first commit 2 gadi atpakaļ 3607 058f31828c first commit 2 gadi atpakaļ 3608 058f31828c first commit 2 gadi atpakaļ 3609 058f31828c first commit 2 gadi atpakaļ 3712 058f31828c first commit 2 gadi atpakaļ 3764 058f31828c first commit 2 gadi atpakaļ 3764_fsm 058f31828c first commit 2 gadi atpakaļ 3764_vm 058f31828c first commit 2 gadi atpakaļ 3766 058f31828c first commit 2 gadi atpakaļ 3767 058f31828c first commit 2 gadi atpakaļ 3997 058f31828c first commit 2 gadi atpakaļ 4143 058f31828c first commit 2 gadi atpakaļ 4144 058f31828c first commit 2 gadi atpakaļ 4145 058f31828c first commit 2 gadi atpakaļ 4146 058f31828c first commit 2 gadi atpakaļ 4147 058f31828c first commit 2 gadi atpakaļ 4148 058f31828c first commit 2 gadi atpakaļ 4149 058f31828c first commit 2 gadi atpakaļ 4150 058f31828c first commit 2 gadi atpakaļ 4151 058f31828c first commit 2 gadi atpakaļ 4152 058f31828c first commit 2 gadi atpakaļ 4153 058f31828c first commit 2 gadi atpakaļ 4154 058f31828c first commit 2 gadi atpakaļ 4155 058f31828c first commit 2 gadi atpakaļ 4156 058f31828c first commit 2 gadi atpakaļ 4157 058f31828c first commit 2 gadi atpakaļ 4158 058f31828c first commit 2 gadi atpakaļ 4159 058f31828c first commit 2 gadi atpakaļ 4160 058f31828c first commit 2 gadi atpakaļ 4161 058f31828c first commit 2 gadi atpakaļ 4162 058f31828c first commit 2 gadi atpakaļ 4163 058f31828c first commit 2 gadi atpakaļ 4164 058f31828c first commit 2 gadi atpakaļ 4165 058f31828c first commit 2 gadi atpakaļ 4166 058f31828c first commit 2 gadi atpakaļ 4167 058f31828c first commit 2 gadi atpakaļ 4168 058f31828c first commit 2 gadi atpakaļ 4169 058f31828c first commit 2 gadi atpakaļ 4170 058f31828c first commit 2 gadi atpakaļ 4171 058f31828c first commit 2 gadi atpakaļ 4172 058f31828c first commit 2 gadi atpakaļ 4173 058f31828c first commit 2 gadi atpakaļ 4174 058f31828c first commit 2 gadi atpakaļ 5002 058f31828c first commit 2 gadi atpakaļ 548 058f31828c first commit 2 gadi atpakaļ 549 058f31828c first commit 2 gadi atpakaļ 6102 058f31828c first commit 2 gadi atpakaļ 6104 058f31828c first commit 2 gadi atpakaļ 6106 058f31828c first commit 2 gadi atpakaļ 6110 058f31828c first commit 2 gadi atpakaļ 6111 058f31828c first commit 2 gadi atpakaļ 6112 058f31828c first commit 2 gadi atpakaļ 6113 058f31828c first commit 2 gadi atpakaļ 6117 058f31828c first commit 2 gadi atpakaļ 826 058f31828c first commit 2 gadi atpakaļ 827 058f31828c first commit 2 gadi atpakaļ 828 058f31828c first commit 2 gadi atpakaļ PG_VERSION 058f31828c first commit 2 gadi atpakaļ pg_filenode.map 058f31828c first commit 2 gadi atpakaļ tum/tmt_learning - Gogs: Simplico Git Service

Nav apraksta

Prach Pongpanich 6f337d0a21 install tailwind alpine daisyui 3 gadi atpakaļ
..
LICENSE 6f337d0a21 install tailwind alpine daisyui 3 gadi atpakaļ
README.md 6f337d0a21 install tailwind alpine daisyui 3 gadi atpakaļ
index.js 6f337d0a21 install tailwind alpine daisyui 3 gadi atpakaļ
package.json 6f337d0a21 install tailwind alpine daisyui 3 gadi atpakaļ

README.md

glob-parent

NPM version Downloads Build Status Coveralls Status

Extract the non-magic parent path from a glob string.

Usage

var globParent = require('glob-parent');

globParent('path/to/*.js'); // 'path/to'
globParent('/root/path/to/*.js'); // '/root/path/to'
globParent('/*.js'); // '/'
globParent('*.js'); // '.'
globParent('**/*.js'); // '.'
globParent('path/{to,from}'); // 'path'
globParent('path/!(to|from)'); // 'path'
globParent('path/?(to|from)'); // 'path'
globParent('path/+(to|from)'); // 'path'
globParent('path/*(to|from)'); // 'path'
globParent('path/@(to|from)'); // 'path'
globParent('path/**/*'); // 'path'

// if provided a non-glob path, returns the nearest dir
globParent('path/foo/bar.js'); // 'path/foo'
globParent('path/foo/'); // 'path/foo'
globParent('path/foo'); // 'path' (see issue #3 for details)

API

globParent(maybeGlobString, [options])

Takes a string and returns the part of the path before the glob begins. Be aware of Escaping rules and Limitations below.

options

{
  // Disables the automatic conversion of slashes for Windows
  flipBackslashes: true;
}

Escaping

The following characters have special significance in glob patterns and must be escaped if you want them to be treated as regular path characters:

  • ? (question mark) unless used as a path segment alone
  • * (asterisk)
  • | (pipe)
  • ( (opening parenthesis)
  • ) (closing parenthesis)
  • { (opening curly brace)
  • } (closing curly brace)
  • [ (opening bracket)
  • ] (closing bracket)

Example

globParent('foo/[bar]/'); // 'foo'
globParent('foo/\\[bar]/'); // 'foo/[bar]'

Limitations

Braces & Brackets

This library attempts a quick and imperfect method of determining which path parts have glob magic without fully parsing/lexing the pattern. There are some advanced use cases that can trip it up, such as nested braces where the outer pair is escaped and the inner one contains a path separator. If you find yourself in the unlikely circumstance of being affected by this or need to ensure higher-fidelity glob handling in your library, it is recommended that you pre-process your input with expand-braces and/or expand-brackets.

Windows

Backslashes are not valid path separators for globs. If a path with backslashes is provided anyway, for simple cases, glob-parent will replace the path separator for you and return the non-glob parent path (now with forward-slashes, which are still valid as Windows path separators).

This cannot be used in conjunction with escape characters.

// BAD
globParent('C:\\Program Files \\(x86\\)\\*.ext'); // 'C:/Program Files /(x86/)'

// GOOD
globParent('C:/Program Files\\(x86\\)/*.ext'); // 'C:/Program Files (x86)'

If you are using escape characters for a pattern without path parts (i.e. relative to cwd), prefix with ./ to avoid confusing glob-parent.

// BAD
globParent('foo \\[bar]'); // 'foo '
globParent('foo \\[bar]*'); // 'foo '

// GOOD
globParent('./foo \\[bar]'); // 'foo [bar]'
globParent('./foo \\[bar]*'); // '.'

License

ISC