space-separated-tokens

WebJar for space-separated-tokens

License

License

MIT
GroupId

GroupId

org.webjars.npm
ArtifactId

ArtifactId

space-separated-tokens
Last Version

Last Version

1.1.5
Release Date

Release Date

Type

Type

jar
Description

Description

space-separated-tokens
WebJar for space-separated-tokens
Project URL

Project URL

https://www.webjars.org
Source Code Management

Source Code Management

https://github.com/wooorm/space-separated-tokens

Download space-separated-tokens

How to add to project

<!-- https://jarcasting.com/artifacts/org.webjars.npm/space-separated-tokens/ -->
<dependency>
    <groupId>org.webjars.npm</groupId>
    <artifactId>space-separated-tokens</artifactId>
    <version>1.1.5</version>
</dependency>
// https://jarcasting.com/artifacts/org.webjars.npm/space-separated-tokens/
implementation 'org.webjars.npm:space-separated-tokens:1.1.5'
// https://jarcasting.com/artifacts/org.webjars.npm/space-separated-tokens/
implementation ("org.webjars.npm:space-separated-tokens:1.1.5")
'org.webjars.npm:space-separated-tokens:jar:1.1.5'
<dependency org="org.webjars.npm" name="space-separated-tokens" rev="1.1.5">
  <artifact name="space-separated-tokens" type="jar" />
</dependency>
@Grapes(
@Grab(group='org.webjars.npm', module='space-separated-tokens', version='1.1.5')
)
libraryDependencies += "org.webjars.npm" % "space-separated-tokens" % "1.1.5"
[org.webjars.npm/space-separated-tokens "1.1.5"]

Dependencies

There are no dependencies for this project. It is a standalone project that does not depend on any other jars.

Project Modules

There are no modules declared in this project.

space-separated-tokens

Build Coverage Downloads Size

Parse and stringify space-separated tokens according to the spec.

Install

npm:

npm install space-separated-tokens

Usage

var spaceSeparated = require('space-separated-tokens')

spaceSeparated.parse(' foo\tbar\nbaz  ')
//=> ['foo', 'bar', 'baz']

spaceSeparated.stringify(['foo', 'bar', 'baz'])
//=> 'foo bar baz'

API

spaceSeparated.parse(value)

Parse space-separated tokens to an array of strings, according to the spec.

Parameters
  • value (string) — space-separated tokens
Returns

Array.<string> — List of tokens.

spaceSeparated.stringify(values)

Serialize an array of strings to space-separated tokens. Note that it’s not possible to specify empty or whitespace only values.

Parameters
  • values (Array.<string>) — List of tokens
Returns

string — Space-separated tokens.

Related

License

MIT © Titus Wormer

Versions

Version
1.1.5
1.1.4