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

replace-ext

Package Overview
Dependencies
Maintainers
2
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

replace-ext - npm Package Compare versions

Comparing version 1.0.0 to 1.0.1

17

index.js

@@ -15,5 +15,20 @@ 'use strict';

var nFileName = path.basename(npath, path.extname(npath)) + ext;
return path.join(path.dirname(npath), nFileName);
var nFilepath = path.join(path.dirname(npath), nFileName);
// Because `path.join` removes the head './' from the given path.
// This removal can cause a problem when passing the result to `require` or
// `import`.
if (startsWithSingleDot(npath)) {
return '.' + path.sep + nFilepath;
}
return nFilepath;
}
function startsWithSingleDot(fpath) {
var first2chars = fpath.slice(0, 2);
return (first2chars === '.' + path.sep) ||
(first2chars === './');
}
module.exports = replaceExt;

25

package.json
{
"name": "replace-ext",
"version": "1.0.0",
"version": "1.0.1",
"description": "Replaces a file extension with another one",

@@ -21,18 +21,17 @@ "author": "Gulp Team <team@gulpjs.com> (http://gulpjs.com/)",

"scripts": {
"lint": "eslint . && jscs index.js test/",
"lint": "eslint .",
"pretest": "npm run lint",
"test": "mocha --async-only",
"cover": "istanbul cover node_modules/mocha/bin/_mocha --report lcovonly",
"coveralls": "npm run cover && istanbul-coveralls"
"test": "nyc mocha --async-only",
"cover": "nyc --reporter=lcov --reporter=text-summary npm test",
"azure-pipelines": "nyc mocha --async-only --reporter xunit -O output=test.xunit",
"coveralls": "nyc report --reporter=text-lcov | coveralls"
},
"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"
"coveralls": "github:phated/node-coveralls#2.x",
"eslint": "^2.13.1",
"eslint-config-gulp": "^3.0.1",
"expect": "^1.20.2",
"mocha": "^3.0.0",
"nyc": "^10.3.2"
},

@@ -39,0 +38,0 @@ "keywords": [

@@ -9,3 +9,3 @@ <p align="center">

[![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]
[![NPM version][npm-image]][npm-url] [![Downloads][downloads-image]][npm-url] [![Azure Pipelines Build Status][azure-pipelines-image]][azure-pipelines-url] [![Travis 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]

@@ -33,2 +33,10 @@ Replaces a file extension with another one.

## replace-ext for enterprise
Available as part of the Tidelift Subscription
The maintainers of replace-ext and thousands of other packages are working with Tidelift to deliver commercial support and maintenance for the open source dependencies you use to build your applications. Save time, reduce risk, and improve code health, while paying the maintainers of the exact dependencies you use. [Learn more.](https://tidelift.com/subscription/pkg/npm-replace-ext?utm_source=npm-replace-ext&utm_medium=referral&utm_campaign=enterprise&utm_term=repo)
## License

@@ -42,2 +50,5 @@

[azure-pipelines-url]: https://dev.azure.com/gulpjs/replace-ext/_build/latest?branchName=master
[azure-pipelines-image]: https://dev.azure.com/gulpjs/replace-ext/_apis/build/status/replace-ext?branchName=master
[travis-url]: https://travis-ci.org/gulpjs/replace-ext

@@ -54,1 +65,2 @@ [travis-image]: http://img.shields.io/travis/gulpjs/replace-ext.svg?label=travis-ci

[gitter-image]: https://badges.gitter.im/gulpjs/gulp.svg
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