Coder Social home page Coder Social logo

aijs's Introduction

Ai.js

javascriptからAiScriptに変換します。

使い方

まだインストールはできませんが直にできるようになります。

npm install @slofp/aijs

API

  • convert(sourceCode: string, options?: ConvertOption): Promise<string>

【引数】

  • sourceCode: string javascriptソースコード

  • options?: ConvertOption 変換時のオプション、なければ通常設定で変換されます

【返り値】

Promise<string> 変換されたAiScriptソースコード

【オプション型】

ConvertOption

  • minify?: boolean 変換コードのインデントなどをなくし小さくします。

  • meta?: MetaData AiScriptをMisskeyで使用するときのメタデータを指定できます。

  • insertVersion?: boolean AiScriptのバージョンをコード最上部に記述します。

MetaData

  • name?: string 名前

  • author?: string 作成者

  • version?: string バージョン

  • description?: string 説明

permissions?: Permissions[]; コードを使用するために必要な権限

  • config?: { [key: string]: Config } コンフィグ情報を定義します。 また、keyはstringを提示しますがAiScriptに則ったkeyでなければエラーになります。

Config

  • type: 'string' | 'number' | 'boolean' 設定値の型

  • label: string 設定で表示される名前

  • description: string 設定で表示される説明

  • default: string | number | boolean デフォルト値

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.