An open API service indexing awesome lists of open source software.

https://github.com/wmxpy/barklang

:dog: If there are no dogs in Heaven, then when I die I want to go where they went.
https://github.com/wmxpy/barklang

ast bark barklang typescript

Last synced: about 1 year ago
JSON representation

:dog: If there are no dogs in Heaven, then when I die I want to go where they went.

Awesome Lists containing this project

README

          

# Barklang

[![npm version](https://badge.fury.io/js/bkc.svg)](https://www.npmjs.com/package/bkc)
[![Build Status](https://travis-ci.org/WMXPY/Barklang.svg?branch=master)](https://travis-ci.org/WMXPY/Barklang)
[![codecov](https://codecov.io/gh/WMXPY/Barklang/branch/master/graph/badge.svg)](https://codecov.io/gh/WMXPY/Barklang)
[![Gitter](https://badges.gitter.im/WMXPY/Barklang.svg)](https://gitter.im/Barklang?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge)
[![downloads](https://img.shields.io/npm/dm/bkc.svg)](https://www.npmjs.com/package/bkc)

:dog: If there are no dogs in Heaven, then when I die I want to go where they went.

bkc is a simple programming language, based on javascript. All bkc lang will run in a sandbox environment, so bkc is safe for untrust user input.

## Install

```bash
npm install bkc --save
```

You can use bkc in nodeJS environment or browser (commonjs)

## Usage

Use bkc without external function.

```js
import bkc from 'bkc';
// es5
const bkc = require('bkc').default;

bkc("print 'hello world!'"); // hello world!
```

Use bkc with an external function.

```js
import bkc from 'bkc';
// es5
const bkc = require('bkc').default;

bkc("hello 'hello world!'", [
{
command: 'hello',
func: (arg) => {
console.log(arg);
}
}
]); // hello world!
```

## Documents

- [Grammar and example](https://github.com/WMXPY/bkc/blob/master/docs/bkc.md)
- [Develop](https://github.com/WMXPY/bkc/blob/master/docs/develop.md)

> Created by [Ghoti-CLI](https://github.com/WMXPY/Ghoti-CLI/) 3.3.8