Skip to content
Permalink
Browse files

Port the project to Deno

  • Loading branch information...
aynik committed May 5, 2019
1 parent 89dc4df commit 270886b9ab782fbcf6fd258caae497b53cf848ca
Showing with 44,395 additions and 31,220 deletions.
  1. +11 −0 .appveyor.yml
  2. +1 −8 .gitignore
  3. +7 −4 .travis.yml
  4. +1 −0 .vimrc
  5. +7 −43 README.md
  6. BIN assets/logo.png
  7. +2,439 −0 deno.d.ts
  8. +1 −0 deno/deps/deps/https/deno.land/std/colors/mod.ts.headers.json
  9. +1 −0 deno/deps/deps/https/deno.land/std/prettier/main.ts.headers.json
  10. +1 −0 deno/deps/deps/https/deno.land/std/testing/asserts.ts.headers.json
  11. +1 −0 deno/deps/deps/https/deno.land/std/testing/diff.ts.headers.json
  12. +1 −0 deno/deps/deps/https/deno.land/std/testing/format.ts.headers.json
  13. +1 −0 deno/deps/deps/https/deno.land/std/testing/mod.ts.headers.json
  14. +1 −0 deno/deps/deps/https/deno.land/std@v0.3.2/http/server.ts.headers.json
  15. +1 −0 deno/deps/deps/https/deno.land/welcome.ts
  16. +1 −0 deno/deps/deps/https/deno.land/x/expect/expect.ts.headers.json
  17. +1 −0 deno/deps/deps/https/deno.land/x/expect/mod.ts.headers.json
  18. +121 −0 deno/deps/deps/https/raw.githubusercontent.com/allain/expect/master/expect.ts
  19. +1 −0 deno/deps/deps/https/raw.githubusercontent.com/allain/expect/master/expect.ts.headers.json
  20. +567 −0 deno/deps/deps/https/raw.githubusercontent.com/allain/expect/master/matchers.ts
  21. +1 −0 deno/deps/deps/https/raw.githubusercontent.com/allain/expect/master/matchers.ts.headers.json
  22. +52 −0 deno/deps/deps/https/raw.githubusercontent.com/allain/expect/master/mock.ts
  23. +1 −0 deno/deps/deps/https/raw.githubusercontent.com/allain/expect/master/mock.ts.headers.json
  24. +11 −0 deno/deps/deps/https/raw.githubusercontent.com/allain/expect/master/mod.ts
  25. +1 −0 deno/deps/deps/https/raw.githubusercontent.com/allain/expect/master/mod.ts.headers.json
  26. +136 −0 deno/deps/deps/https/raw.githubusercontent.com/denoland/deno_std/master/colors/mod.ts
  27. +1 −0 deno/deps/deps/https/raw.githubusercontent.com/denoland/deno_std/master/colors/mod.ts.headers.json
  28. +274 −0 deno/deps/deps/https/raw.githubusercontent.com/denoland/deno_std/master/flags/mod.ts
  29. +1 −0 deno/deps/deps/https/raw.githubusercontent.com/denoland/deno_std/master/flags/mod.ts.headers.json
  30. +45 −0 deno/deps/deps/https/raw.githubusercontent.com/denoland/deno_std/master/fs/glob.ts
  31. +1 −0 deno/deps/deps/https/raw.githubusercontent.com/denoland/deno_std/master/fs/glob.ts.headers.json
  32. +309 −0 deno/deps/deps/https/raw.githubusercontent.com/denoland/deno_std/master/fs/globrex.ts
  33. +1 −0 deno/deps/deps/https/raw.githubusercontent.com/denoland/deno_std/master/fs/globrex.ts.headers.json
  34. +144 −0 deno/deps/deps/https/raw.githubusercontent.com/denoland/deno_std/master/fs/walk.ts
  35. +1 −0 deno/deps/deps/https/raw.githubusercontent.com/denoland/deno_std/master/fs/walk.ts.headers.json
  36. +298 −0 deno/deps/deps/https/raw.githubusercontent.com/denoland/deno_std/master/prettier/main.ts
  37. +1 −0 .../deps/deps/https/raw.githubusercontent.com/denoland/deno_std/master/prettier/main.ts.headers.json
  38. +11 −0 deno/deps/deps/https/raw.githubusercontent.com/denoland/deno_std/master/prettier/prettier.ts
  39. +1 −0 ...s/deps/https/raw.githubusercontent.com/denoland/deno_std/master/prettier/prettier.ts.headers.json
  40. +1 −0 ...s/deps/https/raw.githubusercontent.com/denoland/deno_std/master/prettier/vendor/parser_babylon.js
  41. +1 −0 ...raw.githubusercontent.com/denoland/deno_std/master/prettier/vendor/parser_babylon.js.headers.json
  42. +11 −0 .../deps/https/raw.githubusercontent.com/denoland/deno_std/master/prettier/vendor/parser_markdown.js
  43. +1 −0 ...aw.githubusercontent.com/denoland/deno_std/master/prettier/vendor/parser_markdown.js.headers.json
  44. +11 −0 ...eps/https/raw.githubusercontent.com/denoland/deno_std/master/prettier/vendor/parser_typescript.js
  45. +1 −0 ....githubusercontent.com/denoland/deno_std/master/prettier/vendor/parser_typescript.js.headers.json
  46. +30,688 −0 .../deps/deps/https/raw.githubusercontent.com/denoland/deno_std/master/prettier/vendor/standalone.js
  47. +1 −0 ...tps/raw.githubusercontent.com/denoland/deno_std/master/prettier/vendor/standalone.js.headers.json
  48. +319 −0 deno/deps/deps/https/raw.githubusercontent.com/denoland/deno_std/master/testing/asserts.ts
  49. +1 −0 ...eps/deps/https/raw.githubusercontent.com/denoland/deno_std/master/testing/asserts.ts.headers.json
  50. +215 −0 deno/deps/deps/https/raw.githubusercontent.com/denoland/deno_std/master/testing/diff.ts
  51. +1 −0 deno/deps/deps/https/raw.githubusercontent.com/denoland/deno_std/master/testing/diff.ts.headers.json
  52. +544 −0 deno/deps/deps/https/raw.githubusercontent.com/denoland/deno_std/master/testing/format.ts
  53. +1 −0 ...deps/deps/https/raw.githubusercontent.com/denoland/deno_std/master/testing/format.ts.headers.json
  54. +273 −0 deno/deps/deps/https/raw.githubusercontent.com/denoland/deno_std/master/testing/mod.ts
  55. +1 −0 deno/deps/deps/https/raw.githubusercontent.com/denoland/deno_std/master/testing/mod.ts.headers.json
  56. +84 −0 deno/deps/deps/https/raw.githubusercontent.com/denoland/deno_std/master/testing/pretty.ts
  57. +1 −0 ...deps/deps/https/raw.githubusercontent.com/denoland/deno_std/master/testing/pretty.ts.headers.json
  58. +136 −0 deno/deps/deps/https/raw.githubusercontent.com/denoland/deno_std/v0.3.2/colors/mod.ts
  59. +1 −0 deno/deps/deps/https/raw.githubusercontent.com/denoland/deno_std/v0.3.2/colors/mod.ts.headers.json
  60. +3 −0 deno/deps/deps/https/raw.githubusercontent.com/denoland/deno_std/v0.3.2/fs/path.ts
  61. +1 −0 deno/deps/deps/https/raw.githubusercontent.com/denoland/deno_std/v0.3.2/fs/path.ts.headers.json
  62. +52 −0 deno/deps/deps/https/raw.githubusercontent.com/denoland/deno_std/v0.3.2/fs/path/constants.ts
  63. +1 −0 ...s/deps/https/raw.githubusercontent.com/denoland/deno_std/v0.3.2/fs/path/constants.ts.headers.json
  64. +27 −0 deno/deps/deps/https/raw.githubusercontent.com/denoland/deno_std/v0.3.2/fs/path/interface.ts
  65. +1 −0 ...s/deps/https/raw.githubusercontent.com/denoland/deno_std/v0.3.2/fs/path/interface.ts.headers.json
  66. +1,431 −0 deno/deps/deps/https/raw.githubusercontent.com/denoland/deno_std/v0.3.2/fs/path/mod.ts
  67. +1 −0 deno/deps/deps/https/raw.githubusercontent.com/denoland/deno_std/v0.3.2/fs/path/mod.ts.headers.json
  68. +135 −0 deno/deps/deps/https/raw.githubusercontent.com/denoland/deno_std/v0.3.2/http/http_status.ts
  69. +1 −0 ...ps/deps/https/raw.githubusercontent.com/denoland/deno_std/v0.3.2/http/http_status.ts.headers.json
  70. +341 −0 deno/deps/deps/https/raw.githubusercontent.com/denoland/deno_std/v0.3.2/http/server.ts
  71. +1 −0 deno/deps/deps/https/raw.githubusercontent.com/denoland/deno_std/v0.3.2/http/server.ts.headers.json
  72. +467 −0 deno/deps/deps/https/raw.githubusercontent.com/denoland/deno_std/v0.3.2/io/bufio.ts
  73. +1 −0 deno/deps/deps/https/raw.githubusercontent.com/denoland/deno_std/v0.3.2/io/bufio.ts.headers.json
  74. +43 −0 deno/deps/deps/https/raw.githubusercontent.com/denoland/deno_std/v0.3.2/io/util.ts
  75. +1 −0 deno/deps/deps/https/raw.githubusercontent.com/denoland/deno_std/v0.3.2/io/util.ts.headers.json
  76. +15 −0 deno/deps/deps/https/raw.githubusercontent.com/denoland/deno_std/v0.3.2/strings/strings.ts
  77. +1 −0 ...eps/deps/https/raw.githubusercontent.com/denoland/deno_std/v0.3.2/strings/strings.ts.headers.json
  78. +298 −0 deno/deps/deps/https/raw.githubusercontent.com/denoland/deno_std/v0.3.2/testing/asserts.ts
  79. +1 −0 ...eps/deps/https/raw.githubusercontent.com/denoland/deno_std/v0.3.2/testing/asserts.ts.headers.json
  80. +205 −0 deno/deps/deps/https/raw.githubusercontent.com/denoland/deno_std/v0.3.2/testing/diff.ts
  81. +1 −0 deno/deps/deps/https/raw.githubusercontent.com/denoland/deno_std/v0.3.2/testing/diff.ts.headers.json
  82. +542 −0 deno/deps/deps/https/raw.githubusercontent.com/denoland/deno_std/v0.3.2/testing/format.ts
  83. +1 −0 ...deps/deps/https/raw.githubusercontent.com/denoland/deno_std/v0.3.2/testing/format.ts.headers.json
  84. +82 −0 deno/deps/deps/https/raw.githubusercontent.com/denoland/deno_std/v0.3.2/testing/pretty.ts
  85. +1 −0 ...deps/deps/https/raw.githubusercontent.com/denoland/deno_std/v0.3.2/testing/pretty.ts.headers.json
  86. +150 −0 deno/deps/deps/https/raw.githubusercontent.com/denoland/deno_std/v0.3.2/textproto/mod.ts
  87. +1 −0 .../deps/deps/https/raw.githubusercontent.com/denoland/deno_std/v0.3.2/textproto/mod.ts.headers.json
  88. +1 −0 deno/deps/https/deno.land/std/colors/mod.ts.headers.json
  89. +1 −0 deno/deps/https/deno.land/std/testing/asserts.ts.headers.json
  90. +1 −0 deno/deps/https/deno.land/std/testing/diff.ts.headers.json
  91. +1 −0 deno/deps/https/deno.land/std/testing/format.ts.headers.json
  92. +1 −0 deno/deps/https/deno.land/std/testing/mod.ts.headers.json
  93. +1 −0 deno/deps/https/deno.land/x/expect/mod.ts.headers.json
  94. +121 −0 deno/deps/https/raw.githubusercontent.com/allain/expect/expect.ts
  95. +119 −0 deno/deps/https/raw.githubusercontent.com/allain/expect/master/expect.ts
  96. +1 −0 deno/deps/https/raw.githubusercontent.com/allain/expect/master/expect.ts.headers.json
  97. +569 −0 deno/deps/https/raw.githubusercontent.com/allain/expect/master/matchers.ts
  98. +1 −0 deno/deps/https/raw.githubusercontent.com/allain/expect/master/matchers.ts.headers.json
  99. +52 −0 deno/deps/https/raw.githubusercontent.com/allain/expect/master/mock.ts
  100. +1 −0 deno/deps/https/raw.githubusercontent.com/allain/expect/master/mock.ts.headers.json
  101. +11 −0 deno/deps/https/raw.githubusercontent.com/allain/expect/master/mod.ts
  102. +1 −0 deno/deps/https/raw.githubusercontent.com/allain/expect/master/mod.ts.headers.json
  103. +273 −0 deno/deps/https/raw.githubusercontent.com/allain/expect/mod.ts
  104. +136 −0 deno/deps/https/raw.githubusercontent.com/denoland/deno_std/master/colors/mod.ts
  105. +1 −0 deno/deps/https/raw.githubusercontent.com/denoland/deno_std/master/colors/mod.ts.headers.json
  106. +319 −0 deno/deps/https/raw.githubusercontent.com/denoland/deno_std/master/testing/asserts.ts
  107. +1 −0 deno/deps/https/raw.githubusercontent.com/denoland/deno_std/master/testing/asserts.ts.headers.json
  108. +222 −0 deno/deps/https/raw.githubusercontent.com/denoland/deno_std/master/testing/diff.ts
  109. +1 −0 deno/deps/https/raw.githubusercontent.com/denoland/deno_std/master/testing/diff.ts.headers.json
  110. +544 −0 deno/deps/https/raw.githubusercontent.com/denoland/deno_std/master/testing/format.ts
  111. +1 −0 deno/deps/https/raw.githubusercontent.com/denoland/deno_std/master/testing/format.ts.headers.json
  112. +259 −0 deno/deps/https/raw.githubusercontent.com/denoland/deno_std/master/testing/mod.ts
  113. +1 −0 deno/deps/https/raw.githubusercontent.com/denoland/deno_std/master/testing/mod.ts.headers.json
  114. +85 −0 deno/deps/https/raw.githubusercontent.com/denoland/deno_std/master/testing/pretty.ts
  115. +1 −0 deno/deps/https/raw.githubusercontent.com/denoland/deno_std/master/testing/pretty.ts.headers.json
  116. +104 −201 src/Either.ts → either.ts
  117. +24 −39 src/EitherAsync.ts → either_async.ts
  118. +94 −0 either_async_test.ts
  119. +186 −0 either_test.ts
  120. +13 −13 src/Function.ts → function.ts
  121. +26 −26 src/List.ts → list.ts
  122. +70 −0 list_test.ts
  123. +115 −201 src/Maybe.ts → maybe.ts
  124. +22 −33 src/MaybeAsync.ts → maybe_async.ts
  125. +79 −0 maybe_async_test.ts
  126. +203 −0 maybe_test.ts
  127. +8 −0 mod.ts
  128. +17 −15 src/NonEmptyList.ts → non_empty_list.ts
  129. +52 −0 non_empty_list_test.ts
  130. +0 −10 publish.ps1
  131. +0 −7 site/.gitignore
  132. +0 −5 site/.prettierrc
  133. +0 −22 site/LICENSE
  134. +0 −26 site/README.md
  135. +0 −20 site/gatsby-config.js
  136. BIN site/images/favicon.png
  137. +0 −12,482 site/package-lock.json
  138. +0 −33 site/package.json
  139. +0 −164 site/src/components/DataTypeContent.js
  140. +0 −175 site/src/components/DataTypeMethod.js
  141. +0 −10 site/src/components/HL.js
  142. +0 −54 site/src/components/HamburgerMenu.js
  143. +0 −23 site/src/components/Meta.js
  144. +0 −92 site/src/components/Sidebar.js
  145. +0 −49 site/src/components/SidebarLink.js
  146. +0 −109 site/src/components/TypeclassContent.js
  147. +0 −91 site/src/components/UtilContent.js
  148. +0 −13 site/src/components/layout.css
  149. +0 −46 site/src/components/layout.js
  150. +0 −1,803 site/src/data.tsx
  151. +0 −4 site/src/pages/adts/Either.js
  152. +0 −6 site/src/pages/adts/EitherAsync.js
  153. +0 −4 site/src/pages/adts/Maybe.js
  154. +0 −6 site/src/pages/adts/MaybeAsync.js
  155. +0 −6 site/src/pages/adts/NonEmptyList.js
  156. +0 −4 site/src/pages/adts/Tuple.js
  157. +0 −68 site/src/pages/changelog.js
  158. +0 −172 site/src/pages/changelog/0.11.js
  159. +0 −150 site/src/pages/changelog/0.12.js
  160. +0 −74 site/src/pages/faq.js
  161. +0 −77 site/src/pages/getting-started.js
  162. +0 −160 site/src/pages/guides/maybe-api-guide.js
  163. +0 −106 site/src/pages/guides/maybeasync-eitherasync-for-haskellers.js
  164. +0 −225 site/src/pages/index.js
  165. +0 −4 site/src/pages/utils/Function.js
  166. +0 −4 site/src/pages/utils/List.js
  167. +0 −14 site/tsconfig.json
  168. +0 −9,702 site/yarn.lock
  169. +0 −212 src/Either.test.ts
  170. +0 −93 src/EitherAsync.test.ts
  171. +0 −68 src/List.test.ts
  172. +0 −223 src/Maybe.test.ts
  173. +0 −77 src/MaybeAsync.test.ts
  174. +0 −50 src/NonEmptyList.test.ts
  175. +0 −84 src/Tuple.test.ts
  176. +15 −0 test.ps1
  177. +13 −0 test.sh
  178. +5 −16 tsconfig.json
  179. +0 −34 src/Tuple.ts → tuple.ts
  180. +71 −0 tuple_test.ts
  181. +0 −3,760 yarn.lock
@@ -0,0 +1,11 @@
environment:
DENO_DIR: $(APPVEYOR_BUILD_FOLDER)\deno

install:
- ps: iex (iwr https://deno.land/x/install/install.ps1)

build: off
shallow_clone: true

test_script:
- cmd: powershell -file ./test.ps1
@@ -1,8 +1 @@
node_modules
lib
yarn-error.log
documentation
coverage
**/*.d.ts
.cache
dist
deno/gen
@@ -1,4 +1,7 @@
language: node_js
node_js:
- '8'
script: npm test
os:
- linux
- osx

before_script: curl -sL https://deno.land/x/install/install.sh | sh

script: PATH=$HOME/.deno/bin:$PATH ./test.sh
1 .vimrc
@@ -0,0 +1 @@
set ts=2 sw=2
@@ -1,48 +1,12 @@
<h3 align="center">
<img align="center" src="assets/logo.png" alt="Purify logo" width="112" />
</h3
deno-purify
===========

<p align="center">
<a href="https://travis-ci.org/gigobyte/purify">
<img src="https://travis-ci.org/gigobyte/purify.svg?branch=master" alt="Build Status">
</a>
</p>
[![Travis](http://img.shields.io/travis/aynik/deno-purify.svg?style=flat)](http://travis-ci.org/aynik/deno-purify) [![AppVeyor](https://ci.appveyor.com/api/projects/status/github/aynik/deno-purify?branch=master&svg=true)](https://ci.appveyor.com/project/aynik/deno-purify)

# What is purify?
A [deno](https://github.com/denoland/deno) port of [purify-ts](https://github.com/gigobyte/purify).

Purify is a library for functional programming in TypeScript.
It's purpose is to allow developers to use popular patterns and abstractions that are available in most functional languages.
It is also <a href="https://github.com/fantasyland/fantasy-land">Fantasy Land</a> conformant.
---

# Core values
License

- **Elegant and developer-friendly API** - purify's design decisions are made with developer experience in mind. Purify doesn't try to change how you write TypeScript, instead it provides useful tools for making your code easier to read and maintain without resolving to hacks or scary type definitions.

- **Type-safety** - While purify can be used in vanilla JavaScript, it's entirely written with TypeScript and type safety in mind. While TypeScript does a great job at preventing runtime errors, purify goes a step further and provides utility functions for working with native objects like arrays in a type-safe manner.

- **Emphasis on practical code** - Higher-kinded types and other type-level features would be great additions to this library, but as of right now they don't have reasonable implementations in TypeScript. Purify focuses on being a library that you can include in any TypeScript project and favors instance methods instead of functions, clean and readable type definitions instead of advanced type features and a curated API instead of trying to port over another language's standard library.

# How to start?

Purify is available as a package on npm. You can install it with a package manager of your choice:

```
$ npm install purify-ts
```

or

```
$ yarn add purify-ts
```

# Documentation

You can find the documentation on the [official site](https://gigobyte.github.io/purify/).

# Inspired by

- [Haskell](https://haskell-lang.org/)
- [Arrow - Functional companion to Kotlin's Standard Library](http://arrow-kt.io/)
- [fp-ts - Functional programming in TypeScript](https://github.com/gcanti/fp-ts)
- [typical - playground for type-level primitives in TypeScript](https://github.com/tycho01/typical/)
[purify-ts](https://github.com/gigobyte/purify) is licensed under the [ISC License](https://raw.githubusercontent.com/aynik/deno-purify/master/LICENSE).
BIN -22.5 KB assets/logo.png
Binary file not shown.

0 comments on commit 270886b

Please sign in to comment.
You can’t perform that action at this time.