package.json 5.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899
  1. {
  2. "_args": [
  3. [
  4. {
  5. "raw": "char-props@~0.1.3",
  6. "scope": null,
  7. "escapedName": "char-props",
  8. "name": "char-props",
  9. "rawSpec": "~0.1.3",
  10. "spec": ">=0.1.3 <0.2.0",
  11. "type": "range"
  12. },
  13. "/mnt/Data/bach/Sites/clameurs.org/sites/all/themes/figureslibres/clameurs/node_modules/source-map-index-generator"
  14. ]
  15. ],
  16. "_from": "char-props@>=0.1.3 <0.2.0",
  17. "_id": "char-props@0.1.5",
  18. "_inCache": true,
  19. "_location": "/char-props",
  20. "_npmUser": {
  21. "name": "twolfson",
  22. "email": "todd@twolfson.com"
  23. },
  24. "_npmVersion": "1.2.14",
  25. "_phantomChildren": {},
  26. "_requested": {
  27. "raw": "char-props@~0.1.3",
  28. "scope": null,
  29. "escapedName": "char-props",
  30. "name": "char-props",
  31. "rawSpec": "~0.1.3",
  32. "spec": ">=0.1.3 <0.2.0",
  33. "type": "range"
  34. },
  35. "_requiredBy": [
  36. "/source-map-index-generator"
  37. ],
  38. "_resolved": "https://registry.npmjs.org/char-props/-/char-props-0.1.5.tgz",
  39. "_shasum": "5b952f9e20ea21cd08ca7fe135a10f6fe91c109e",
  40. "_shrinkwrap": null,
  41. "_spec": "char-props@~0.1.3",
  42. "_where": "/mnt/Data/bach/Sites/clameurs.org/sites/all/themes/figureslibres/clameurs/node_modules/source-map-index-generator",
  43. "author": {
  44. "name": "Todd Wolfson",
  45. "email": "todd@twolfson.com",
  46. "url": "http://twolfson.com/"
  47. },
  48. "bugs": {
  49. "url": "https://github.com/twolfson/char-props/issues"
  50. },
  51. "dependencies": {},
  52. "description": "Utility for looking up line and column of a character at a given index and vice versa",
  53. "devDependencies": {
  54. "grunt": "~0.3.12",
  55. "vows": "~0.6.4"
  56. },
  57. "directories": {},
  58. "dist": {
  59. "shasum": "5b952f9e20ea21cd08ca7fe135a10f6fe91c109e",
  60. "tarball": "https://registry.npmjs.org/char-props/-/char-props-0.1.5.tgz"
  61. },
  62. "engines": {
  63. "node": ">= 0.6.0"
  64. },
  65. "homepage": "https://github.com/twolfson/char-props",
  66. "keywords": [
  67. "character",
  68. "lookup",
  69. "line",
  70. "row",
  71. "column",
  72. "index"
  73. ],
  74. "licenses": [
  75. {
  76. "type": "MIT",
  77. "url": "https://github.com/twolfson/char-props/blob/master/LICENSE-MIT"
  78. }
  79. ],
  80. "main": "lib/charProps",
  81. "maintainers": [
  82. {
  83. "name": "twolfson",
  84. "email": "todd@twolfson.com"
  85. }
  86. ],
  87. "name": "char-props",
  88. "optionalDependencies": {},
  89. "readme": "# char-props [![Donate on Gittip](http://badgr.co/gittip/twolfson.png)](https://www.gittip.com/twolfson/)\n\nUtility for looking up line and column of a character at a given index and vice versa.\n\n## Getting Started\nInstall the module with: `npm install charProps`\n\n## Documentation\n```js\n// charProps is a function which invokes the Indexer constructor\n\n// Indexer JSDoc\n/**\n * Indexer constructor (takes index and performs pre-emptive caching)\n * @constructor\n * @param {String} input Content to index\n */\n\n// Indexer.lineAt JSDoc\n/**\n * Get the line of the character at a certain index\n * @param {Number} index Index of character to retrieve line of\n * @param {Object} [options] Options to use for search\n * @param {Number} [options.minLine=0] Minimum line for us to search on\n * TODO: The following still have to be built/implemented\n * @param {Number} [options.maxLine=lines.length] Maximum line for us to search on\n * @param {String} [options.guess=\"average\"] Affects searching pattern -- can be \"high\", \"low\", or \"average\" (linear top-down, linear bottom-up, or binary)\n * @returns {Number} Line number of character\n */\n\n// Indexer.columnAt JSDoc\n/**\n * Get the column of the character at a certain index\n * @param {Number} index Index of character to retrieve column of\n * @returns {Number} Column number of character\n */\n\n// Indexer.indexAt JSDoc\n/**\n * Get the index of the character at a line and column\n * @param {Object} params Object containing line and column\n * @param {Number} params.line Line of character\n * @param {Number} params.column Column of character\n * @returns {Number} Index of character\n */\n\n// Indexer.charAt JSDoc\n/**\n * Get the character at a line and column\n * @param {Object} params Object containing line and column\n * @param {Number} params.line Line of character\n * @param {Number} params.column Column of character\n * @returns {String} Character at specified location\n */\n```\n\n## Examples\n### Initial load\n```js\nvar charProps = require('char-props'),\n jquerySrc = fs.readFileSync('jquery.js', 'utf8');\n\n// Load jQuery into charProps\nvar jqueryProps = charProps(jquerySrc);\n```\n\n### lineAt usage\n```js\n// Look up line of character at index 42\njqueryProps.lineAt(42);\n```\n\n### columnAt usage\n```js\n// Look up column of character at index 88\njqueryProps.columnAt(88);\n```\n\n### indexAt usage\n```js\n// Look up the index of a character at line 9000, column 1\njqueryProps.indexAt({'line': 9000, 'column': 1});\n```\n\n### charAt usage\n```js\n// Get the character at line 20, column 20\njqueryProps.charAt({'line': 20, 'column': 20});\n```\n\n## lineAt advanced usage\n```js\n// Look up line of character at index 9001 with a minimum line of 99\njqueryProps.lineAt(9001, {'minLine': 99});\n```\n\n## Contributing\nIn lieu of a formal styleguide, take care to maintain the existing coding style. Add unit tests for any new or changed functionality. Lint your code via [grunt](http://gruntjs.com/) and test via [vows](http://vowsjs.org/).\n\n## License\nCopyright (c) 2012 Todd Wolfson\nLicensed under the MIT license.\n",
  90. "readmeFilename": "README.md",
  91. "repository": {
  92. "type": "git",
  93. "url": "git://github.com/twolfson/char-props.git"
  94. },
  95. "scripts": {
  96. "test": "vows test/* --spec"
  97. },
  98. "version": "0.1.5"
  99. }