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 🙏

© 2024 – Pkg Stats / Ryan Hefner

particles-core

v0.5.4

Published

Often used particles for condensation

Downloads

64

Readme

particles-core

Often used particles for condensation

condensation

NPM Gitter Build Status Dependency Status

Particles

  • conditions
  • helpers
  • parameters
  • resources
  • sets

conditions

is_empty

Will evalute to true if the related parameter is empty

Parameters

  • paremeterLogicalId {string} required LogicalId of the parameter

Example

{{parameter "m:core" "base" default=""}}
{{condition "m:core" "is_empty" parameterLogicalId="Parameter1"}}

is_equal_to

Will evalute to true if the related parameter is equal to

Parameters

  • paremeterLogicalId {string} required LogicalId of the parameter
  • value {string|number} required value to compare

Example

{{parameter "m:core" "base" default="matchme"}}
{{
  condition "m:core" "is_equal_to"
  parameterLogicalId="Parameter1"
  value="matchme"
}}

is_false

Will evalute to true if the related parameter's string is "false"

Parameters

  • paremeterLogicalId {string} required LogicalId of the parameter

Example

{{parameter "m:core" "true_false"}}
{{condition "m:core" "is_false" parameterLogicalId="Parameter1"}}

is_not_empty

Will evalute to true if the related parameter has a value

Parameters

  • paremeterLogicalId {string} required LogicalId of the parameter

Example

{{parameter "m:core" "base" default="notempty"}}
{{condition "m:core" "is_not_empty" parameterLogicalId="Parameter1"}}

is_not_equal_to

Will evalute to true if the related parameter is not equalt to value

Parameters

  • paremeterLogicalId {string} required LogicalId of the parameter
  • value {string|number} required value to compare

Example

{{parameter "m:core" "base" default="notme"}}
{{
  condition "m:core" "is_not_equal_to"
  parameterLogicalId="Parameter1"
  value="matchme"
}}

is_populated

Will evalute to true if the related parameter has a non-empty value

Parameters

  • paremeterLogicalId {String} required LogicalId of the parameter

Example

{{parameter "m:core" "base" default="populated"}}
{{condition "m:core" "is_populated" parameterLogicalId="Parameter1"}}

is_true

Will evalute to true if the related parameter's string is equal to true

Parameters

  • paremeterLogicalId {String} required LogicalId of the parameter

Example

{{parameter "m:core" "true_false"}}
{{condition "m:core" "is_true" parameterLogicalId="Parameter1"}}

helpers

propertySpec

Builds a resource property based on the AWS CloudFormation Spec

Parameters

  • type {string} required the type of property to build
  • properties {...kv} Named key/value pairs

Example

{{
  helper "m:core" propertySpec
  type="AWS::AutoScaling::LaunchConfiguration.BlockDeviceMapping"
  DeviceName="/dev/sda1"
}}

resourceSpec

Builds a resource based on the AWS CloudFormation Spec

Parameters

  • type {string} required the type of property to build
  • properties {...kv} Named key/value pairs

Example

{{
  helper "m:core" "resourceSpec"
  type="AWS::IAM::AccessKey"
  UserName="Condensation"
}}

thisTemplate

Returns the path to the template this helper is included in

Example

{{helper "m:core" "thisTemplate"}}

thisTemplateUrl

Returns the URL to the template this helper is included in

Example

{{helper "m:core" "thisTemplateUrl"}}

outputs

attribute

Output the attribute for a resource

Parameters

  • attributeName {string} required The attribute name of the resource to output
  • resourceLogicalId {string} required The logicalId of the resource
  • description {string} - Description of the output

Example

{{
  output "m:core" "attribute"
  logicalId="Output1"
  resourceLogicalId="Resource1"
  attributeName="Arn"
}}

base

Create any output

Parameters

  • value {string|object} required String, Ref or Fn to output.
  • description {string|object} String, Ref or Fn to use for the description

Example

{{output "m:core" "base" logicalId="Output1" value="Value1" description="A Value"}}

parameters

arn

A string parameter with a constraint for valid ARN syntax

Extends base

Example

{{parameter "m:core" "arn" logicalId="Arn"}}

base

Generic implementation of a parameter

Parameters

  • type {String} required maps to Type
  • default {String} maps to Default
  • noEcho {Boolean} maps to NoEcho
  • allowedValues {Array} maps to AllowedValues
  • allowedPattern {String} maps to AllowedPattern
  • maxLength {String} maps to MaxLength
  • minLength {String} maps to MinLength
  • maxValue {Int} maps to MaxValue
  • minValue {Int} maps to MinValue
  • description {String} maps to Description
  • constraintDescription {String} maps to ConstraintDescription
  • optional {Boolean} Will add [optional] to the front of description, wrap allowedPattern with ()? and ignore minLength and minValue

Example

{{parameter "m:core" "base" logicalId="Parameter1" type="String"}}

cidr_range

Creates a parameter that accepts a valid CIDR as the value.

Extends base

Example

{{parameter "m:core" "cidr_range" logicalId="Cidr"}}

true_false

Creates a parameter that accepts either "true" or "false" as the value.

Extends base

Example

{{parameter "m:core" "true_false" logicalId="DoThis"}}

partials

resources

base

Create any resource

Parameters

  • type {String} required maps to Type
  • creationPolicy {String} maps to CreationPolicy
  • deletionPolicy {String} maps to DeletionPolicy
  • updatePolicy {String} maps to UpdatePolicy
  • properties {String|Object} maps to Properties
  • condition {String} maps to Condition
  • metadata {String} maps to Metadata
  • dependsOn {Int} maps to DependsOn

Example

{{resource "m:core" "base" logicalId="Resource" type="Custom::type"}}

spec

Create any resource with properties from the AWS CloudFormation Spec

Extends base

Parameters

  • properties {...kv} - Named key/value pairs of valid properties

Example

{{
  resource "m:core" "resourceSpec"
  type="AWS::IAM::AccessKey"
  condition="MyCondition"
  dependsOn="AnotherResource"
  UserName="Condensation"
}}

sets

empty_conditions

When used in a layout, will generate an is_empty and is_populated conditions for a parameter.

Parameters

  • paremeterLogicalId required LogicalId for the parameter

Example

{{set "m:core" "empty_conditions" logicalId="Parameter1"}}

equal_conditions

When used in a layout, will generate an is_equal_to and is_not_equal_to conditions for a parameter.

Parameters

  • paremeterLogicalId required LogicalId for the parameter

Example

{{set "m:core" "equal_conditions" logicalId="Parameter1"}}

true_false

When used in a layout, will generate a parameter and condition for true/false values

Parameters

  • paremeterLogicalId required LogicalId for the parameter
  • conditionLogicalId - If set will overried the generated logicalId for the conditions

Passed on to parameter

  • default {String} maps to Default
  • noEcho {Boolean} maps to NoEcho
  • description {String} maps to Description

Example

{{set "m:core" "true_false" parameterLogicalId="Parameter1"}}