@panosoft/elm-native-helpers

0.1.10 • Public • Published

Elm Native Helpers

Helper functions for creating Native Elm code

Install

npm install @panosoft/elm-native-helpers

Usage

const E = {
	A2: A2,
	A3: A3,
	A4: A4,
	Scheduler: {
		nativeBinding: _elm_lang$core$Native_Scheduler.nativeBinding,
		succeed:  _elm_lang$core$Native_Scheduler.succeed,
		rawSpawn: _elm_lang$core$Native_Scheduler.rawSpawn
	}
};
const helper = require('@panosoft/elm-native-helpers/helper')(E);

Scoping

Normally, Elm code is all in the global space. But when run in Node, the Elm code gets brought in via the require function. This creates a private scope for Elm.

Since this package calls some Elm global functions, we need to pass them in from our Native code. That's why E is passed in.

Readme

Keywords

none

Package Sidebar

Install

npm i @panosoft/elm-native-helpers

Weekly Downloads

0

Version

0.1.10

License

Unlicense

Last publish

Collaborators

  • panosoft