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

rheactor-value-objects

Package Overview
Dependencies
Maintainers
3
Versions
36
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

rheactor-value-objects - npm Package Compare versions

Comparing version 9.0.1 to 9.1.0

11

dist/uri.js

@@ -77,2 +77,13 @@ 'use strict';

/**
* Returns a copy of the instance with the given string appended
* @returns {URIValue}
*/
}, {
key: 'append',
value: function append(str) {
return new URIValue('' + this + str);
}
/**
* Returns true if str is an URI

@@ -79,0 +90,0 @@ * @param {String} str

2

package.json
{
"name": "rheactor-value-objects",
"description": "A collection of value objects",
"version": "9.0.1",
"version": "9.1.0",
"main": "dist/index.js",

@@ -6,0 +6,0 @@ "scripts": {

@@ -53,2 +53,10 @@ import {ValidationFailedError} from '@resourcefulhumans/rheactor-errors'

/**
* Returns a copy of the instance with the given string appended
* @returns {URIValue}
*/
append (str) {
return new URIValue(`${this}${str}`)
}
/**
* Returns true if str is an URI

@@ -55,0 +63,0 @@ * @param {String} str

@@ -166,2 +166,11 @@ import {URIValue, URIValueType, MaybeURIValueType} from '../src'

})
describe('append()', () => {
it('should return a new URL with the appended string', () => {
const u = new URIValue('https://example.com')
const u2 = u.append('/status')
expect(u2.toString(), 'it should concatenate the string to the URI').to.equal('https://example.com/status')
expect(u, 'it should create a new instance').to.not.equal(u2)
})
})
})
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