Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@neovici/cosmoz-utils

Package Overview
Dependencies
Maintainers
4
Versions
114
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@neovici/cosmoz-utils

Date, money and template management functions commonly needed in Cosmoz views.

  • 5.31.0
  • Source
  • npm
  • Socket score

Version published
Maintainers
4
Created
Source

@neovici/cosmoz-utils

Build Status Sauce Test Status Maintainability Test Coverage semantic-release

Cosmoz Utils

cosmoz-utils contains date, money and template management functions commonly needed in page views. This package does not contain any visual element.

Upgrade guide

Upgrading from cosmoz-behaviors is very straightforward.

  • Cosmoz.TemplateHelperBehavior -> import { Template } from '@neovici/cosmoz-utils'
  • Cosmoz.MoneyHelperBehavior -> import { Money } from '@neovici/cosmoz-utils'
  • Cosmoz.DateHelperBehavior -> import { Date } from '@neovici/cosmoz-utils'
  • Polymer.mixinBehaviors([Cosmoz.TemplateHelperBehavior], Polymer.Element) -> mixin(Template, PolymerElement)
  • Polymer.mixinBehaviors([Cosmoz.TemplateHelperBehavior, Cosmoz.MoneyHelperBehavior], Polymer.Element) -> mixin({...Template, ...Money}, PolymerElement)

This code:

<link rel="import" href="../cosmoz-templatehelper-behavior.html" />

class DemoTemplateHelper extends Polymer.mixinBehaviors([Cosmoz.TemplateHelperBehavior], Polymer.Element) {

Becomes:

import { PolymerElement } from '@polymer/polymer/polymer-element';
import { mixin, Template } from '@neovici/cosmoz-utils';

class DemoTemplateHelper extends mixin(Template, PolymerElement) {

You can also pick and choose only the functions your element needs:

import { mixin, Money } from '@neovici/cosmoz-utils';
import { isEmpty } from '@neovici/cosmoz-utils/template';
import { isoDate } from '@neovici/cosmoz-utils/date';

class DemoMoneyHelper extends mixin({isEmpty, isoDate, ...Money}, PolymerElement) {

Big Thanks

Cross-browser Testing Platform and Open Source <3 Provided by [Sauce Labs][sauce_homepage]

Sauce Test Status [sauce_homepage]: https://saucelabs.com

Keywords

FAQs

Package last updated on 06 Jul 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