{
  "name": "nrepl-client",
  "version": "0.2.3",
  "description": "node client to interact with a Clojure nREPL server.",
  "main": "src/nrepl-client.js",
  "scripts": {
    "test": "node_modules/nodeunit/bin/nodeunit tests/tests.js --reporter minimal"
  },
  "keywords": [
    "Clojure",
    "ClojureScript",
    "nREPL",
    "live programming"
  ],
  "author": {
    "name": "Robert Krahn"
  },
  "contributors": [
    {
      "name": "Stuart Mitchell",
      "email": "stu@stuartmitchell.com"
    }
  ],
  "license": "MIT",
  "dependencies": {
    "bencode": "~0.4.3",
    "tree-kill": "~0.0.6"
  },
  "devDependencies": {
    "async": "~0.2",
    "nodeunit": "~0.8"
  },
  "readme": "# node.js nREPL client [![Build Status](https://travis-ci.org/rksm/node-nrepl-client.png?branch=master)](https://travis-ci.org/rksm/node-nrepl-client)\n\nConnects node.js as a nrepl client to a [Clojure nrepl server](https://github.com/clojure/tools.nrepl).\n\nThis is different from [cljs-noderepl](https://github.com/bodil/cljs-noderepl)\nand similar projects as it *does not connect node.js as the repl \"target\"* (so\nthat a nrepl Clojure client can eval code in a JS context) *but the other way\naround* ;)\n\n\n## Usage\n\nTo connect to a running nREPL server and send and receive an eval request do:\n\n```js\nvar nreplClient = require('nrepl-client');\nnreplClient.connect({port: 7889}).once('connect', function() {\n    var expr = '(+ 3 4)';\n    client.eval(expr, function(err, result) {\n        console.log('%s => ', expr, err || result);\n        client.end();\n    });\n});\n```\n\nFor a more detailed example and to use node.js also to start an nREPL Clojure\nprocess see [examples/simple-connect.js]().\n```\n\n## API\n\n### `nrepl-client`\n\n* `connect(options)`\n  * Creates a [`net.Socket`](http://nodejs.org/api/net.html#net_class_net_socket)\n    connection to an nREPL server. The connection object itself will have added\n    methods, see below.\n  * `options`: options from the [`net.connect`](http://nodejs.org/api/net.html#net_net_connect_options_connectionlistener) call.\n  * returns a `net.Socket` clojure connection\n\n* clojure connection\n  * Wraps [nREPL messages](https://github.com/clojure/tools.nrepl#messages).\n  * `clone([session,] callback)\n  * `close([session,] callback)\n  * `describe([verbose,] callback)\n  * `eval(code, [session, id, evalFunc,] callback)\n  * `interrupt(session, id, callback)\n  * `loadFile(fileContent, [fileName, filePath,] callback)\n  * `lsSessions(callback)\n  * `stdin(stdin, callback)\n  * `send(msgObj, callback)` sends a custom message\n\n### `nrepl-client/nrepl-server`\n\n* `start(options, callback)`\n  * `options` options for configuring the nREPL server. Optional. `options == {startTimeout: NUMBER, verbose: BOOL, projectPath: STRING, hostname: STRING, port: NUMBER}`. See [nrepl-server.js](src/nrepl-server.js) for defaults.\n  * `callback(err, serverState)` function called when the server is started. `serverState == {proc: PROCESS, hostname: STRING, port: NUMBER, started: BOOL, exited: BOOL, timedout: BOOL}`\n\n* `stop(serverState, callback)`\n  * `serverState` serverState returned from start\n  * `callback(err)` function called when the server is stopped\n",
  "readmeFilename": "README.md",
  "_id": "nrepl-client@0.2.3",
  "dist": {
    "shasum": "283e1e8df04187b38e9594c8d60de279cca059c1"
  },
  "_resolved": "git://github.com/rksm/node-nrepl-client.git#eb6b3eda70e57c50551ef7087c83ce15b016bf83",
  "_from": "nrepl-client@git://github.com/rksm/node-nrepl-client.git#master"
}
