npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

eccentric

v1.0.7

Published

Javascript and HTML packed into one wrapper. Handle server code directly in your HTML, all behind the scenes.

Readme

Eccentric\r\nJavascript and HTML packed into one wrapper. Handle server code directly in your HTML, all behind the scenes.\r\n\r\n## Installation\r\n\r\nEccentric is a npm module for NodeJS\r\nYou need to have Node installed in order to install this package.\r\nYou can install Eccentric by running this code:\r\nbash\r\n$ npm i eccentric\r\n\r\n\r\n## Usage\r\n\r\nindex.js:\r\njs\r\nconst express = require(\"express\");\r\nconst app = express();\r\nconst eccentric = require(\"eccentric\");\r\n\r\napp.use(eccentric)\r\n\r\napp.get(\"/\", (req, res) => {\r\n res.build(\"web.js\", {\"outside\":\"Eccentric also supports outside variables!\"})\r\n});\r\n\r\napp.listen(3000);\r\n\r\n\r\nweb.js:\r\njs\r\n// My really cool app\r\n\r\nlet title = \"Hello world! 1+1 is \";\r\n\r\n<html>\r\n <head>\r\n <title =>title + String(1+1)</title>\r\n <style>* {-family: sans-serif;}</style>\r\n </head>\r\n <body>\r\n <h1 =>outside</h1>\r\n <p =>\"The current date and time is \" + new Date()</p>\r\n <small>Eccentric also supports normal HTML :)</small>\r\n </body>\r\n</html>\r\n\r\n\r\nYou can view a live example of this demo here.\r\n\r\n## Syntax\r\n\r\nDo:\r\nhtml\r\n<style>* {color: blue;}</style>\r\n\r\n\r\nDon't:\r\n\r\nhtml\r\n<style>\r\n* {\r\n color: black:\r\n}\r\n</style>\r\n\r\n\r\nEccentric parses HTML elements in their lines. This is to allow Javascript to be written inbetween elements. As an alternative, you can use links/sources to CSS and script tags.\r\n\r\n#### Example:\r\n\r\nhtml\r\n<script src=\"https://example.com/script.js\"></script>\r\n<link rel=\"stylesheet\" type=\"text/css\" href=\"https://example.com/stylesheet.css\" />\r\n\r\n\r\n#### Rendering\r\n\r\nIn order to render, Eccentric uses the function response.build.\r\nThis compiles the Eccentric code, and sends the compiled HTML to the browser to be displayed.\r\n\r\nThere are three inputs for the build function:\r\nres.build(FilePath, Variables, isFile)\r\nThe filepath is the location of the file that is being compiled.\r\nVariables is a JSON that stores variables/strings/objects that you would like to use in rendering.\r\nThe formatting of a variable consists of:\r\njson\r\n{\"variableName\":\"variableValue\"}\r\n\r\nNote that variableValue can be any type of Javascript value.\r\n\r\nisFile is a true or false statement that is optional. If it is left undefined, its default is true. If it is set to false, it will read FilePath as a string to be parsed.