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 - npm Package Compare versions

Comparing version 2.0.0 to 2.0.1

8

index.d.ts

@@ -5,11 +5,11 @@ /**

* @param {string} value Space separated tokens
* @returns {string[]} Tokens
* @returns {Array.<string>} Tokens
*/
export function parse(value: string): string[];
export function parse(value: string): Array<string>;
/**
* Serialize an array of strings as space separated tokens.
*
* @param {string[]} values Tokens
* @param {Array.<string|number>} values Tokens
* @returns {string} Space separated tokens
*/
export function stringify(values: string[]): string;
export function stringify(values: Array<string | number>): string;

@@ -5,6 +5,6 @@ /**

* @param {string} value Space separated tokens
* @returns {string[]} Tokens
* @returns {Array.<string>} Tokens
*/
export function parse(value) {
var input = String(value || '').trim()
const input = String(value || '').trim()
return input ? input.split(/[ \t\n\r\f]+/g) : []

@@ -16,3 +16,3 @@ }

*
* @param {string[]} values Tokens
* @param {Array.<string|number>} values Tokens
* @returns {string} Space separated tokens

@@ -19,0 +19,0 @@ */

{
"name": "space-separated-tokens",
"version": "2.0.0",
"version": "2.0.1",
"description": "Parse and stringify space separated tokens",

@@ -34,3 +34,4 @@ "license": "MIT",

"devDependencies": {
"c8": "^7.6.0",
"@types/tape": "^4.0.0",
"c8": "^7.0.0",
"prettier": "^2.0.0",

@@ -42,3 +43,3 @@ "remark-cli": "^9.0.0",

"typescript": "^4.0.0",
"xo": "^0.38.0"
"xo": "^0.39.0"
},

@@ -45,0 +46,0 @@ "scripts": {

@@ -12,2 +12,5 @@ # space-separated-tokens

This package is ESM only: Node 12+ is needed to use it and it must be `import`ed
instead of `require`d.
[npm][]:

@@ -33,4 +36,3 @@

`space-separated-tokens` exports the following identifiers: `parse`,
`stringify`.
This package exports the following identifiers: `parse`, `stringify`.
There is no default export.

@@ -37,0 +39,0 @@

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