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

kung-fig-ref

Package Overview
Dependencies
Maintainers
1
Versions
29
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

kung-fig-ref - npm Package Compare versions

Comparing version 0.46.0 to 0.46.1

7

lib/Ref.js

@@ -80,4 +80,9 @@ /*

Ref.prototype.getPath = function( arg ) { return this.refParts.join( '.' ) ; } ;
Ref.prototype.getPath = function( arg ) {
return this.refParts[ this.refParts.length - 1 ] === '' ? this.refParts.join( '.' ) + '.' :
this.refParts.join( '.' ) ;
} ;
// Used by stats-modifiers

@@ -84,0 +89,0 @@ Ref.prototype.appendPart = function( part ) { this.refParts.push( part ) ; } ;

2

package.json
{
"name": "kung-fig-ref",
"version": "0.46.0",
"version": "0.46.1",
"engines": {

@@ -5,0 +5,0 @@ "node": ">=14.15.0"

@@ -98,2 +98,53 @@ /*

it( "ref with empty path parts" , () => {
var ref_ ;
var ctx = {
"": {
hidden: "value" ,
"": {
hidden2: "value2" ,
} ,
sub: {
"": {
hidden3: "value3" ,
} ,
}
}
} ;
ref_ = Ref.parse( '$' ) ;
expect( ref_.getPath() ).to.be( '' ) ;
expect( ref_.get( ctx ) ).to.be( ctx ) ;
ref_ = Ref.parse( '$.' ) ;
expect( ref_.getPath() ).to.be( '.' ) ;
expect( ref_.get( ctx ) ).to.be( ctx[''] ) ;
ref_ = Ref.parse( '$.hidden' ) ;
expect( ref_.getPath() ).to.be( '.hidden' ) ;
expect( ref_.get( ctx ) ).to.be( ctx[''].hidden ) ;
ref_ = Ref.parse( '$..' ) ;
expect( ref_.getPath() ).to.be( '..' ) ;
expect( ref_.get( ctx ) ).to.be( ctx[''][''] ) ;
ref_ = Ref.parse( '$..hidden2' ) ;
expect( ref_.getPath() ).to.be( '..hidden2' ) ;
expect( ref_.get( ctx ) ).to.be( ctx[''][''].hidden2 ) ;
ref_ = Ref.parse( '$.sub' ) ;
expect( ref_.get( ctx ) ).to.be( ctx[''].sub ) ;
ref_ = Ref.parse( '$.sub.' ) ;
expect( ref_.get( ctx ) ).to.be( ctx[''].sub ) ;
ref_ = Ref.parse( '$.sub..' ) ;
expect( ref_.getPath() ).to.be( '.sub..' ) ;
expect( ref_.get( ctx ) ).to.be( ctx[''].sub[''] ) ;
ref_ = Ref.parse( '$.sub..hidden3' ) ;
expect( ref_.getPath() ).to.be( '.sub..hidden3' ) ;
expect( ref_.get( ctx ) ).to.be( ctx[''].sub[''].hidden3 ) ;
} ) ;
it( "it should autobox Boolean, String and Number for the root ref" , () => {

@@ -100,0 +151,0 @@ var ref_ ;

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