🚨 Shai-Hulud Strikes Again:834 Packages Compromised.Technical Analysis →
Socket
Book a DemoInstallSign in
Socket

@neovici/cosmoz-moment

Package Overview
Dependencies
Maintainers
4
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@neovici/cosmoz-moment

A Polymer component for centralized management of Moment.js with locale change distributed notification.

latest
Source
npmnpm
Version
3.0.2
Version published
Maintainers
4
Created
Source

cosmoz-moment

Build Status Published on webcomponents.org semantic-release

cosmoz-moment is a Polymer component for centralized management of Moment.js with locale change distributed notification.

Example

<dom-bind>
	<template is="dom-bind">
		<paper-dropdown-menu label="Locale" value="{{ locale }}">
			<paper-listbox class="dropdown-content" slot="dropdown-content" selected="0">
				<paper-item>en</paper-item>
				<paper-item>fr</paper-item>
				<paper-item>sv</paper-item>
			</paper-listbox>
		</paper-dropdown-menu>
		<cosmoz-moment locale="[[ locale ]]"></cosmoz-moment>
		<div class="message">
			<div><b>Page was loaded</b> <cosmoz-moment-timeago></cosmoz-moment-timeago><br/></div>
			<div><b>Polymer was created</b> <cosmoz-moment-timeago date="2015-05-27"></cosmoz-moment-timeago><br/></div>
		</div>
	</template>
</dom-bind>

Usage

Install

bower install --save Neovici/cosmoz-moment

Add the cosmoz-moment import

<link rel="import" href="bower_components/cosmoz-moment/cosmoz-moment.html" />
<link rel="import" href="bower_components/cosmoz-moment/cosmoz-moment-timeago.html" />

Use it inside your element

cosmoz-moment should only be used once per app to manage the locale and moment.js.

cosmoz-moment-timeago can be used within elements, or directly in the app, multiple times.

<cosmoz-moment locale="[[locale]]"></cosmoz-moment>
<cosmoz-moment-timeago date="2017-06-15"></cosmoz-moment-timeago>

Documentation

See docs for more details

License

cosmoz-moment is created under the terms of the Apache-2.0 license.

Keywords

polymer

FAQs

Package last updated on 09 Oct 2019

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