# node-spider-script

> Load spider script as any javascript modules under nodeJS runtime.

Latest version **1.0.39** (published 2018-10-31) · Apache-2.0 license · 0 weekly downloads

> **Deprecated.** This package is deprecated.

## Install

```sh
npm install node-spider-script
pnpm add node-spider-script
yarn add node-spider-script
bun add node-spider-script
```

## Health

**Score 10/100 (F)** — status: deprecated.

Negative: deprecated.

## Facts

| | |
|---|---|
| Version | 1.0.39 |
| Published | 2018-10-31 |
| First published | 2014-11-22 |
| Weekly downloads | 0 |
| License | Apache-2.0 |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 2 |
| Unpacked size | 36 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 7 |
| Author | Sagie Gur-Ari |
| Maintainers | sagiegurari |
| Keywords | spider-script, require |

## Links

- npm: https://www.npmjs.com/package/node-spider-script
- Repository: https://github.com/sagiegurari/node-spider-script
- Homepage: http://github.com/sagiegurari/node-spider-script
- Issues: http://github.com/sagiegurari/node-spider-script/issues
- npm.io page: https://npm.io/package/node-spider-script

## Dependencies (2)

- [node.extend](https://npm.io/package/node.extend.md) ^2.0.1
- [spider-script](https://npm.io/package/spider-script.md) ^0.1.5

## Alternatives

- [@sindresorhus/slugify](https://npm.io/package/@sindresorhus/slugify.md) — 3.7M weekly downloads
- [solid-js](https://npm.io/package/solid-js.md) — 2.7M weekly downloads
- [expo-glass-effect](https://npm.io/package/expo-glass-effect.md) — 2.5M weekly downloads
- [nanoassert](https://npm.io/package/nanoassert.md) — 780.8K weekly downloads
- [@ffmpeg/ffmpeg](https://npm.io/package/@ffmpeg/ffmpeg.md) — 529.5K weekly downloads

## Recent versions

- 1.0.39 (latest) — 2018-10-31
- 1.0.38 — 2018-06-13
- 1.0.37 — 2018-05-01
- 1.0.36 — 2017-11-06
- 1.0.35 — 2017-06-26
- 1.0.34 — 2017-06-01
- 1.0.33 — 2017-05-01
- 1.0.32 — 2017-04-30
- 1.0.31 — 2017-04-30
- 1.0.30 — 2017-04-30
- 1.0.29 — 2017-04-26
- 1.0.28 — 2017-04-26
- 1.0.27 — 2017-04-24
- 1.0.26 — 2017-04-19
- 1.0.25 — 2017-04-17
- … 117 more at https://npm.io/package/node-spider-script/versions

## README

# node-spider-script

[![NPM Version](http://img.shields.io/npm/v/node-spider-script.svg?style=flat)](https://www.npmjs.org/package/node-spider-script) [![Build Status](https://travis-ci.org/sagiegurari/node-spider-script.svg)](http://travis-ci.org/sagiegurari/node-spider-script) [![Coverage Status](https://coveralls.io/repos/sagiegurari/node-spider-script/badge.svg)](https://coveralls.io/r/sagiegurari/node-spider-script) [![Inline docs](http://inch-ci.org/github/sagiegurari/node-spider-script.svg?branch=master)](http://inch-ci.org/github/sagiegurari/node-spider-script)<br>
[![License](https://img.shields.io/npm/l/node-spider-script.svg?style=flat)](https://github.com/sagiegurari/node-spider-script/blob/master/LICENSE) [![Total Downloads](https://img.shields.io/npm/dt/node-spider-script.svg?style=flat)](https://www.npmjs.org/package/node-spider-script) [![Dependency Status](https://david-dm.org/sagiegurari/node-spider-script.svg)](https://david-dm.org/sagiegurari/node-spider-script) [![devDependency Status](https://david-dm.org/sagiegurari/node-spider-script/dev-status.svg)](https://david-dm.org/sagiegurari/node-spider-script?type=dev)

> Load spider script as any javascript modules under nodeJS runtime.

* [Overview](#overview)
* [Usage](#usage)
* [Installation](#installation)
* [API Documentation](docs/api.md)
* [Contributing](.github/CONTRIBUTING.md)
* [Release History](#history)
* [License](#license)

<a name="overview"></a>
## Overview
Spider is a programming language that compiles to JavaScript. It takes the best ideas of Swift, Python, C# and CoffeeScript.

See [spiderlang.org](http://spiderlang.org/) for more information.

<a name="usage"></a>
## Usage
In order to use spider scripts under node, you need to first require this library as follows

```js
require('node-spider-script');
```

Now you can require your spider files like any other javascript files, for example:

```js
var jsModule = require('./my-test.spider');

var person = jsModule.create('my name');
var output = person.listen('my noise');
```

In your spider file, instead of doing module.exports, do return to the object you wish to export.

For example:

```js
return {
    create: fn(name) {
        return new Person(name);
    }
};
```

Full example (Spider):

```js
fn Person(name) {
  this.name = name;

  this.listen = fn (text) {
    return this.name + ' ' + text;
  };
}

return {
    create: fn(name) {
        return new Person(name);
    }
};
```

Full example (JavaScript):

```js
require('node-spider-script');

var jsModule = require('./my-test.spider');

var person = jsModule.create('my name');
var output = person.listen('my noise');
```

<a name="installation"></a>
## Installation
In order to use this library, just run the following npm install command:

```sh
npm install --save node-spider-script
```

## API Documentation
See full docs at: [API Docs](docs/api.md)

## Contributing
See [contributing guide](.github/CONTRIBUTING.md)

<a name="history"></a>
## Release History

| Date        | Version | Description |
| ----------- | ------- | ----------- |
| 2018-10-31  | v1.0.39 | Maintenance |
| 2015-02-06  | v0.0.20 | Grunt cleanups |
| 2014-12-07  | v0.0.16 | Minor internal changes |
| 2014-12-01  | v0.0.14 | Added continues integration support for the project |
| 2014-11-30  | v0.0.13 | Internal changes due to spider dependency changes |
| 2014-11-29  | v0.0.12 | Updated spider dependency |
| 2014-11-29  | v0.0.11 | Internal improvements |
| 2014-11-22  | v0.0.7  | JSDoc changes |
| 2014-11-22  | v0.0.6  | Fixed pure require approach |
| 2014-11-22  | v0.0.5  | Initial release |

<a name="license"></a>
## License
Developed by Sagie Gur-Ari and licensed under the Apache 2 open source license.

---
_Source: https://npm.io/package/node-spider-script · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
