@knit/path-join
Advanced tools
Comparing version 0.0.0-5bd66a9 to 0.0.0-monorepo
@@ -0,3 +1,4 @@ | ||
"use strict"; | ||
/* flow */ | ||
const path = require("path"); | ||
@@ -12,11 +13,7 @@ | ||
it("create path when passed scoped module", () => { | ||
expect(pj("foo", "bar", "@scope/package")).toBe( | ||
path.join("foo", "bar", "@scope", "package") | ||
); | ||
expect(pj("foo", "bar", "@scope/package")).toBe(path.join("foo", "bar", "@scope", "package")); | ||
}); | ||
it("keep abs path", () => { | ||
expect(pj("/foo", "bar", "package")).toBe( | ||
path.join("/foo", "bar", "package") | ||
); | ||
expect(pj("/foo", "bar", "package")).toBe(path.join("/foo", "bar", "package")); | ||
}); | ||
}); | ||
}); |
12
index.js
@@ -1,9 +0,9 @@ | ||
/* @flow */ | ||
"use strict"; | ||
import path from "path"; | ||
var _path = _interopRequireDefault(require("path")); | ||
type TPathJoin = (...p: string[]) => string; | ||
const pathJoin: TPathJoin = (...paths) => | ||
path.join(...paths).replace("/", path.sep); | ||
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } | ||
module.exports = pathJoin; | ||
const pathJoin = (...paths) => _path.default.join(...paths).replace("/", _path.default.sep); | ||
module.exports = pathJoin; |
{ | ||
"homepage": "https://github.com/knitjs/knit#readme", | ||
"license": "MIT", | ||
"author": { | ||
"name": "Shane Wilson" | ||
}, | ||
"bugs": { | ||
"url": "https://github.com/knitjs/knit/issues" | ||
}, | ||
"repository": { | ||
"type": "git", | ||
"url": "git+https://github.com/knitjs/knit.git" | ||
}, | ||
"engines": { | ||
"node": ">=10", | ||
"npm": ">=5" | ||
}, | ||
"private": false, | ||
"name": "@knit/path-join", | ||
"version": "0.0.0-5bd66a9" | ||
"description": "os safe path join of scoped packages", | ||
"version": "0.0.0-monorepo" | ||
} |
No contributors or author data
MaintenancePackage does not specify a list of contributors or an author in package.json.
Found 1 instance in 1 package
No bug tracker
MaintenancePackage does not have a linked bug tracker in package.json.
Found 1 instance in 1 package
No License Found
License(Experimental) License information could not be found.
Found 1 instance in 1 package
No repository
Supply chain riskPackage does not have a linked source code repository. Without this field, a package will have no reference to the location of the source code use to generate the package.
Found 1 instance in 1 package
No website
QualityPackage does not have a website.
Found 1 instance in 1 package
1290
0
1
1
0
18