Socket
Socket
Sign inDemoInstall

path-ends-with

Package Overview
Dependencies
1
Maintainers
1
Versions
10
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 0.1.1 to 0.2.0

browser.js

13

.verbrc.md

@@ -6,4 +6,11 @@ # {%= name %} {%= badge("fury") %}

## Install
{%= include("install", {save: 'save'}) %}
{%= include("install-npm", {save: 'save'}) %}
{%= include("install-bower", {save: 'save'}) %}
## Run tests
```bash
npm test
```
## Usage

@@ -36,2 +43,6 @@

## Contributing
Pull requests and stars are always welcome. For bugs and feature requests, [please create an issue][issues].
## Author

@@ -38,0 +49,0 @@ {%= include("author") %}

5

bower.json
{
"name": "path-ends-with",
"version": "0.1.1",
"version": "0.2.0",
"main": [
"index.js"
]
],
"ignore": ["node_modules", ".git"]
}

@@ -1,14 +0,12 @@

/*!
* path-ends-with <https://github.com/jonschlinkert/path-ends-with>
*
* Copyright (c) 2014 Jon Schlinkert, contributors.
* Licensed under the MIT License
'use strict';
/**
* Module dependencies
*/
'use strict';
var path = require('path');
var endsWith = require('ends-with');
/**
* Return true if the filepath ends with the given string
* Return true if `filepath` ends with the given `str`ing
*

@@ -20,6 +18,4 @@ * @param {String} `filepath`

module.exports = function endsWith(filepath, str) {
filepath = path.normalize(filepath);
str = path.normalize(str);
return filepath.indexOf(str, filepath.length - str.length) !== -1;
module.exports = function(fp, str) {
return endsWith(path.normalize(fp), path.normalize(str));
};
{
"name": "path-ends-with",
"description": "Return `true` if a file path ends with the given string.",
"version": "0.1.1",
"description": "Return `true` if a file path ends with the given string/suffix.",
"version": "0.2.0",
"homepage": "https://github.com/jonschlinkert/path-ends-with",

@@ -31,17 +31,28 @@ "author": {

"devDependencies": {
"verb": "~0.2.6",
"chai": "~1.9.1",
"mocha": "*"
"mocha": "*",
"should": "^4.0.4",
"verb": "^0.2.15"
},
"keywords": [
"path",
"file",
"segment",
"end",
"ending",
"ends",
"ends-with",
"ext",
"extension",
"extname",
"file",
"filepath",
"end",
"ending"
]
"match",
"matches",
"path",
"re",
"regex",
"regexp",
"segment",
"suffix"
],
"dependencies": {
"ends-with": "^0.2.0"
}
}

@@ -1,7 +0,7 @@

# path-ends-with [![NPM version](https://badge.fury.io/js/path-ends-with.png)](http://badge.fury.io/js/path-ends-with)
# path-ends-with [![NPM version](https://badge.fury.io/js/path-ends-with.svg)](http://badge.fury.io/js/path-ends-with)
> Return `true` if a file path ends with the given string.
> Return `true` if a file path ends with the given string/suffix.
## Install
Install with [npm](npmjs.org):
#### Install with [npm](npmjs.org)

@@ -11,3 +11,14 @@ ```bash

```
#### Install with [bower](https://github.com/bower/bower)
```bash
bower install path-ends-with --save
```
## Run tests
```bash
npm test
```
## Usage

@@ -40,2 +51,6 @@

## Contributing
Pull requests and stars are always welcome. For bugs and feature requests, [please create an issue][issues].
## Author

@@ -54,2 +69,2 @@

_This file was generated by [verb-cli](https://github.com/assemble/verb-cli) on June 25, 2014._
_This file was generated by [verb-cli](https://github.com/assemble/verb-cli) on October 16, 2014._
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc