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

ofac

Package Overview
Dependencies
Maintainers
1
Versions
22
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

ofac - npm Package Compare versions

Comparing version 1.0.8 to 1.0.9

9

index.js

@@ -28,3 +28,3 @@ const fs = require('fs');

self.db = self.fn(self.opts.xml);
self.db = self.fn();
if (!fs.existsSync(self.db) || force)

@@ -36,2 +36,3 @@ await self.zipExtract(fn, self.opts.xml, self.opts.path);

fn: (url) => {
if (!url) url = self.opts.xml;
return self.opts.path + '/' + url.replace(/.*\//, '');

@@ -50,6 +51,8 @@ },

return new Promise((resolve, reject) => {
z.on('error', reject);
z.on('error', (err) => {
reject(Object.assign(ret, {src: 'on', err}));
});
z.on('ready', () => {
z.extract(fn, dest, err => {
if (err) reject(err);
if (err) reject(Object.assign(ret, {src: 'ready', err}));
resolve(dest + '/' + fn);

@@ -56,0 +59,0 @@ z.close();

{
"name": "ofac",
"version": "1.0.8",
"version": "1.0.9",
"description": "A module to facilitate local OFAC searches",

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

@@ -109,7 +109,7 @@ [![npm version](https://badge.fury.io/js/ofac.svg)](https://badge.fury.io/js/ofac)

Since the data set tends to be largish, rather than converting the XML into a DOM for in-memory
* Since the data set tends to be largish, rather than converting the XML into a DOM for in-memory
searches, the module searches the file. This takes a little longer (though it's actually pretty
fast) but it's super-light on RAM
Also, at present searching is limited to first-name/last-name and id/country, and operates only on
* Also, at present searching is limited to first-name/last-name and id/country, and operates only on
Individual data (skips corporations, vessels and other types of entities) but the database contains

@@ -119,2 +119,5 @@ richer information. Anyone that wishes to match against other properties is welcome to write it,

* The data currently retrieved is contained in the `SDN_XML.zip` listed on this page:
https://www.treasury.gov/resource-center/sanctions/SDN-List/Pages/sdn_data.aspx
## Testing

@@ -121,0 +124,0 @@

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