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

bfs-path

Package Overview
Dependencies
Maintainers
1
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

bfs-path - npm Package Compare versions

Comparing version 0.1.1 to 0.1.2

typings.json

5

js/path.js

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

"use strict";
// Split a filename into [root, dir, basename, ext], unix version

@@ -436,5 +437,5 @@ // 'root' is just a slash, or nothing.

return path;
})();
}());
var _ = path;
module.exports = path;
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicGF0aC5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uL3RzL3BhdGgudHMiXSwibmFtZXMiOlsicG9zaXhTcGxpdFBhdGgiLCJwYXRoIiwicGF0aC5jb25zdHJ1Y3RvciIsInBhdGgubm9ybWFsaXplIiwicGF0aC5qb2luIiwicGF0aC5yZXNvbHZlIiwicGF0aC5yZWxhdGl2ZSIsInBhdGguZGlybmFtZSIsInBhdGguYmFzZW5hbWUiLCJwYXRoLmV4dG5hbWUiLCJwYXRoLmlzQWJzb2x1dGUiLCJwYXRoLl9tYWtlTG9uZyIsInBhdGgucGFyc2UiLCJwYXRoLmZvcm1hdCIsInBhdGguX3JlbW92ZUR1cGxpY2F0ZVNlcHMiXSwibWFwcGluZ3MiOiJBQUdBLGlFQUFpRTtBQUNqRSxzQ0FBc0M7QUFDdEMsSUFBSSxXQUFXLEdBQUcsK0RBQStELENBQUM7QUFDbEYsd0JBQXdCLFFBQWdCO0lBQ3RDQSxJQUFJQSxHQUFHQSxHQUFHQSxXQUFXQSxDQUFDQSxJQUFJQSxDQUFDQSxRQUFRQSxDQUFDQSxDQUFDQTtJQUNyQ0EsR0FBR0EsQ0FBQ0EsS0FBS0EsRUFBRUEsQ0FBQ0E7SUFDWkEsTUFBTUEsQ0FBQ0EsR0FBR0EsQ0FBQ0E7QU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AgICAgdHlwZW9mIHBhdGhPYmplY3Qucm9vdFxuICAgICAgKTtcbiAgICB9XG5cbiAgICB2YXIgZGlyID0gcGF0aE9iamVjdC5kaXIgPyBwYXRoT2JqZWN0LmRpciArIHBhdGguc2VwIDogJyc7XG4gICAgdmFyIGJhc2UgPSBwYXRoT2JqZWN0LmJhc2UgfHwgJyc7XG4gICAgcmV0dXJuIGRpciArIGJhc2U7XG4gIH1cblxuICAvLyBUaGUgcGxhdGZvcm0tc3BlY2lmaWMgZmlsZSBzZXBhcmF0b3IuIEJyb3dzZXJGUyB1c2VzIGAvYC5cbiAgcHVibGljIHN0YXRpYyBzZXA6IHN0cmluZyA9ICcvJztcblxuICBwcml2YXRlIHN0YXRpYyBfcmVwbGFjZVJlZ2V4ID0gbmV3IFJlZ0V4cChcIi8vK1wiLCAnZycpO1xuXG4gIHByaXZhdGUgc3RhdGljIF9yZW1vdmVEdXBsaWNhdGVTZXBzKHA6IHN0cmluZyk6IHN0cmluZyB7XG4gICAgcCA9IHAucmVwbGFjZSh0aGlzLl9yZXBsYWNlUmVnZXgsIHRoaXMuc2VwKTtcbiAgICByZXR1cm4gcDtcbiAgfVxuXG4gIC8vIFRoZSBwbGF0Zm9ybS1zcGVjaWZpYyBwYXRoIGRlbGltaXRlci4gQnJvd3NlckZTIHVzZXMgYDpgLlxuICBwdWJsaWMgc3RhdGljIGRlbGltaXRlciA9ICc6JztcblxuICBwdWJsaWMgc3RhdGljIHBvc2l4ID0gcGF0aDtcbiAgLy8gWFhYOiBUeXBpbmcgaGFjay4gV2UgZG9uJ3QgYWN0dWFsbHkgc3VwcG9ydCB3aW4zMi5cbiAgcHVibGljIHN0YXRpYyB3aW4zMiA9IHBhdGg7XG59XG5cbnZhciBfOiB0eXBlb2YgX3BhdGggPSBwYXRoO1xuXG5leHBvcnQgPSBwYXRoO1xuIl19
{
"name": "bfs-path",
"version": "0.1.1",
"version": "0.1.2",
"description": "An emulation of Node's path module. Used in BrowserFS.",

@@ -21,5 +21,4 @@ "main": "js/path.js",

"devDependencies": {
"tsd": "^0.6.5",
"typescript": "^1.6.2"
"typescript": "^1.8"
}
}

9

prepublish.js

@@ -19,7 +19,4 @@ // Handles prepublishing things for cross-platform reasons.

child_process.spawn(getNodeBinItem('tsd'), ["install"], options)
.on('close', function(code) {
checkCode(code);
child_process.spawn(getNodeBinItem('tsc'), options)
.on('close', checkCode);
});
child_process.spawn(getNodeBinItem('tsc'), options)
.on('close', checkCode);

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

# BrowserFS Path 0.1.1
# BrowserFS Path 0.1.2
> An emulation of NodeJS's `path` module. Used in [BrowserFS](https://github.com/jvilk/BrowserFS).

@@ -3,0 +3,0 @@

@@ -12,5 +12,5 @@ {

"files": [
"typings/tsd.d.ts",
"typings/main.d.ts",
"ts/path.ts"
]
}
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