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

space-separated-tokens

Package Overview
Dependencies
Maintainers
1
Versions
10
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

space-separated-tokens

Parse and stringify space-separated tokens

  • 1.1.3
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
10M
increased by3.84%
Maintainers
1
Weekly downloads
 
Created
Source

space-separated-tokens Build Status Coverage Status

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

Installation

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)

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

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

string — Space-separated tokens.

License

MIT © Titus Wormer

Keywords

FAQs

Package last updated on 16 Apr 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

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