1.0.1 • Published 7 years ago

sush-plugin-add-object v1.0.1

Weekly downloads
3
License
MIT
Repository
github
Last release
7 years ago

sush-plugin-add-object

NPM

standard-readme compliant npm

Add object to URL list

Table of Contents

Install

For HTML

Insert script tags in your HTML.

<script src="https://unpkg.com/sush"></script>
<script src="https://unpkg.com/sush-plugin-add-object"></script>
<!-- Add script tags of SUSH Plugins -->

Via Node.js

npm install --save sush sush-plugin-add-object [...SUSH_PLUGINS]

Usage

Via HTML

<!DOCTYPE html>
<html>
<head>
  <script src="https://unpkg.com/sush"></script>
  <script src="https://unpkg.com/sush-plugin-add-object"></script>
  <script src="https://unpkg.com/sush-plugin-redirect"></script>
  <script>
    var sush = new SUSH();

    sush.flow([
      SUSH.$addObject({
        'hashstr': 'https://redirect.example'
      }),
      SUSH.$redirect()
    ]);
  </script>
</head>
</html>

Via Node.js (e.g. Browserify, Webpack)

import SUSH from 'sush';
import addObject from 'sush-plugin-add-object';
import redirect from 'sush-plugin-redirect';

sush.flow([
  addObject({
    'hashstr': 'https://redirect.example'
  }),
  redirect()
]);

Contribute

PRs accepted.

License

MIT © 3846masa