Skip to content

commonform/commonform-same-path

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 

Repository files navigation

check whether two Common Form paths are the same

var assert = require('assert')
var samePath = require('commonform-same-path')

assert.strictEqual(
  samePath(['content', 0], ['content', 0]),
  true
)

assert.strictEqual(
  samePath(['content', 0], ['content', 1]),
  false
)

assert.throws(function () {
  samePath('not an array', ['content', 1])
})

assert.throws(function () {
  samePath(['content', 1], 'not an array')
})

About

check whether two Common Form paths are the same

Resources

License

Stars

Watchers

Forks

Packages

No packages published