open-index/open-npm huggingface dataset:
npm package: @js-npm/exports
Description: Easy data exports to your client-side scripts.
Author: Alex
Latest version: 0.1.2

[![Travis Build Status](https://secure.travis-ci.org/vesln/exports.png)](http://travis-ci.org/npm-js/exports)
[![Node.js CI Actions Status](https://github.com/npm-js/exports/workflows/node.js/badge.svg)](https://github.com/npm-js/exports/actions)

# exports 

## Description

Easy data exports to your client-side scripts for your express based app.

## Synopsis

```javascript

const express = require('express');
const exports = require('exports');

const app = express.createServer();

app.dynamicHelpers({
  include_exports: exports.helper('App') // App is the namespace.
});

exports.set('title', 'I am awesome.'); // Global export.

app.get('/', [exports.middleware], function(req, res) {
  res.exports.random = Math.random(); // Export per request.
  res.rend('index');
});

```

layout.jade:

```
!!!
html
  head
    != include_exports
  body!= body
```

Result:

```html
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head>

<script type="text/javascript">
  const App = {"title": "I am awesome.", "random": 0.27449309756048024};
</script>

</head>
<body></body>
</html>
```

## Requirements

- NPM (http://npmjs.org/)
- Node.js 12.0 (http://nodejs.org/)

## Install

```
npm install @js-npm/exports 
```

## Tests

```
npm install
make test
```

## License

Apache License

Copyright (c) 2020 Alex <alex@webz.asia>

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
 
    http://www.apache.org/licenses/LICENSE-2.0
 
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
npm package: @js-npm/super
Description: Extend everything.
Author: Alex
Latest version: 0.3.6

[![Travis Build Status](https://secure.travis-ci.org/npm-js/super.png)](http://travis-ci.org/npm-js/super)
[![Node.js CI Actions Status](https://github.com/npm-js/super/workflows/node.js/badge.svg)](https://github.com/npm-js/super/actions)

# super

## Installation

Super is available for both server-side and the browser.

### Node.js

Package is available through [npm](http://npmjs.org):
```
npm install @js-npm/super
```

## Getting Started

It can be used is a replacement for node's `util.inherits`. Especially useful when building
modules for both node and the browser.

```javascript
const inherits = require('super');

// Classes, actually it uses util.inherits.

const EventEmitter = require('events').EventEmitter;
function Foo() {};

inherits(Foo, EventEmitter);
let foo = new Foo;

console.log(foo instanceof EventEmitter); // true
console.log(Foo.super_ == EventEmitter); // true
```

It can also be used for simple merging or cloning of objects.

```javascript
// merge
const   foo = { bar: 'baz' },
        bar = { foo: 3 },
        baz = inherits(bar, foo);

console.log(baz);

// clone
const   bar = { foo: 3 },
        barClone = clone(bar);
```

And finally, it also provides a helper that will allow for object to easily be
extended, similiar to the style in Backbone.js.

```javascript
function Foo () {
  this._constructed = true;
  if (this.initialize) this.initialize();
}

Foo.extend = inherits.extend;

const Bar = Foo.extend({
  initialize: function () {
    this._isBar = true;
  }
});

const   foo = new Foo(),
        bar = new Bar();

console.log(foo._constructed); // true
console.log(bar._constructed); // true
console.log(foo._isBar); // undefined
console.log(bar._isBar); // true
```

## Tests

All:

```
make test
```

Node:

```
make test-node
```

Browser:

```
make test-browser
```

Test coverage:

```
make coverage
```

## License

Apache License

Copyright (c) 2020 Alex <alex@webz.asia>

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
 
    http://www.apache.org/licenses/LICENSE-2.0
 
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.