Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

v0.0.3

  • Loading branch information...
commit 09fb5f064b6fac5cb8148e72b17d70664466a177 1 parent 6693d5f
@kriskowal authored
Showing with 14 additions and 9 deletions.
  1. +5 −4 CHANGES
  2. +7 −3 fs-boot.js
  3. +2 −2 package.json
View
9 CHANGES
@@ -1,9 +1,10 @@
-0.0.2
+0.0.3
+ - Fixed base and directory bugs
- * synced dependencies
+0.0.2
+ - synced dependencies
0.0.1
-
- * removed erroneous "util" package dependency.
+ - removed erroneous "util" package dependency.
View
10 fs-boot.js
@@ -19,6 +19,10 @@
/*whatsupdoc*/
/*markup markdown*/
+var regExpEscape = function (str) {
+ return str.replace(/[-[\]{}()*+?.\\^$|,#\s]/g, "\\$&");
+};
+
var os = typeof process !== "undefined"?
process.platform :
require("narwhal/engine").os;
@@ -90,7 +94,7 @@ exports.split = function (path) {
// this special case helps isAbsolute
// distinguish an empty path from an absolute path
// "" -> [] NOT [""]
- if (parts.length == 1 && parts[0] == "")
+ if (parts.length === 1 && parts[0] === "")
return [];
// "a" -> ["a"]
// "/a" -> ["", "a"]
@@ -265,7 +269,7 @@ exports.directory = function (path) {
// XXX needs to be sensitive to the root for
// Windows compatibility
parts.pop();
- return parts.join(exports.SEPARATOR) || ".";
+ return parts.join(exports.SEPARATOR) || exports.ROOT;
};
/**
@@ -280,7 +284,7 @@ exports.base = function (path, extension) {
var base = path.split(exports.SEPARATORS_RE()).pop();
if (extension)
base = base.replace(
- new RegExp(RegExp.escape(extension) + '$'),
+ new RegExp(regExpEscape(extension) + '$'),
''
);
return base;
View
4 package.json
@@ -1,7 +1,7 @@
{
"name": "fs-boot",
"description": "Pure JavaScript implementation of common file-system API components",
- "version": "0.0.2",
+ "version": "0.0.3",
"homepage": "http://github.com/kriskowal/fs-boot/",
"author": "Kris Kowal <kris@cixar.com> (http://github.com/kriskowal/)",
"bugs": {
@@ -16,7 +16,7 @@
],
"main": "fs-boot.js",
"dependencies": {
- "q": ">=0.1.3"
+ "q": "0.2.7"
},
"repository": {
"type": "git",
Please sign in to comment.
Something went wrong with that request. Please try again.