@putout/operator-wasm
🐊Putout operator adds ability to work with wasm
Last updated 5 months ago by coderaiser .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ npm install @putout/operator-wasm 
SYNC missed versions from official npm registry.

@putout/operator-wasm NPM version

🐊Putout operator adds ability to lint wasm.

Install

npm i putout @putout/operator-wasm

API

__wasm

import {operator} from 'putout';

const {__wasm} = operator;

export const traverse = ({push}) => ({
    [__wasm]: push,
});

wrapInNamespace(source: string, name?: string);

import {montag} from 'montag';
import {operator} from 'putout';

const {wrapInNamespace} = operator;

wrapInNamespace(montag`
    export function add(a: i32, b: i32) {
        i32.add(get.local(b), get.local(a));
    }
`);
// returns
`namespace __putout_processor_wasm {
    export function add(a: i32, b: i32) {
        i32.add(get.local(b), get.local(a));
    }
}`;

unwrapNamespace(source: string, name?: string);

import {montag} from 'montag';
import {operator} from 'putout';

const {unwrapNamespace} = operator;

unwrapNamespace(montag`
    namespace __putout_processor_wasm {
        export function add(a: i32, b: i32) {
            i32.add(get.local(b), get.local(a));
        }
    }
`);
// returns
`export function add(a: i32, b: i32) {
    i32.add(get.local(b), get.local(a));
}`;

License

MIT

Current Tags

  • 1.0.0                                ...           latest (5 months ago)

1 Versions

  • 1.0.0                                ...           5 months ago
Maintainers (1)
Downloads
Total 3
Today 0
This Week 1
This Month 3
Last Day 0
Last Week 1
Last Month 0
Dependencies (1)
Dev Dependencies (8)
Dependents (1)

© 2010 - cnpmjs.org x YWFE | Home | YWFE