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

@status/label-maker

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@status/label-maker

Generate endless labels

  • 1.0.2
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

Label Maker

Continuous label generator

Install

npm install @status/label-maker

or

yarn add @status/label-maker

Usage

Generate endless labels with @status/label-maker:

import { LabelMaker, labelMaker } from '@status/label-maker';

const labeler: LabelMaker = labelMaker('foo')('bar');

expect(labeler('baz').toString()).toBe('foo|bar|baz');

Default delimiter is | but you can change it:

const labeler: LabelMaker = labelMaker('foo', ':')('bar', '>')('baz', {
  includeFinalDelimiter: true,
  delimiter: '\t',
});

expect(`${labeler('qux', '|')}`).toBe('foo:bar>baz   qux|');

Passing a label: (string) as first parameter is required. You may optionally provide an alternate delimiter: (string) as a second parameter, or an object with the properties described below.

Options

includeFinalDelimiter

Include final delimiter in the label. Default is false. Will use last provided value.

delimiter

Delimiter to use between label segments. Default is |. Can vary between segments.

Keywords

FAQs

Package last updated on 20 May 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