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

delete

Package Overview
Dependencies
Maintainers
1
Versions
14
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

delete - npm Package Compare versions

Comparing version 0.1.3 to 0.1.4

11

.verbrc.md

@@ -16,3 +16,10 @@ # {%= name %} {%= badge("fury") %}

var del = require('delete');
del('tmp/');
// delete files asynchronously
del('tmp/foo.md', function(err) {
if (err) {throw err;}
});
// delete files synchronously
del.sync('tmp/foo.md');
```

@@ -27,3 +34,3 @@

```js
del('../foo', {force: true});
del.sync('../foo.md', {force: true});
```

@@ -30,0 +37,0 @@

2

package.json
{
"name": "delete",
"description": "Delete files and folders.",
"version": "0.1.3",
"version": "0.1.4",
"homepage": "https://github.com/jonschlinkert/delete",

@@ -6,0 +6,0 @@ "author": {

@@ -20,3 +20,10 @@ # delete [![NPM version](https://badge.fury.io/js/delete.png)](http://badge.fury.io/js/delete)

var del = require('delete');
del('tmp/');
// delete files asynchronously
del('tmp/foo.md', function(err) {
if (err) {throw err;}
});
// delete files synchronously
del.sync('tmp/foo.md');
```

@@ -31,3 +38,3 @@

```js
del('../foo', {force: true});
del.sync('../foo.md', {force: true});
```

@@ -34,0 +41,0 @@

@@ -19,8 +19,21 @@ /*!

describe('delete:', function () {
it('should delete files.', function () {
var fixture = 'test/fixtures/a.txt';
expect(fs.existsSync(fixture)).to.be.true;
del.sync('test/fixtures');
expect(fs.existsSync(fixture)).to.be.false;
describe('async:', function () {
it('should delete files asynchronously.', function () {
var fixture = 'test/fixtures/a.txt';
expect(fs.existsSync(fixture)).to.be.true;
del('test/fixtures', function(err) {
if (err) {throw err;}
expect(fs.existsSync(fixture)).to.be.false;
});
});
});
describe('sync:', function () {
it('should delete files synchronously.', function () {
var fixture = 'test/fixtures/a.txt';
expect(fs.existsSync(fixture)).to.be.true;
del.sync('test/fixtures');
expect(fs.existsSync(fixture)).to.be.false;
});
});
});
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