JSPM

@zaeny/expose

1.0.0
  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 2
  • Score
    100M100P100Q44236F
  • License ISC

Utility Functions working with repl node.js, exposing function into global variable repl

Package Exports

  • @zaeny/expose
  • @zaeny/expose/index.js

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (@zaeny/expose) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

@zaeny/Expose

npm version npm downloads

Define and Expose REPL utiltiy

Utility Functions working with repl node.js, exposing function into global variable repl

Getting started

npm i @zaeny/expose

Usage

type node to create nodejs repl then type

var {expose, evaluate, define} = require('@zaeny/expose');

using it

 // all varibale available in globally to invoke
define('@zaeny/clojure.core');  // {map, filter, reduce, flatten, assoc, ....}

// exposing single files exposets into global avialbe in  repl
expose('./search/routes.js'); // all exported funciton declared here available to repl

//exposing all files in the directory
expose('./search/functions/'); // find all avaialable .js file in this directory and export it to global

// evaluate to repl keep preserving repl context
evaluate()(fs.readFileSync('./state.js', 'utf8'));

API

define,
expose,
evaluate
  • Composable - Collection of functions to solve programming problem

Changes

  • [1.0.0] add expose define and evaluate