{
  "name": "gex",
  "description": "Glob expressions for JavaScript",
  "keywords": [
    "glob",
    "star",
    "question",
    "mark",
    "expression",
    "regular"
  ],
  "version": "0.0.1",
  "homepage": "https://github.com/rjrodger/gex",
  "author": {
    "name": "Richard Rodger",
    "email": "richard@ricebridge.com",
    "url": "http://richardrodger.com/"
  },
  "contributors": [
    {
      "name": "Richard Rodger",
      "email": "richard@ricebridge.com",
      "url": "http://richardrodger.com/"
    }
  ],
  "dependencies": {
    "underscore": ">=1.1.4"
  },
  "main": "lib/gex",
  "directories": {
    "lib": "lib"
  },
  "repository": {
    "type": "git",
    "url": "https://github.com/rjrodger/gex.git"
  },
  "engines": {
    "node": "*"
  },
  "readme": "# gex\n\nIf you're using this library, feel free to contact me on twitter if you have any questions! :) [@rjrodger](http://twitter.com/rjrodger)\n\nCurrent Version: 0.0.1\n\nTested on: node 0.4.1\n\nGlob expressions for JavaScript\n\n*\"When regular expressions are just too hard!\"*\n\nMatch glob expressions using * and ? against any JavaScript data type. \nThe character * means match anything of any length, the character ? means match exactly one of any character, \nand all other characters match themselves.\n\n    var gex = require('gex')\n\n    gex('a*').on( 'abc' ) // returns 'abc'\n    gex('a*c').on( 'abbbc' ) // returns 'abbbc'\n    gex('a?c').on( 'abc' ) // returns 'abc'\n\nYou can also match against objects and arrays:\n\n    gex('a*').on( ['ab','zz','ac'] ) // returns ['ab','ac']\n    gex('a*').on( {ab:1,zz:2,ac:3} ) // returns {ab:1,ac:3}\n\nOne of the most useful things you can do with this library is quick\nassertions in unit tests. For example if your objects contain dates,\nrandomly generated unique identifiers, or other data irrelevant for\ntesting, `gex` can help you ignore them when you use `JSON.stringify`:\n\n    var entity = {created: new Date().getTime(), name:'foo' }\n    assert.ok( gex('{\"created\":*,\"name\":\"foo\"}').on( JSON.stringify(entity) ) )\n\nIf you need to use globbing on files, here's how apply a glob to a list of files in a folder:\n\n    var fs = require('fs')\n    fs.readdir('.',function(err,files){ \n      var pngs = gex('*.png').on(files) \n    })\n\nAnd that's it!\n\n\n## Installation\n\n    npm install gex\n\nAnd in your code:\n\n    var gex = require('gex')\n\nOr clone the git repository:\n    git clone git://github.com/rjrodger/gex.git\n\n\nThis library depends on the excellent underscore module: [underscore](https://github.com/documentcloud/underscore)\n\n\n## Usage\n\nThe `gex` object is a function that takes a single argument, the glob\nexpression.  This returns a `Gex` object that has only one function\nitself: `on`. The `on` function accepts any JavaScript data type, and operates as follows:\n\n   * strings, numbers, booleans, dates, regexes: converted to string form for matching, returned as themselves\n   * arrays: return a new array with all the elements that matched. Elements are not modified, but are converted to strings for matching. Does not recurse into elements.\n   * objects: return a new object with with all the property *names* that matched. Values are copied by reference. \n   * null, NAN, undefined: never match anything\n\n## Testing\n\nThe unit tests use [expresso](https://github.com/visionmedia/expresso)\n\n    npm install expresso\n\nThe tests are in test/gex.test.js\n\n\n## Hacking around with real time charts\n\n![](http://chartaca.com/point/adb6995d-b4b3-4edf-8892-a6d1a2324831/s.gif)\n[Chartaca Hit Chart](http://chartaca.com/adb6995d-b4b3-4edf-8892-a6d1a2324831) \n",
  "readmeFilename": "README.md",
  "bugs": {
    "url": "https://github.com/rjrodger/gex/issues"
  },
  "_id": "gex@0.0.1",
  "_shasum": "0c5910af0a3d72f07c9393810af69cfe4f928d3f",
  "_from": "gex@= 0.0.1",
  "_resolved": "https://registry.npmjs.org/gex/-/gex-0.0.1.tgz"
}
