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

extractd

Package Overview
Dependencies
Maintainers
1
Versions
16
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

extractd - npm Package Compare versions

Comparing version 1.1.0 to 1.1.1

5

examples/basic.js

@@ -5,5 +5,8 @@ const extractd = require('../extractd');

const done = await extractd.generate('nikon_d850_01.nef');
const done = await extractd.generate('nikon_d850_01.nef', {
destination: '/my/new/directory/'
});
console.dir(done);
})();

8

extractd.js

@@ -72,6 +72,12 @@ const fs = require('fs');

if (typeof options !== 'object') {
return main = {
error: `Expected options object got ${typeof options} instead`
};
}
if (!options.destination) {
options.destination = temp;
} else {
options.destination = path.normalize(options.destination);
options.destination = path.resolve(options.destination);
}

@@ -78,0 +84,0 @@

{
"name": "extractd",
"version": "1.1.0",
"version": "1.1.1",
"description": "Extract previews from DSLR and mirrorless cameras' RAW files",

@@ -5,0 +5,0 @@ "main": "extractd.js",

@@ -24,3 +24,3 @@ # extractd

- **compact** `optional (boolean)` - returns compact list of the preview files (defaults to false).
- **destination** `optional (string)` - directory where preview image will be saved (defaults to RAW image directory).
- **destination** `optional (string)` - directory where preview image will be saved to; if destination does not exists it will be created (defaults to OS temp directory).
- **stream** `optional (boolean)` - by default `exif` process generates the preview file in the temp directory in the OS or in `destination` if provided; once enabled `preview` is returned as a readeble stream which source will by automatically deleted after fully piped (defaults to false).

@@ -53,6 +53,9 @@ - **persist** `optional (boolean)` - by default `exif` process will be initialised and killed of per extractd call; with `persist` enabled same `exif` process can be used across all calls for single file and batch processing (defaults to false).

### Persistent status check
```js
const done = await extractd.generate('/directory/nikon_d850_01.nef', {
persist: true
persist: true,
destination: '/directory/'
});

@@ -64,2 +67,11 @@

Response `done (object)` will be similar to:
```js
{
preview: '/directory/nikon_d850_01.jpg',
source: '/directory/nikon_d850_01.nef'
}
```
Response `status (object)` will be similar to:

@@ -73,3 +85,3 @@

- persistent - status indicates that `exif` process is already live and calls can join in
- persistent - status indicates that `exif` process is already live and additional calls can join in or next call should terminate it

@@ -76,0 +88,0 @@ ### Basic stream usage

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