https://github.com/daviddesimone/ng-oldschool
elisp bindings for common Deno functions
https://github.com/daviddesimone/ng-oldschool
Last synced: 15 days ago
JSON representation
elisp bindings for common Deno functions
- Host: GitHub
- URL: https://github.com/daviddesimone/ng-oldschool
- Owner: DavidDeSimone
- License: mit
- Created: 2021-01-29T03:40:13.000Z (about 4 years ago)
- Default Branch: main
- Last Pushed: 2021-02-04T02:16:23.000Z (about 4 years ago)
- Last Synced: 2025-03-26T20:49:26.942Z (about 1 month ago)
- Language: JavaScript
- Size: 15.6 KB
- Stars: 5
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# ng-oldschool
elisp bindings for common Deno functionsBinds basic functions defined by [Deno](https://doc.deno.land/builtin/stable) for usage in emacs-ng. Converts most async functions defined on Deno into a lisp function with the name oldschool-name-in-kebab-case. I.e. Deno.watchFs becomes `(oldschool-watch-fs "file" 'callback)`.
This library also includes `fetch`, [documented here](https://developer.mozilla.org/en-US/docs/Web/API/Fetch_API)
Example:
```lisp
(oldschool-make-temp-file
(lambda (filename)
(oldschool-write-text-file filename "This is my Data!" (list :append t)
(lambda ()
(oldschool-read-text-file filename 'print)
(oldschool-lstat filename 'print)
(oldschool-real-path filename 'print)
)
)
))
```Further examples can be found in examples.el
Include this line in your init.el to start using it:
(eval-js "import 'https://deno.land/x/[email protected]/mod-oldschool.js'")
All credit to Deno for their API and examples.