{"_id":"slang","_rev":"25-32f37094aeb18afba6c3832ab840c5a8","name":"slang","description":"A collection of utility functions for strings","dist-tags":{"latest":"0.3.0"},"versions":{"0.1.0":{"name":"slang","description":"A collection of utility functions for strings","version":"0.1.0","author":{"name":"Devon Govett","email":"devongovett@gmail.com","url":"http://badassjs.com/"},"repository":{"type":"git","url":"git://github.com/devongovett/slang.git"},"bugs":{"name":"http://github.com/devongovett/slang/issues"},"main":"slang.js","_id":"slang@0.1.0","engines":{"node":"*"},"_engineSupported":true,"_npmVersion":"0.3.18","_nodeVersion":"v0.4.7","directories":{},"files":[""],"_defaultsLoaded":true,"dist":{"shasum":"9fd7ce3f4f65270d377f8deb7ccf7ae22c823621","tarball":"https://registry.npmjs.org/slang/-/slang-0.1.0.tgz","integrity":"sha512-F8NaHaLBtHujBF20MaJtTKd7u/8l5f8P4AUSG4YHHCceuQb7JT83NrsqKYC1Ry6zuruPb4ljolGp2OsQzf8eJA==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDgbqWqbJ/c2zA/d4RIq6VVQSJ8VHTByxpxeOZ5KbSe1QIhAKgB6NXm1jKUnX26tx71kZNqBU9HaxSe0kTQklwILrtc"}]}},"0.1.1":{"name":"slang","description":"A collection of utility functions for strings","version":"0.1.1","author":{"name":"Devon Govett","email":"devongovett@gmail.com","url":"http://badassjs.com/"},"repository":{"type":"git","url":"git://github.com/devongovett/slang.git"},"bugs":{"name":"http://github.com/devongovett/slang/issues"},"main":"slang.js","_id":"slang@0.1.1","engines":{"node":"*"},"_engineSupported":true,"_npmVersion":"0.3.18","_nodeVersion":"v0.4.7","directories":{},"files":[""],"_defaultsLoaded":true,"dist":{"shasum":"e24fa16559620c65af3f6806c5c5972e1628f766","tarball":"https://registry.npmjs.org/slang/-/slang-0.1.1.tgz","integrity":"sha512-ftXUSnrmhIFlUboTWtWQmPdoWKNVo8BSQEnaWYmPMkh7i9lw3MVCLPRgP5y3EjKGOyygLpGuelSgWmn7pCXCXQ==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIB0sHWtYLw5YzVv4K0OjCvTG/3Pkj6qyoQxMO80l3U/pAiAgGJuvjKTLkkLiYiZo4EDNhhkPXj6LRQIRmDqcpe02hQ=="}]}},"0.1.2":{"name":"slang","description":"A collection of utility functions for strings","version":"0.1.2","author":{"name":"Devon Govett","email":"devongovett@gmail.com","url":"http://badassjs.com/"},"repository":{"type":"git","url":"git://github.com/devongovett/slang.git"},"bugs":{"name":"http://github.com/devongovett/slang/issues"},"main":"slang.js","_id":"slang@0.1.2","engines":{"node":"*"},"_engineSupported":true,"_npmVersion":"0.3.18","_nodeVersion":"v0.4.7","directories":{},"files":[""],"_defaultsLoaded":true,"dist":{"shasum":"09042b7b106221f47a10b9c8af68fc17061a1d9d","tarball":"https://registry.npmjs.org/slang/-/slang-0.1.2.tgz","integrity":"sha512-2KxIQNSMpPzf9WEP5Z2E8U+debsBrCljOlFCDYJtQzYieVFHQOKmfxJO9azT2s/0TJnB71q3xts4UYbBjsnQQg==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDht5i2v5fahZZfnWA0+yyjV5cV3EgTf2FJnRCBuWjesgIhAMH9QXHhq/tA1cLTeU8LNw2I6OJ62LCCcKhal42xABe8"}]}},"0.1.3":{"name":"slang","description":"A collection of utility functions for strings","version":"0.1.3","author":{"name":"Devon Govett","email":"devongovett@gmail.com","url":"http://badassjs.com/"},"repository":{"type":"git","url":"git://github.com/devongovett/slang.git"},"bugs":{"name":"http://github.com/devongovett/slang/issues"},"main":"slang.js","_npmJsonOpts":{"file":"/Users/devongovett/.npm/slang/0.1.3/package/package.json","wscript":false,"contributors":false,"serverjs":false},"_id":"slang@0.1.3","dependencies":{},"devDependencies":{},"engines":{"node":"*"},"_engineSupported":true,"_npmVersion":"1.0.18","_nodeVersion":"v0.4.10","_defaultsLoaded":true,"dist":{"shasum":"dd91506ebf110472cf98097c674f851e537a7c36","tarball":"https://registry.npmjs.org/slang/-/slang-0.1.3.tgz","integrity":"sha512-bmwU+P0YsXXiPKpVS/XF6zz66p4reUh3LYvbFIeVHGvS42KUWUjQQ9bEjiEtFF3Vze1/hqYipjZVQiDe1G0+hQ==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQD2vSEpw/hDfSJ9loYDsbCt0JpXJX2k/+bnUtqODDqZNwIgAPWyXPCC4tmxs2UVVNGnqKs/XMhkWZNt0ONp1SJT0Uw="}]},"scripts":{},"maintainers":[{"name":"devongovett","email":"devongovett@gmail.com"}],"directories":{}},"0.2.0":{"name":"slang","description":"A collection of utility functions for strings","version":"0.2.0","author":{"name":"Devon Govett","email":"devongovett@gmail.com","url":"http://badassjs.com/"},"repository":{"type":"git","url":"git://github.com/devongovett/slang.git"},"bugs":{"name":"http://github.com/devongovett/slang/issues"},"main":"slang.js","_npmUser":{"name":"devongovett","email":"devongovett@gmail.com"},"_id":"slang@0.2.0","dependencies":{},"devDependencies":{},"engines":{"node":"*"},"_engineSupported":true,"_npmVersion":"1.0.104","_nodeVersion":"v0.6.0","_defaultsLoaded":true,"dist":{"shasum":"561b2889e3e6722240212679096899a227fe55e7","tarball":"https://registry.npmjs.org/slang/-/slang-0.2.0.tgz","integrity":"sha512-H2q93ciqCQIT1JaiR6ZoiO4M6AjfFywNfTyge3m2MTSKNGKPoTgcTlgFqZsAaeixn6m24sHiCgcA0qkTH3vzpw==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIF9Erbhgo4ayCSvZ6bgqzzG2eLup2PQq+vENO+jkUf16AiB1HE1jCqEeOqJmvflO/hrIAVtuwWxvadKxCN0kkx9xCQ=="}]},"maintainers":[{"name":"devongovett","email":"devongovett@gmail.com"}],"directories":{}},"0.3.0":{"name":"slang","description":"A collection of utility functions for strings","version":"0.3.0","author":{"name":"Devon Govett","email":"devongovett@gmail.com","url":"http://badassjs.com/"},"repository":{"type":"git","url":"https://github.com/devongovett/slang.git"},"bugs":{"url":"http://github.com/devongovett/slang/issues"},"main":"slang.js","readme":"Slang\n-----\nA collection of utility functions for working with strings in JavaScript in the browser or CommonJS.\n\n## Node Installation\n    npm install slang\n    \n## Annotated source code\nThe annotated source code for slang, generated by [Docco](http://jashkenas.github.com/docco/), \ncan be found [here](http://devongovett.github.com/slang/docs/slang.html).\n    \n## API\n\n### slang.isString\nReturns whether `input` is a string\n\n    slang.isString('testing'); // true\n    slang.isString(543);       // false\n    \n### slang.capitalize\nCapitalizes the first character of a string\n\n    slang.capitalize('hello world!'); // \"Hello world!\"\n    \n### slang.uncapitalize\nUncapitalizes the first character of a string\n\n    slang.uncapitalize('Hello world!); // \"hello world!\"\n    \n### slang.capitalizeWords\nCapitalizes each word in the string\n\n    slang.capitalizeWords('hello world!'); // \"Hello World!\"\n    \n### slang.uncapitalizeWords\nUncapitalizes each word in the string\n\n    slang.uncapitalizeWords('Hello World!'); // \"hello world!\"\n    \n### slang.isUpperCaseAt\nReturns whether the character at the provided character index is upper case.\n\n    slang.isUpperCaseAt('Testing', 0); // true\n    \n### slang.isLowerCaseAt\nReturns whether the character at the provided character index is lower case.\n\n    slang.isLowerCaseAt('Testing', 1); // true\n    \n### slang.swapcase\nInverts the case for each letter in the string\n\n    slang.swapcase('aaBBccDD'); // \"AAbbCCdd\"\n    \n### slang.camelize\nConverts a string of words seperated by dashes or spaces to camelCase\n\n    slang.camelize('hello world'); // \"helloWorld\"\n    slang.camelize('hello-world'); // \"helloWorld\"\n    \n### slang.uncamelize\n    slang.uncamelize('helloWorld'); // \"hello World\"\n    \n### slang.dasherize\nConverts a string of words or a camelCased string into a series of words separated by a dash (`-`)\n\n    slang.dasherize('this is dashed'); // \"this-is-dashed\"\n    \n### slang.repeat\nConcatenates the string `count` times\n\n    slang.repeat('Ho! ', 3); // \"Ho! Ho! Ho! \"\n    \n### slang.insert\nInserts `string` in `input` at `index`\n\n    slang.insert('this is cool!', 'really ', 8); // \"this is really cool!\"\n    \n### slang.remove\nRemoves the characters between the `start` and `end` indexes\n\n    slang.remove('this is really cool!', 8, 15); // \"this is cool!\"\n    \n### slang.chop\nRemoves the last character of `input`\n\n    slang.chop('hello'); // \"hell\"\n    \n### slang.trim\nRemoves leading and trailing whitespace from `input`.  Uses ES5's native trim is available.\n\n    slang.trim('hello '); // \"hello\"\n    \n### slang.trimLeft\nRemoves the leading whitespace from `input`\n\n    slang.trimLeft(' hello '); // \"hello \"\n    \n### slang.trimRight\nRemoves the trailing whitespace from `input`\n\n    slang.trimRight(' hello '); // \" hello\"\n    \n### slang.truncate\nTruncates `input` to `args.limit` or 10 and adds `args.omission` or \"...\"\n\n    slang.truncate('Lorem ipsum dolor sit amet.');                                           // 'Lorem ipsu...'\n    slang.truncate('Lorem ipsum dolor sit amet.', { limit: 5, omission: '...(read more)' }); // 'Lorem...(read more)'\n    \n### slang.join\nJoins an array into a humanized list.  The last element is joined by \"and\" by default, but you can change it.\n\n    slang.join(['red', 'blue', 'green']);       // \"red, blue and green\"\n    slang.join(['red', 'blue', 'green'], 'or'); // \"red, blue or green\"\n\n### slang.humanize\nReturns a humanized number with the correct suffix such as 1st, 2nd, 3rd or 4th.\n\n\tslang.humanize(2);\t // \"2nd\"\n\tslang.humanize(103); // \"103rd\"\n    \n### slang.contains\nReturns whether `input` contains `string`\n\n    slang.contains('hello world', 'world'); // true\n\n### slang.startsWith\nReturns whether `input` starts with `string`\n\n    slang.startsWith('hello world', 'hello'); // true\n    \n### slang.endsWith\nReturns whether `input` ends with `string`\n\n    slang.endsWith('hello world', 'world'); // true\n    \n### slang.isBlank\nReturns whether `input` is empty or only contains whitespace\n\n    slang.isBlank(' '); // true\n    slang.isBlank('');  // true\n    \n### slang.successor\nReturns the successor to str. The successor is calculated by incrementing characters starting \nfrom the rightmost alphanumeric (or the rightmost character if there are no alphanumerics) in the\nstring. Incrementing a digit always results in another digit, and incrementing a letter results in\nanother letter of the same case.\n\nIf the increment generates a carry, the character to the left of it is incremented. This \nprocess repeats until there is no carry, adding an additional character if necessary.\n\n    slang.successor(\"abcd\");      // \"abce\"\n    slang.successor(\"THX1138\");   // \"THX1139\"\n    slang.successor(\"<<koala>>\"); // \"<<koalb>>\"\n    slang.successor(\"1999zzz\");   // \"2000aaa\"\n    slang.successor(\"ZZZ9999\");   // \"AAAA0000\"\n\n### slang.guid\nReturns a unique guid of the specified length, or 32 by default\n\n    slang.guid();   // \"gE9FEtJknQVy3qkN9fxmTucYKTwFOno2\"\n    slang.guid(15); // \"b0apU4OH7ZgmEoU\"\n    \n### slang.addToPrototype\nAdds the methods from the slang object to String.prototype.  Does not add slang.guid, slang.humanize, slang.isString, slang.version, or itself.\n\n    slang.addToPrototype();\n    \"test\".capitalize(); // \"Test\"\n    \n### slang.lang\nThe default language to be used with all inflection methods. Initially set to 'en' for English.\n    \n### slang.pluralize\nPluralizes a string in the specified language or `slang.lang` by default\n\n    inflector.pluralize('man') // 'men'\n    inflector.pluralize('word', 'de') // non-default language\n    \n### slang.singularize\nSingularizes a string in the specified language or `slang.lang` by default\n\n    inflector.singularize('men') // 'man'\n    inflector.singularize('word', 'de') // non-default language\n    \n### slang.Language\nAn object that describes a language's inflection rules.  See source code for example usage.\n\n### slang.languages\nAn object holding `slang.Language` objects that describe various languages.  English ('en') is provided\nby default and you can add additional languages by adding them to `slang.languages`.  Then you can set\nthe default language to this new language by setting `slang.lang` or just use your language by passing\nthe language code as the second argument to `slang.pluralize` or `slang.singularize`.\n\n    // Create a language\n    var german = new slang.Language();\n    // Now add inflection rules\n    // ...\n\n    // Add language\n    slang.languages['de'] = german;\n\n    // Set default language\n    slang.lang = 'de';\n    \n## License\n\nslang is licensed under the MIT license.","readmeFilename":"README.md","homepage":"https://github.com/devongovett/slang","_id":"slang@0.3.0","dist":{"shasum":"13af75b4f0c018c6a8193d704f65b23be4fbabdc","tarball":"https://registry.npmjs.org/slang/-/slang-0.3.0.tgz","integrity":"sha512-kGj3TvxSDR1Enhig/aan5ucfWNDULTiWg3NrExUzO2ShXcYsm6k2oPxnav8GtslYvozxRAqL+E2O3P3QKtQYSg==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIE/Z5cf4ir6mYePd+jAWodAsG7VLq7c+P6eR1lb//mkcAiEA83VL9TDA6eXJwZAVUgSTEWAuHXGeIvHk0ZVWN8bFuuQ="}]},"_from":".","_npmVersion":"1.3.14","_npmUser":{"name":"devongovett","email":"devongovett@gmail.com"},"maintainers":[{"name":"devongovett","email":"devongovett@gmail.com"}]}},"maintainers":[{"name":"devongovett","email":"devongovett@gmail.com"}],"time":{"modified":"2022-06-26T20:49:47.611Z","created":"2011-07-15T20:09:14.254Z","0.1.0":"2011-07-15T20:09:14.472Z","0.1.1":"2011-07-15T20:54:48.898Z","0.1.2":"2011-07-19T15:19:27.444Z","0.1.3":"2011-09-29T00:54:53.750Z","0.2.0":"2012-01-28T22:00:07.067Z","0.3.0":"2013-12-29T04:13:21.211Z"},"author":{"name":"Devon Govett","email":"devongovett@gmail.com","url":"http://badassjs.com/"},"repository":{"type":"git","url":"https://github.com/devongovett/slang.git"},"users":{"onel0p3z":true,"danielrhayes":true}}