Socket
Socket
Sign inDemoInstall

curl_ifrs

Package Overview
Dependencies
Maintainers
1
Versions
11
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

curl_ifrs - npm Package Compare versions

Comparing version 1.0.3 to 1.0.4

44

build_ifrs_curls.js

@@ -7,28 +7,24 @@ #!/usr/bin/env node

/** Build local filename from title of a Standard */
const buildLocalName = title => {
const conversion = [
['IFRS ', '1'],
['IAS ', '2'],
['IFRIC ', '3'],
['SIC-', '4'],
];
return conversion.reduce((prev, [from, to]) => {
const pf = title.match(new RegExp(`^${from}(\\d+) .*`));
return pf ? to + ('0' + pf[1]).slice(-2) + ' ' + title : prev;
}, title) + '.pdf';
};
const buildLocalName = title => [
// Conversion table
['IFRS ', '1'],
['IAS ', '2'],
['IFRIC ', '3'],
['SIC-', '4'],
].reduce((prev, [from, to]) => {
const pf = title.match(new RegExp(`^${from}(\\d+) .*`));
return pf ? to + ('0' + pf[1]).slice(-2) + ' ' + title : prev;
}, title) + '.pdf';
/** Build remote filename from title of a Standard */
const buildRemoteName = title => {
const conversion = [
['IFRS ', 'IFRS'],
['IAS ', 'IAS'],
['IFRIC ', 'IFRIC'],
['SIC-', 'SIC'],
];
return conversion.reduce((prev, [from, to]) => {
const pf = title.match(new RegExp(`^${from}(\\d+) .*`));
return pf ? to + pf[1] : prev;
}, title) + '.pdf';
};
const buildRemoteName = title => [
// Conversion table
['IFRS ', 'IFRS'],
['IAS ', 'IAS'],
['IFRIC ', 'IFRIC'],
['SIC-', 'SIC'],
].reduce((prev, [from, to]) => {
const pf = title.match(new RegExp(`^${from}(\\d+) .*`));
return pf ? to + pf[1] : prev;
}, title) + '.pdf';

@@ -35,0 +31,0 @@ const main = (baseUrl, titles, irregulars) => {

{
"name": "curl_ifrs",
"version": "1.0.3",
"version": "1.0.4",
"description": "Utility to download latest unaccompanied IFRS using curl.",

@@ -5,0 +5,0 @@ "scripts": {

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