0.0.6 • Published 7 years ago

is-child v0.0.6

Weekly downloads
-
License
MIT
Repository
-
Last release
7 years ago

Tests whether a file / folder is the child of another file.

isChild(parent, child) returns true or false

Can also be used to test if a folder is the parent of a file / folder (just swap the arguments 😉 )

npm install is-child

let isChild = require('is-child');

let parent = '/my/path'
let child = '/my/path/child'
let random = '/my/random/path'

isChild(parent, child) // returns true
isChild(parent, random) // returns false
0.0.6

7 years ago

0.0.5

7 years ago

0.0.4

7 years ago

0.0.3

7 years ago

0.0.2

7 years ago

0.0.1

7 years ago