Comparing version 0.1.5 to 0.1.6
/** | ||
* upath http://github.com/anodynos/upath/ | ||
* | ||
* A proxy to `path`, replacing `\` with `/` for all results & methods to add, change, default, trim file extensions. | ||
* Version 0.1.5 - Compiled on 2014-11-18 00:24:58 | ||
* A proxy to `path`, replacing `\` with `/` for all results & new methods to normalize & join keeping leading `./` and add, change, default, trim file extensions. | ||
* Version 0.1.6 - Compiled on 2015-08-21 01:20:56 | ||
* Repository git://github.com/anodynos/upath | ||
* Copyright(c) 2014 Agelos Pikoulas <agelos.pikoulas@gmail.com> | ||
* Copyright(c) 2015 Agelos Pikoulas <agelos.pikoulas@gmail.com> | ||
* License MIT http://www.opensource.org/licenses/mit-license.php | ||
*/ | ||
// Generated by uRequire v0.7.0-beta.11 target: 'lib' template: 'nodejs' | ||
// Generated by uRequire v0.7.0-beta.20 target: 'lib' template: 'nodejs' | ||
var _ = require('lodash'); | ||
var VERSION = '0.1.5'; // injected by urequire-rc-inject-version | ||
var VERSION = '0.1.6'; // injected by urequire-rc-inject-version | ||
@@ -78,2 +78,11 @@ var extraFn, extraFunctions, fName, fn, isValidExt, name, path, toUnix, upath, __slice = [].slice, __indexOf = [].indexOf || function (item) { | ||
}, | ||
joinSafe: function () { | ||
var p, result; | ||
p = 1 <= arguments.length ? __slice.call(arguments, 0) : []; | ||
result = upath.join.apply(null, p); | ||
if (_.startsWith(p[0], "./") && !_.startsWith(result, "./")) { | ||
result = "./" + result; | ||
} | ||
return result; | ||
}, | ||
addExt: function (file, ext) { | ||
@@ -146,1 +155,2 @@ if (!ext) { | ||
; |
{ | ||
"name": "upath", | ||
"description": "A proxy to `path`, replacing `\\` with `/` for all results & methods to add, change, default, trim file extensions.", | ||
"version": "0.1.5", | ||
"description": "A proxy to `path`, replacing `\\` with `/` for all results & new methods to normalize & join keeping leading `./` and add, change, default, trim file extensions.", | ||
"version": "0.1.6", | ||
"homepage": "http://github.com/anodynos/upath/", | ||
"author": { | ||
"name": "Agelos Pikoulas", | ||
"name": "Angelos Pikoulas", | ||
"email": "agelos.pikoulas@gmail.com" | ||
}, | ||
"licenses": [ | ||
{ | ||
"type": "MIT", | ||
"url": "http://www.opensource.org/licenses/mit-license.php" | ||
} | ||
], | ||
"license": "MIT", | ||
"keywords": [ | ||
@@ -46,19 +41,19 @@ "path", | ||
"engines": { | ||
"node": "0.10.x" | ||
"node": ">=0.10.x <=0.12.x" | ||
}, | ||
"dependencies": { | ||
"lodash": "*", | ||
"underscore.string": "^2.3.0" | ||
"lodash": ">=2.x", | ||
"underscore.string": "2.3.x" | ||
}, | ||
"devDependencies": { | ||
"chai": "^1.9.0", | ||
"mocha": "^2.0.0", | ||
"chai": "1.9.x", | ||
"mocha": "2.0.x", | ||
"grunt": "0.4.5", | ||
"grunt-contrib-watch": "~0.5.x", | ||
"grunt-contrib-watch": "0.5.x", | ||
"grunt-urequire": "0.7.x", | ||
"urequire": "0.7.x", | ||
"urequire": "0.7.0-beta.20", | ||
"uberscore": "0.0.16", | ||
"urequire-ab-specrunner": "^0.1.10", | ||
"urequire-rc-inject-version": "^0.1.2" | ||
"urequire-ab-specrunner": "0.2.x", | ||
"urequire-rc-inject-version": "0.1.x" | ||
} | ||
} |
@@ -1,2 +0,2 @@ | ||
# upath v0.1.5 | ||
# upath v0.1.6 | ||
@@ -17,2 +17,3 @@ [![Build Status](https://travis-ci.org/anodynos/upath.svg?branch=master)](https://travis-ci.org/anodynos/upath) | ||
**Useful note: these docs are actually auto generated from [specs](https://github.com/anodynos/upath/blob/master/source/spec/upath-spec.coffee), running on Linux.** | ||
@@ -30,2 +31,3 @@ ## Why ? | ||
##### Examples / specs | ||
@@ -38,7 +40,7 @@ Check out the different (improved) behavior to vanilla `path`: | ||
✓ `'c:/windows/../nodejs/path'` ---> `'c:/nodejs/path'` // equal to `path.normalize()` | ||
✓ `'c:\\windows\\nodejs\\path'` ---> `'c:/windows/nodejs/path'` // `path.normalize()` gives `'c:\windows\nodejs\path'` | ||
✓ `'c:\\windows\\..\\nodejs\\path'` ---> `'c:/nodejs/path'` // `path.normalize()` gives `'c:\windows\..\nodejs\path'` | ||
✓ `'//windows\\unix/mixed'` ---> `'/windows/unix/mixed'` // `path.normalize()` gives `'/windows\unix/mixed'` | ||
✓ `'\\windows//unix/mixed'` ---> `'/windows/unix/mixed'` // `path.normalize()` gives `'\windows/unix/mixed'` | ||
✓ `'////\\windows\\..\\unix/mixed/'` ---> `'/unix/mixed/'` // `path.normalize()` gives `'/\windows\..\unix/mixed/'` | ||
✓ `'c:\\windows\\nodejs\\path'` ---> `'c:/windows/nodejs/path'` // `path.normalize()` gives `'c:\windows\nodejs\path'` | ||
✓ `'c:\\windows\\..\\nodejs\\path'` ---> `'c:/nodejs/path'` // `path.normalize()` gives `'c:\windows\..\nodejs\path'` | ||
✓ `'//windows\\unix/mixed'` ---> `'/windows/unix/mixed'` // `path.normalize()` gives `'/windows\unix/mixed'` | ||
✓ `'\\windows//unix/mixed'` ---> `'/windows/unix/mixed'` // `path.normalize()` gives `'\windows/unix/mixed'` | ||
✓ `'////\\windows\\..\\unix/mixed/'` ---> `'/unix/mixed/'` // `path.normalize()` gives `'/\windows\..\unix/mixed/'` | ||
@@ -52,3 +54,3 @@ | ||
✓ `'some/nodejs\\windows', '../path'` ---> `'some/nodejs/path'` // `path.join()` gives `'some/path'` | ||
✓ `'some\\windows\\only', '..\\path'` ---> `'some/windows/path'` // `path.join()` gives `'some\windows\only/..\path'` | ||
✓ `'some\\windows\\only', '..\\path'` ---> `'some/windows/path'` // `path.join()` gives `'some\windows\only/..\path'` | ||
@@ -100,6 +102,6 @@ | ||
✓ `'./path/../dep'` ---> `'./dep'` // `path.normalize()` gives `'dep'` | ||
✓ `'.//windows\\unix/mixed/'` ---> `'./windows/unix/mixed/'` // `path.normalize()` gives `'windows\unix/mixed/'` | ||
✓ `'..//windows\\unix/mixed'` ---> `'../windows/unix/mixed'` // `path.normalize()` gives `'../windows\unix/mixed'` | ||
✓ `'windows\\unix/mixed/'` ---> `'windows/unix/mixed/'` // `path.normalize()` gives `'windows\unix/mixed/'` | ||
✓ `'..//windows\\..\\unix/mixed'` ---> `'../unix/mixed'` // `path.normalize()` gives `'../windows\..\unix/mixed'` | ||
✓ `'.//windows\\unix/mixed/'` ---> `'./windows/unix/mixed/'` // `path.normalize()` gives `'windows\unix/mixed/'` | ||
✓ `'..//windows\\unix/mixed'` ---> `'../windows/unix/mixed'` // `path.normalize()` gives `'../windows\unix/mixed'` | ||
✓ `'windows\\unix/mixed/'` ---> `'windows/unix/mixed/'` // `path.normalize()` gives `'windows\unix/mixed/'` | ||
✓ `'..//windows\\..\\unix/mixed'` ---> `'../unix/mixed'` // `path.normalize()` gives `'../windows\..\unix/mixed'` | ||
@@ -119,3 +121,19 @@ | ||
✓ `'path//dep\\'` ---> `'path/dep'` // `upath.normalizeSafe()` gives `'path/dep/'` | ||
✓ `'.//windows\\unix/mixed/'` ---> `'./windows/unix/mixed'` // `upath.normalizeSafe()` gives `'./windows/unix/mixed/'` | ||
✓ `'.//windows\\unix/mixed/'` ---> `'./windows/unix/mixed'` // `upath.normalizeSafe()` gives `'./windows/unix/mixed/'` | ||
#### `upath.joinSafe([path1][, path2][, ...])` | ||
Exactly like `path.join()`, but it keeps the first meaningful `./`. | ||
Note that the unix `/` is returned everywhere, so windows `\` is always converted to unix `/`. | ||
##### Examples / specs & how it differs from vanilla `path` | ||
`upath.joinSafe(path)` --returns--> | ||
✓ `'some/nodejs/deep', '../path'` ---> `'some/nodejs/path'` // equal to `path.join()` | ||
✓ `'./some/local/unix/', '../path'` ---> `'./some/local/path'` // `path.join()` gives `'some/local/path'` | ||
✓ `'./some\\current\\mixed', '..\\path'` ---> `'./some/current/path'` // `path.join()` gives `'some\current\mixed/..\path'` | ||
✓ `'../some/relative/destination', '..\\path'` ---> `'../some/relative/path'` // `path.join()` gives `'../some/relative/destination/..\path'` | ||
@@ -306,2 +324,2 @@ | ||
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR | ||
OTHER DEALINGS IN THE SOFTWARE. | ||
OTHER DEALINGS IN THE SOFTWARE. |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Wildcard dependency
QualityPackage has a dependency with a floating version range. This can cause issues if the dependency publishes a new major version.
Found 1 instance in 1 package
148
0
319
24546
+ Addedunderscore.string@2.3.3(transitive)
- Removedunderscore.string@2.4.0(transitive)
Updatedlodash@>=2.x
Updatedunderscore.string@2.3.x