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

@netvlies/classes-helper

Package Overview
Dependencies
Maintainers
3
Versions
12
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@netvlies/classes-helper

A simple helper function to generate classes conditionally

  • 0.0.5
  • latest
  • npm
  • Socket score

Version published
Weekly downloads
17
Maintainers
3
Weekly downloads
 
Created
Source

NVS

This is a simple helper function to add to your project. It coverts an object of (conditional) classnames to a class string. You can youse it to dynamically add classes to your (Vue) components.

Installation

  1. yarn add @netvlies/classes-helper -D or npm i @netvlies/classes-helper --save-dev
  2. Import the helper in your code.

Your JS should look something like this:

Vue

  import { classesCreator } from "@netvlies/classes-helper"

  export default {
    name: 'NvsHeading',
    data: () => ({
      module: 'a-heading',
    }),
    computed: {
      moduleClasses () {
        return classesCreator({
          [this.module]: true
        })
      }
    }
  }

Want to collaborate?

Please edit the config file and submit a merge request. One of the maintainers with NPM access will submit the update to NPM.

Maintainers

NameNPM Publish rights
Berrie NachtwehYes

Keywords

FAQs

Package last updated on 12 Aug 2020

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