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

freshbooks-classic

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

freshbooks-classic - npm Package Compare versions

Comparing version 0.0.1 to 0.0.2

lib/index.js

6

package.json
{
"name": "freshbooks-classic",
"description": "FreshBooks Classic API wrapper",
"version": "0.0.1",
"version": "0.0.2",
"author": "Leonardo Dino",

@@ -9,6 +9,6 @@ "scripts": {

"build": "babel src -sd lib",
"dev": "concurrently -kr 'babel src -wsd lib' 'ava -wv'"
"dev": "concurrently -kr 'babel src -wsd lib' 'ava -w'"
},
"homepage": "https://github.com/leonardodino/freshbooks-classic",
"main": "index.js",
"main": "lib/index.js",
"engines": {

@@ -15,0 +15,0 @@ "node": ">= 6"

@@ -60,7 +60,9 @@ import _ from 'lodash/fp'

const first = await request(1)
const pages = _.range(first.page + 1, first.pages + 1).map(request)
return _.flow([
_.map(paginate),
_.spread(_.concat([])),
])(await Promise.all([first, ...pages]))
const {pages} = first
let results = [...first[paginate]]
for(let page = 2; page < first.pages + 1; page++){
const current = await request(page)
results = [...results, ...current[paginate]]
}
return results
}

@@ -67,0 +69,0 @@ }

import _ from 'lodash'
import test from 'ava'
import {url, token} from './credentials.json'
import FreshBooks from '../lib'
import FreshBooks from '..'

@@ -6,0 +6,0 @@ let client_id = null

import _ from 'lodash'
import test from 'ava'
import {url, token} from './credentials.json'
import FreshBooks from '../lib'
import FreshBooks from '..'

@@ -6,0 +6,0 @@ let client_id = 2

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