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

path-parents

Package Overview
Dependencies
Maintainers
1
Versions
28
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

path-parents - npm Package Compare versions

Comparing version 1.0.16 to 1.0.17

11

CHANGELOG.md

@@ -6,2 +6,13 @@ # Change Log

## [1.0.17](https://github.com/bluelovers/ws-iconv/compare/path-parents@1.0.16...path-parents@1.0.17) (2021-12-06)
### ✨ Features
* add `pathSplit` method ([5e616cd](https://github.com/bluelovers/ws-iconv/commit/5e616cdbda04d9e82eb7a94108a972fb63a7015e))
## [1.0.16](https://github.com/bluelovers/ws-iconv/compare/path-parents@1.0.15...path-parents@1.0.16) (2021-08-20)

@@ -8,0 +19,0 @@

4

index.d.ts

@@ -1,2 +0,2 @@

import { IPathPlatform, IPathNode } from 'upath2/lib/type';
import { IPathNode, IPathPlatform } from 'upath2/lib/type';
export interface IOptions {

@@ -14,2 +14,4 @@ platform?: IPathPlatform;

export declare function pathParents(cwd?: string | IOptions, opts?: IOptions): string[];
export declare function pathSplitGenerator(cwd?: string | IOptions, opts?: IOptions): Generator<string, void, unknown>;
export declare function pathSplit(cwd?: string | IOptions, opts?: IOptions): string[];
export default pathParents;
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.pathParents = exports.pathParentsGenerator = exports.pathParentsCore = exports.handleOptions = void 0;
exports.pathSplit = exports.pathSplitGenerator = exports.pathParents = exports.pathParentsGenerator = exports.pathParentsCore = exports.handleOptions = void 0;
const tslib_1 = require("tslib");

@@ -69,3 +69,18 @@ const core_1 = (0, tslib_1.__importDefault)(require("upath2/core"));

exports.pathParents = pathParents;
function* pathSplitGenerator(cwd, opts) {
const runtime = handleOptions(cwd, opts);
for (const p of pathParentsGenerator(cwd, runtime.opts)) {
let r = runtime.path.basename(p);
if (!(r === null || r === void 0 ? void 0 : r.length)) {
r = p;
}
yield r;
}
}
exports.pathSplitGenerator = pathSplitGenerator;
function pathSplit(cwd, opts) {
return [...pathSplitGenerator(cwd, opts)];
}
exports.pathSplit = pathSplit;
exports.default = pathParents;
//# sourceMappingURL=index.js.map
{
"name": "path-parents",
"version": "1.0.16",
"version": "1.0.17",
"description": "return all the parent directories for a directory",

@@ -39,3 +39,3 @@ "keywords": [

},
"gitHead": "7dfaf939ffe60fafb242a6a706ad649cfbf7aaa9"
"gitHead": "d191647544bb12e909dcbe181280d087666d4995"
}

Sorry, the diff of this file is not supported yet

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