New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More ā†’
Socket
Sign inDemoInstall
Socket

doz

Package Overview
Dependencies
Maintainers
1
Versions
248
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

doz

A JavaScript framework for building UI, almost like writing in VanillaJS.

  • 5.2.6
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
163
decreased by-26.91%
Maintainers
1
Weekly downloads
Ā 
Created
Source






Almost like writing in VanillaJS. For modern browser.



Documentation | API | Demo | Browse example code

šŸ‘‰ SEE A PROJECT BUILT WITH DOZ šŸ‘ˆ


Look at the code on Codepen

Why

  • šŸŽ¼ Works with tagged template literals
  • šŸŽ³ Component based
  • šŸ§© WebComponent ready
  • šŸŖ Global stores
  • šŸ˜† Global components
  • šŸ”« Fast performance
  • šŸ’… Scoped style
  • šŸ“” Uses ES6 proxy to observe changes
  • šŸ˜ Simple and familiar API
  • šŸ˜±ā€ No extra syntax like JSX
  • šŸ’£ No confusion with props and state
  • ā› Extensible through: plugins, mixin, components
  • šŸ“½ CSS animation support

Get started

$ npx doz-cli app my-app
$ cd my-app
$ npm start

Example

<div id="app"></div>
Component definition

ButtonCounter.js

import {Component} from 'doz'

export default class ButtonCounter extends Component {
    
    constructor(o) {
        super(o);
        this.props = {
            counter: 0
        };
    }

    template(h) {
        return h`
            <style>
                button {
                    font-size: 16px;
                    padding: 20px;
                }
            </style>

            <button onclick="${this.increase}">
                count ${this.props.counter}
            </button>
        `
    }
    
    increase() {
        this.props.counter++;
    }

};
Make an app with the component defined above

app.js

import {appCreate} from 'doz'
import ButtonCounter from './ButtonCounter'

appCreate('#app', ButtonCounter);

Doz ecosystem

  • šŸ‘ØšŸ»ā€šŸ’» doz-cli provides a boilerplate to creating app and component
  • šŸ‘ØšŸ¼ā€šŸŽØ doz-ssr server side rendering
  • šŸ¤³šŸ¼ doz-snap transforms app to static HTML
  • šŸ‘©šŸ¼ā€šŸš€ doz-router a complete component for routing
  • āœšŸ¼ doz-metatag a plugin for managing basic OG meta tag in your app (perfect with doz-ssr)
CDN unpkg
<script type="module">
    import {Component} from 'https://unpkg.com/doz/dist/doz.min.js'
    //...
</script>

Changelog

You can view the changelog here

License

Doz is open-sourced software licensed under the MIT license

Author

Fabio Ricali

Keywords

FAQs

Package last updated on 11 Sep 2023

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with āš”ļø by Socket Inc