electerious / nice-try

Tries to execute a function and discards any error that occurs.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

How about hi-order?

StreetStrider opened this issue · comments

High-order counterpart:

var niceTry = require('nice-try/method')
var parse = niceTry((...args) => JSON.parse(...args))
// or
var parse = niceTry(JSON.parse)
// then
var value = parse('true')

I like the idea, but I'm currently not planning to add a high-order counterpart.