JavaScript prototype extensions.
Description
core_ext is fun little project that adds additional functionality to your JS core objects.
Notice
Extending JavaScript natives is not great. Do it only if you are pretty sure about it. This is experimental project and it's created just for fun. You should use it only for fun too.
Synopsis
Array clear // clear an array // return the first element of an array // return the first element of an array // return sentence from array Number // have all mill methods // convert number to integer // return the abs value of a number // rounds a number to the nearest integer // rounds a number to the nearest integer // rounds a number to the nearest integer // be sane // return random number within a range Object // clone an object // merge two objects. // check if object is blank // add event emitter abillities to an object String // have .at method that returns char from specified position // return the first char of a string // return the first char of a string // return the part of a string from supplied index // return the part of a string to supplied index // converts string to Number // pluralize a word // constantize a word // constantize a word // titleize a word // underscore a word // dasherize a word // tableize a word // classify a word // humanize a word // repeat string n times // check if number is within a given range
Requirements
- NPM (http://npmjs.org/)
- Node.js 0.6 (http://nodejs.org/)
Install
$ npm install core_ext
Tests
$ npm install
$ make test
License
MIT License
Copyright (C) 2012 Veselin Todorov
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.