My First Playground

node v8.17.0
version: 2.0.0
endpointsharetweet
This is a playground to test JavaScript. It runs a completely standard copy of Node.js on a virtual server created just for you. Every one of npm’s 300,000+ packages are pre-installed, so try it out:
const minimatch = require("minimatch") const path1 = '/src/api/dave/test.spec.js' const path2 = '/src/api/chaz/dave/test.spec.js' const path3 = '/src/api/node_modules/ignore/test.spec.js' const path4 = '/src/bob/dave/test.spec.js' const path5 = '/src/bob/chaz/dave/test.spec.js' const path6 = '/src/bob/node_modules/ignore/test.spec.js' const globx = '/src/api/{,!(node_modules)/**/}*.spec.js' const glob = '/src/{api,bob}/{,!(node_modules)/**/}*.spec.js' const debug = { debug: false } console.log({ api: { without1: minimatch(path1, glob, debug), without2: minimatch(path2, glob, debug), withNodeModules: minimatch(path3, glob, debug) }, bob: { without1: minimatch(path4, glob), without2: minimatch(path5, glob), withNodeModules: minimatch(path6, glob) } })
Loading…

no comments

    sign in to comment