🚀 Launch Week Day 2:Introducing Custom Tabs for Org Alerts.Learn More →
Socket
Book a DemoInstallSign in
Socket

helper-join

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

helper-join

Join any number of args, using the last arg as the seperator.

latest
Source
npmnpm
Version
0.1.1
Version published
Maintainers
1
Created
Source

{{join}} NPM version

Join any number of args, using the last arg as the seperator.

Install

Install with npm:

npm i helper-join --save-dev

Usage

var helper = require('helper-join');

Join any number of args, using the last arg as the seperator.

  • arguments {Array|String}
  • separator {String}
  • returns: {String}

Examples:

Join strings:

join('a', 'b', '-');

//=> 'a-b'

Join arrays:

join(['a', 'b'], '_');

//=> 'a_b'

Mixed:

join(['a', 'b'], ['c', 'd'], 'e', '|');

//=> 'a|b|c|d|e'

Usage with Assemble

If you use Assemble (v0.6.x), to register the helper for use with any template engine:

var assemble = require('assemble');
assemble.registerHelper('join', require('helper-join'));

As a Handlebars helper (non-Assemble)

To use as a handlebars helper in non-Assemble projects:

var Handlebars = require('handlebars');
Handlebars.registerHelper('join', require('helper-join'));

Author

Jon Schlinkert

License

Copyright (c) 2014 Jon Schlinkert, contributors. Released under the MIT license

This file was generated by verb-cli on August 16, 2014.

Keywords

docs

FAQs

Package last updated on 17 Aug 2014

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