eval
Evaluate expressions to import
This module evaluates the URL hash it receives and exports it.
Getting started
import Deno from 'https://deno.land/x/evil/mod.ts?eval=Deno';Developing
Built With
This JavaScript module has no dependencies.
Prerequisites
Before starting to develop you need to have the latest Deno version installed.
Setting up Dev
In order to start developing the project further git-clone this respository:
git clone git@github.com:PascalSalesch/eval.git
cd eval/
deno run ./mod.jsBy cloning this repository you’re downloading all assets hosted on github.
When deno run ./mod.js will executed the code in mod.js.
Building
This package requires no build step. If it had any dependencies these could be bundled.
deno bundle 'https://deno.land/x/evil/mod.ts' eval.bundle.jsDeploying / Publishing
The package is deployed to deno.land/x/evil. In short, a git tag must be pushed.
git tag -a 1.0.3 -m "v1.0.3"
git push origin 1.0.3Versioning
We are using SemVer for versioning in order to conform to deno.land/x requirements.
Configuration
The package evaluates either the hash or the query string.
| Value | Example | Description |
|---|---|---|
| Hash | deno.land/x/evil/mod.ts#Deno |
The module tries to evaluate Deno.⚠️ The redirect to the latest version will omit the hash |
| eval parameter | deno.land/x/evil/mod.ts?eval=Deno |
The module tries to evaluate Deno |
| async parameter | deno.land/x/evil/mod.ts?async=true&eval=1+1 |
Setting async to true will await an async function |
Tests
A few small tests reside in test.js.
Style Guide
Follow the Deno Style Guide. Lint with the following command:
deno fmt mod.jsApi Reference
Deno
The module exports the expression to default:
import Deno from 'deno.land/x/evil/mod.ts?eval=Deno';Licensing
All rights reserved. MIT license.