diff options
author | Florian Dold <florian.dold@gmail.com> | 2016-11-03 01:33:53 +0100 |
---|---|---|
committer | Florian Dold <florian.dold@gmail.com> | 2016-11-03 01:33:53 +0100 |
commit | d1291f67551c58168af43698a359cb5ddfd266b0 (patch) | |
tree | 55a13ed29fe1915e3f42f1b1b7038dafa2e975a7 /node_modules/replace-ext | |
parent | d0a0695fb5d34996850723f7d4b1b59c3df909c2 (diff) | |
download | wallet-core-d1291f67551c58168af43698a359cb5ddfd266b0.tar.xz |
node_modules
Diffstat (limited to 'node_modules/replace-ext')
-rw-r--r-- | node_modules/replace-ext/.npmignore | 6 | ||||
-rw-r--r-- | node_modules/replace-ext/.travis.yml | 8 | ||||
-rwxr-xr-x | node_modules/replace-ext/LICENSE | 35 | ||||
-rw-r--r-- | node_modules/replace-ext/README.md | 62 | ||||
-rw-r--r-- | node_modules/replace-ext/index.js | 19 | ||||
-rw-r--r-- | node_modules/replace-ext/package.json | 127 | ||||
-rw-r--r-- | node_modules/replace-ext/test/main.js | 51 |
7 files changed, 102 insertions, 206 deletions
diff --git a/node_modules/replace-ext/.npmignore b/node_modules/replace-ext/.npmignore deleted file mode 100644 index b5ef13a3c..000000000 --- a/node_modules/replace-ext/.npmignore +++ /dev/null @@ -1,6 +0,0 @@ -.DS_Store -*.log -node_modules -build -*.node -components
\ No newline at end of file diff --git a/node_modules/replace-ext/.travis.yml b/node_modules/replace-ext/.travis.yml deleted file mode 100644 index 8101b9fe7..000000000 --- a/node_modules/replace-ext/.travis.yml +++ /dev/null @@ -1,8 +0,0 @@ -language: node_js -node_js: - - "0.7" - - "0.8" - - "0.9" - - "0.10" -after_script: - - npm run coveralls
\ No newline at end of file diff --git a/node_modules/replace-ext/LICENSE b/node_modules/replace-ext/LICENSE index 7cbe012c6..fd38d6935 100755 --- a/node_modules/replace-ext/LICENSE +++ b/node_modules/replace-ext/LICENSE @@ -1,20 +1,21 @@ -Copyright (c) 2014 Fractal <contact@wearefractal.com> +The MIT License (MIT) -Permission is hereby granted, free of charge, to any person obtaining -a copy of this software and associated documentation files (the -"Software"), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, sublicense, and/or sell copies of the Software, and to -permit persons to whom the Software is furnished to do so, subject to -the following conditions: +Copyright (c) 2014 Blaine Bublitz <blaine.bublitz@gmail.com>, Eric Schoffstall <yo@contra.io> and other contributors -The above copyright notice and this permission notice shall be -included in all copies or substantial portions of the Software. +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE -LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION -WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/node_modules/replace-ext/README.md b/node_modules/replace-ext/README.md index 05b5d21fd..8775983b7 100644 --- a/node_modules/replace-ext/README.md +++ b/node_modules/replace-ext/README.md @@ -1,44 +1,50 @@ -# replace-ext [![NPM version][npm-image]][npm-url] [![Build Status][travis-image]][travis-url] [![Coveralls Status][coveralls-image]][coveralls-url] [![Dependency Status][david-image]][david-url] +<p align="center"> + <a href="http://gulpjs.com"> + <img height="257" width="114" src="https://raw.githubusercontent.com/gulpjs/artwork/master/gulp-2x.png"> + </a> +</p> +# replace-ext -## Information +[![NPM version][npm-image]][npm-url] [![Downloads][downloads-image]][npm-url] [![Build Status][travis-image]][travis-url] [![AppVeyor Build Status][appveyor-image]][appveyor-url] [![Coveralls Status][coveralls-image]][coveralls-url] [![Gitter chat][gitter-image]][gitter-url] -<table> -<tr> -<td>Package</td><td>replace-ext</td> -</tr> -<tr> -<td>Description</td> -<td>Replaces a file extension with another one</td> -</tr> -<tr> -<td>Node Version</td> -<td>>= 0.4</td> -</tr> -</table> +Replaces a file extension with another one. ## Usage -```javascript +```js var replaceExt = require('replace-ext'); var path = '/some/dir/file.js'; -var npath = replaceExt(path, '.coffee'); +var newPath = replaceExt(path, '.coffee'); -console.log(npath); // /some/dir/file.coffee +console.log(newPath); // /some/dir/file.coffee ``` -[npm-url]: https://npmjs.org/package/replace-ext -[npm-image]: https://badge.fury.io/js/replace-ext.png +## API -[travis-url]: https://travis-ci.org/wearefractal/replace-ext -[travis-image]: https://travis-ci.org/wearefractal/replace-ext.png?branch=master +### `replaceExt(path, extension)` -[coveralls-url]: https://coveralls.io/r/wearefractal/replace-ext -[coveralls-image]: https://coveralls.io/repos/wearefractal/replace-ext/badge.png +Replaces the extension from `path` with `extension` and returns the updated path string. -[depstat-url]: https://david-dm.org/wearefractal/replace-ext -[depstat-image]: https://david-dm.org/wearefractal/replace-ext.png +Does not replace the extension if `path` is not a string or is empty. -[david-url]: https://david-dm.org/wearefractal/replace-ext -[david-image]: https://david-dm.org/wearefractal/replace-ext.png?theme=shields.io
\ No newline at end of file +## License + +MIT + +[downloads-image]: http://img.shields.io/npm/dm/replace-ext.svg +[npm-url]: https://www.npmjs.com/package/replace-ext +[npm-image]: http://img.shields.io/npm/v/replace-ext.svg + +[travis-url]: https://travis-ci.org/gulpjs/replace-ext +[travis-image]: http://img.shields.io/travis/gulpjs/replace-ext.svg?label=travis-ci + +[appveyor-url]: https://ci.appveyor.com/project/gulpjs/replace-ext +[appveyor-image]: https://img.shields.io/appveyor/ci/gulpjs/replace-ext.svg?label=appveyor + +[coveralls-url]: https://coveralls.io/r/gulpjs/replace-ext +[coveralls-image]: http://img.shields.io/coveralls/gulpjs/replace-ext/master.svg + +[gitter-url]: https://gitter.im/gulpjs/gulp +[gitter-image]: https://badges.gitter.im/gulpjs/gulp.svg diff --git a/node_modules/replace-ext/index.js b/node_modules/replace-ext/index.js index 3f76938e4..7cb7789e2 100644 --- a/node_modules/replace-ext/index.js +++ b/node_modules/replace-ext/index.js @@ -1,9 +1,18 @@ +'use strict'; + var path = require('path'); -module.exports = function(npath, ext) { - if (typeof npath !== 'string') return npath; - if (npath.length === 0) return npath; +function replaceExt(npath, ext) { + if (typeof npath !== 'string') { + return npath; + } + + if (npath.length === 0) { + return npath; + } - var nFileName = path.basename(npath, path.extname(npath))+ext; + var nFileName = path.basename(npath, path.extname(npath)) + ext; return path.join(path.dirname(npath), nFileName); -};
\ No newline at end of file +} + +module.exports = replaceExt; diff --git a/node_modules/replace-ext/package.json b/node_modules/replace-ext/package.json index c74b8c343..27dbe3104 100644 --- a/node_modules/replace-ext/package.json +++ b/node_modules/replace-ext/package.json @@ -1,99 +1,44 @@ { - "_args": [ - [ - { - "raw": "replace-ext@0.0.1", - "scope": null, - "escapedName": "replace-ext", - "name": "replace-ext", - "rawSpec": "0.0.1", - "spec": "0.0.1", - "type": "version" - }, - "/home/dold/repos/taler/wallet-webex/node_modules/gulp-util" - ] - ], - "_from": "replace-ext@0.0.1", - "_id": "replace-ext@0.0.1", - "_inCache": true, - "_location": "/replace-ext", - "_npmUser": { - "name": "fractal", - "email": "contact@wearefractal.com" - }, - "_npmVersion": "1.4.4", - "_phantomChildren": {}, - "_requested": { - "raw": "replace-ext@0.0.1", - "scope": null, - "escapedName": "replace-ext", - "name": "replace-ext", - "rawSpec": "0.0.1", - "spec": "0.0.1", - "type": "version" - }, - "_requiredBy": [ - "/gulp-sourcemaps/vinyl", - "/gulp-util", - "/gulp-util/vinyl", - "/vinyl-fs/vinyl" - ], - "_resolved": "https://registry.npmjs.org/replace-ext/-/replace-ext-0.0.1.tgz", - "_shasum": "29bbd92078a739f0bcce2b4ee41e837953522924", - "_shrinkwrap": null, - "_spec": "replace-ext@0.0.1", - "_where": "/home/dold/repos/taler/wallet-webex/node_modules/gulp-util", - "author": { - "name": "Fractal", - "email": "contact@wearefractal.com", - "url": "http://wearefractal.com/" - }, - "bugs": { - "url": "https://github.com/wearefractal/replace-ext/issues" - }, - "dependencies": {}, + "name": "replace-ext", + "version": "1.0.0", "description": "Replaces a file extension with another one", - "devDependencies": { - "coveralls": "~2.6.1", - "istanbul": "~0.2.3", - "jshint": "~2.4.1", - "mocha": "~1.17.0", - "mocha-lcov-reporter": "~0.0.1", - "rimraf": "~2.2.5", - "should": "~3.1.0" - }, - "directories": {}, - "dist": { - "shasum": "29bbd92078a739f0bcce2b4ee41e837953522924", - "tarball": "https://registry.npmjs.org/replace-ext/-/replace-ext-0.0.1.tgz" - }, + "author": "Gulp Team <team@gulpjs.com> (http://gulpjs.com/)", + "contributors": [ + "Eric Schoffstall <yo@contra.io>", + "Blaine Bublitz <blaine.bublitz@gmail.com>" + ], + "repository": "gulpjs/replace-ext", + "license": "MIT", "engines": { - "node": ">= 0.4" + "node": ">= 0.10" }, - "homepage": "http://github.com/wearefractal/replace-ext", - "licenses": [ - { - "type": "MIT", - "url": "http://github.com/wearefractal/replace-ext/raw/master/LICENSE" - } - ], - "main": "./index.js", - "maintainers": [ - { - "name": "fractal", - "email": "contact@wearefractal.com" - } + "main": "index.js", + "files": [ + "LICENSE", + "index.js" ], - "name": "replace-ext", - "optionalDependencies": {}, - "readme": "ERROR: No README data found!", - "repository": { - "type": "git", - "url": "git://github.com/wearefractal/replace-ext.git" - }, "scripts": { - "coveralls": "istanbul cover _mocha --report lcovonly -- -R spec && cat ./coverage/lcov.info | coveralls && rm -rf ./coverage", - "test": "mocha --reporter spec && jshint" + "lint": "eslint . && jscs index.js test/", + "pretest": "npm run lint", + "test": "mocha --async-only", + "cover": "istanbul cover node_modules/mocha/bin/_mocha --report lcovonly", + "coveralls": "npm run cover && istanbul-coveralls" }, - "version": "0.0.1" + "dependencies": {}, + "devDependencies": { + "eslint": "^1.10.3", + "eslint-config-gulp": "^2.0.0", + "expect": "^1.16.0", + "istanbul": "^0.4.3", + "istanbul-coveralls": "^1.0.3", + "jscs": "^2.3.5", + "jscs-preset-gulp": "^1.0.0", + "mocha": "^2.4.5" + }, + "keywords": [ + "gulp", + "extensions", + "filepath", + "basename" + ] } diff --git a/node_modules/replace-ext/test/main.js b/node_modules/replace-ext/test/main.js deleted file mode 100644 index 51377021b..000000000 --- a/node_modules/replace-ext/test/main.js +++ /dev/null @@ -1,51 +0,0 @@ -var replaceExt = require('../'); -var path = require('path'); -var should = require('should'); -require('mocha'); - -describe('replace-ext', function() { - it('should return a valid replaced extension on nested', function(done) { - var fname = path.join(__dirname, './fixtures/test.coffee'); - var expected = path.join(__dirname, './fixtures/test.js'); - var nu = replaceExt(fname, '.js'); - should.exist(nu); - nu.should.equal(expected); - done(); - }); - - it('should return a valid replaced extension on flat', function(done) { - var fname = 'test.coffee'; - var expected = 'test.js'; - var nu = replaceExt(fname, '.js'); - should.exist(nu); - nu.should.equal(expected); - done(); - }); - - it('should not return a valid replaced extension on empty string', function(done) { - var fname = ''; - var expected = ''; - var nu = replaceExt(fname, '.js'); - should.exist(nu); - nu.should.equal(expected); - done(); - }); - - it('should return a valid removed extension on nested', function(done) { - var fname = path.join(__dirname, './fixtures/test.coffee'); - var expected = path.join(__dirname, './fixtures/test'); - var nu = replaceExt(fname, ''); - should.exist(nu); - nu.should.equal(expected); - done(); - }); - - it('should return a valid added extension on nested', function(done) { - var fname = path.join(__dirname, './fixtures/test'); - var expected = path.join(__dirname, './fixtures/test.js'); - var nu = replaceExt(fname, '.js'); - should.exist(nu); - nu.should.equal(expected); - done(); - }); -}); |