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

@bothrs/util

Package Overview
Dependencies
Maintainers
2
Versions
40
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@bothrs/util - npm Package Compare versions

Comparing version 1.17.0 to 1.18.0

fs.ts

8

async.ts
export function timeout(ms: number) {
return new Promise(resolve => setTimeout(resolve, ms))
}
export function isPending(promise) {
const test = {}
return Promise.race([promise, test]).then(
value => value === test,
() => false
)
}

6

fetch.ts

@@ -23,3 +23,7 @@ export function fetchJSON(url: string, options?: any) {

)
).then(r => r.json())
)
.then(r => r.json())
.catch(e => {
throw new Error('Failed to fetch JSON: ' + e.message)
})
}

@@ -26,0 +30,0 @@

@@ -11,3 +11,7 @@ // DB_CONNECTION=mysql

const parsed = Object.assign({}, process.env, require('dotenv/lib/main').config().parsed)
const parsed = Object.assign(
{},
process.env,
require('dotenv/lib/main').config().parsed
)

@@ -14,0 +18,0 @@ const config = {

6

package.json
{
"name": "@bothrs/util",
"version": "1.17.0",
"version": "1.18.0",
"description": "Common helper functions",

@@ -9,4 +9,4 @@ "license": "MIT",

"dev": "yarn lint",
"fix": "prettier --write -l *.mjs *.ts",
"lint": "prettier -l *.mjs *.ts",
"fix": "prettier --write -l *.js *.mjs *.ts",
"lint": "prettier -l *.js *.mjs *.ts",
"tsc": "tsc -w --noEmit",

@@ -13,0 +13,0 @@ "prepare": "yarn fix",

@@ -15,4 +15,4 @@ import Player from '@vimeo/player'

data = await getJSON('https://vimeo.com/api/oembed.json?url=' + link)
} catch(e) {
console.error('Error fetching metadata',link, e)
} catch (e) {
console.error('Error fetching metadata', link, e)
}

@@ -19,0 +19,0 @@ return data

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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