HackerReposA FIELD GUIDE TO OPEN SOURCE
ProSponsor the shelf♧ 0
← Back to top all-time
sanctuary-js
sanctuary
JavaScript2016–2022
sanctuary-js / sanctuary

sanctuary

:see_no_evil: Refuge from unsafe JavaScript

4Distinct people
5Mentions
0Explicit recommenders
3KGitHub stars
REPOSITORY AT A GLANCE

What to know before exploring

What it is

:see_no_evil: Refuge from unsafe JavaScript

GitHub

Where it is used

No documented product use has been verified yet.

What people are saying

No recommendation phrase was found in the indexed comments.

No classified warning is attached to this page. Read the discussions before treating silence as approval.

Also in these discussions

No other repository is repeatedly linked in the same discussions.

This week on Hacker News

Nov 7–Nov 14 UTC · Direct repository links and separately labeled related project stories. Indexed through 11/14/2026, 5:04:57 PM UTC.

No direct repository links were found in the indexed HN discussions over the past seven days. Older discussions are available below.

Mentions over time

HN mentions by year5 dated mentions

Observed mentions: 2016-07-30 00:53:01 UTC to 2022-10-13 06:09:57 UTC.

0122016-01-01 00:00:00 UTC to 2017-01-01 00:00:00 UTC (exclusive): 2 mentions; 0 submissions, 2 comments20162017-01-01 00:00:00 UTC to 2018-01-01 00:00:00 UTC (exclusive): 2 mentions; 1 submissions, 1 comments2018-01-01 00:00:00 UTC to 2019-01-01 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2019-01-01 00:00:00 UTC to 2020-01-01 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments20192020-01-01 00:00:00 UTC to 2021-01-01 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2021-01-01 00:00:00 UTC to 2022-01-01 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2022-01-01 00:00:00 UTC to 2023-01-01 00:00:00 UTC (exclusive): 1 mentions; 0 submissions, 1 comments2022

Counts come from the repository’s dated source evidence. Index cutoff: 2026-11-02 08:16:59 UTC.

View mention counts and date ranges
UTC ranges include their start and exclude their end. Select a period to filter the source evidence.
PeriodStart (UTC)End (exclusive, UTC)MentionsSubmissionsComments
20162016-01-01 00:00:00 UTC2017-01-01 00:00:00 UTC202
20172017-01-01 00:00:00 UTC2018-01-01 00:00:00 UTC211
20182018-01-01 00:00:00 UTC2019-01-01 00:00:00 UTC000
20192019-01-01 00:00:00 UTC2020-01-01 00:00:00 UTC000
20202020-01-01 00:00:00 UTC2021-01-01 00:00:00 UTC000
20212021-01-01 00:00:00 UTC2022-01-01 00:00:00 UTC000
20222022-01-01 00:00:00 UTC2023-01-01 00:00:00 UTC101

What Hacker News says

5 sources
It can be idiomatic in Javascript if you choose a functional style. I think Javascript has become a kitchen-sink language. It is, as you say, a language that affords many styles. If you pick a sub-set of the language that is functional you can see that currying is quite idiomatic in that context. That being said I think library support is a necessity when choosing a more functional approach in Javascript as the "core" experience in JS caters to an imperative, C-derived language (as per many of the examples). If you work with Ramda you can get most of what you need today to make working with currying, and it's compositional capabilities, pleasant. Consider R.curryN: const add = R.curryN(2, (a, b) => a + b) You can now call this: add(1)(2) add(1) add(1, 2) And you have options in terms of order of parameters: const sil
Read the rest
lyAdd2 = add(R.__, 2) // a silly example sillyAdd2(3) // => 5 And if you want even more flexibility there is Fantasyland[0] and Sanctuary[1] among others. Javascript is fertile ground, in my experience, for getting developers to experiment with and adopt functional programming paradigms. [0] https://github.com/fantasyland/fantasy-land [1] https://github.com/sanctuary-js/sanctuary
In Currying is not idiomatic in JavaScript
Fantasy Land is a great project—proof of how extensible JavaScript can be. There are some very interesting related projects: https://github.com/Avaq/Fluture is basically lazy and better promises. A+ spec got nothing on this. https://github.com/sanctuary-js/sanctuary adds better typechecks, combinators, and types like Maybe. https://github.com/origamitower/folktale An upcoming collection of similar tools for JavaScript. And of course, there's Ramda. I think these libraries may sound impossible to use at work at first, but if you play with them for fun, you can at least learn some cool techniques or paradigms.
In Fantasy Land 1.0

MAKE YOURSELF AT HOME

A few shortcuts

/
Search the collection
?
Open this guide
Esc
Close dialogs and navigation

Your saved repositories and interests stay in this browser.