@sharyn/server
[![npm](https://img.shields.io/npm/v/@sharyn/server.svg)](https://www.npmjs.com/package/@sharyn/server)
Last updated a month ago by sharyn .
MIT · Repository · Original npm · Tarball · package.json
$ cnpm install @sharyn/server 
SYNC missed versions from official npm registry.

???? @sharyn/server

npm

This package provides server-side helpers.

???? Install

yarn add @sharyn/server

???? Usage

htmlBase

import { htmlBase } from '@sharyn/server'

const windowVarPairs = [
  ['__A__', { a: "<script>alert('xss')</script>" }],
  ['__B__', 'plop'],
  ['__C__', true],
  ['__D__', 666],
]

console.log(htmlBase(windowVarPairs))

/*
<!doctype html>
<html>
  <head>
    <meta charset="utf-8">
  </head>
  <body>
    <div id="app"></div>
    <script>window.__A__ = {"a":"\\u003Cscript\\u003Ealert('xss')\\u003C\\u002Fscript\\u003E"}</script>
    <script>window.__B__ = "plop"</script>
    <script>window.__C__ = true</script>
    <script>window.__D__ = 666</script>
    <script src="/static/js/bundle.js"></script>
</html>
*/

Options

The second argument is a custom app-root ID.

Current Tags

  • 6.1.8                                ...           latest (a month ago)

105 Versions

  • 6.1.8                                ...           a month ago
  • 6.1.7                                ...           a month ago
  • 6.1.6                                ...           2 months ago
  • 6.1.5                                ...           2 months ago
  • 6.1.4                                ...           2 months ago
  • 6.1.3                                ...           2 months ago
  • 6.1.2                                ...           3 months ago
  • 6.1.1                                ...           3 months ago
  • 6.1.0                                ...           3 months ago
  • 6.0.7                                ...           3 months ago
  • 6.0.6                                ...           3 months ago
  • 6.0.5                                ...           4 months ago
  • 6.0.4                                ...           4 months ago
  • 6.0.3                                ...           4 months ago
  • 6.0.2                                ...           4 months ago
  • 6.0.1                                ...           4 months ago
  • 6.0.0                                ...           4 months ago
  • 5.1.14                                ...           5 months ago
  • 5.1.13                                ...           5 months ago
  • 5.1.12                                ...           5 months ago
  • 5.1.11                                ...           5 months ago
  • 5.1.10                                ...           5 months ago
  • 5.1.9                                ...           5 months ago
  • 5.1.8                                ...           5 months ago
  • 5.1.7                                ...           8 months ago
  • 5.1.6                                ...           10 months ago
  • 5.1.5                                ...           10 months ago
  • 5.1.4                                ...           10 months ago
  • 5.1.3                                ...           10 months ago
  • 5.1.2                                ...           a year ago
  • 5.1.1                                ...           a year ago
  • 5.1.0                                ...           a year ago
  • 5.0.3                                ...           a year ago
  • 5.0.1                                ...           a year ago
  • 5.0.0                                ...           a year ago
  • 5.0.0-alpha.2                                ...           a year ago
  • 5.0.0-alpha.1                                ...           a year ago
  • 5.0.0-alpha.0                                ...           a year ago
  • 4.2.17                                ...           a year ago
  • 4.2.16                                ...           a year ago
  • 4.2.15                                ...           a year ago
  • 4.2.14                                ...           a year ago
  • 4.2.13                                ...           a year ago
  • 4.2.12                                ...           a year ago
  • 4.2.11                                ...           a year ago
  • 4.2.10                                ...           a year ago
  • 4.2.9                                ...           a year ago
  • 4.2.8                                ...           a year ago
  • 4.2.7                                ...           a year ago
  • 4.2.6                                ...           a year ago
  • 4.2.5                                ...           a year ago
  • 4.2.4                                ...           a year ago
  • 4.2.2                                ...           a year ago
  • 4.2.1                                ...           a year ago
  • 4.2.0                                ...           a year ago
  • 4.1.1                                ...           a year ago
  • 4.0.0                                ...           a year ago
  • 4.0.0-alpha.0                                ...           a year ago
  • 3.4.2                                ...           a year ago
  • 3.4.1                                ...           a year ago
  • 3.4.0                                ...           a year ago
  • 3.3.5                                ...           a year ago
  • 3.3.4                                ...           a year ago
  • 3.3.3                                ...           a year ago
  • 3.3.2                                ...           a year ago
  • 3.3.1                                ...           a year ago
  • 3.3.0                                ...           a year ago
  • 3.2.4                                ...           a year ago
  • 3.2.3                                ...           a year ago
  • 3.2.2                                ...           a year ago
  • 3.2.1                                ...           a year ago
  • 3.2.0                                ...           a year ago
  • 3.1.0                                ...           a year ago
  • 3.0.3                                ...           a year ago
  • 3.0.2                                ...           a year ago
  • 3.0.1                                ...           a year ago
  • 3.0.0                                ...           a year ago
  • 2.8.4                                ...           a year ago
  • 2.8.3                                ...           a year ago
  • 2.8.2                                ...           a year ago
  • 2.8.0                                ...           a year ago
  • 2.7.1                                ...           a year ago
  • 2.7.0                                ...           a year ago
  • 2.6.5                                ...           a year ago
  • 2.6.4                                ...           a year ago
  • 2.6.3                                ...           a year ago
  • 2.6.2                                ...           a year ago
  • 2.6.1                                ...           a year ago
  • 2.6.0                                ...           a year ago
  • 2.5.0                                ...           a year ago
  • 2.4.1                                ...           a year ago
  • 2.4.0                                ...           a year ago
  • 2.3.1                                ...           a year ago
  • 2.3.0                                ...           a year ago
  • 2.2.0                                ...           a year ago
  • 2.1.0                                ...           a year ago
  • 2.0.0                                ...           a year ago
  • 1.2.2                                ...           a year ago
  • 1.2.1                                ...           a year ago
  • 1.2.0                                ...           a year ago
  • 1.1.2                                ...           a year ago
  • 1.1.0                                ...           a year ago
  • 1.0.1                                ...           a year ago
  • 1.0.0                                ...           a year ago
  • 0.0.1                                ...           a year ago
Maintainers (1)
Downloads
Today 0
This Week 105
This Month 105
Last Day 0
Last Week 0
Last Month 60
Dev Dependencies (0)
None

Copyright 2014 - 2016 © taobao.org |