包详细信息

lx-helpers

litixsoft549MIT0.5.1

Litixsoft Javascript helper functions.

iteration

自述文件

lx-helpers Build Status david-dm david-dm

Litixsoft helper functions for Javascript (client and server).

Getting Started

Install:

NPM

Documentation

http://www.litixsoft.de/products-lxhelpers.html (german)

Contributing

In lieu of a formal styleguide, take care to maintain the existing coding style. Add unit tests for any new or changed functionality. Please create descriptive commit messages. We use a git hook to validate the commit messages against these rules. Lint and test your code using grunt.

$ grunt test

Author

Litixsoft GmbH

License

Copyright (C) 2013-2014 Litixsoft GmbH info@litixsoft.de Licensed under the MIT license.

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.

更新日志

0.5.1 (2014-03-19)

Features

  • arrayIndexOf() and arrayHasItem can now handle prediacte functions as item (269042da)

0.5.0 (2014-02-19)

Features

  • revert the params of the callback function in objectForEach() (47199673)

Breaking Changes

  • you have to change all calls to objectForEach() (47199673)

v0.4.1 (2014-01-28)

Features

  • add param index to callback function in forEach when iterating over arrays (9a264e71)

v0.4.0 (2014-01-28)

Features

  • revert the params of the callback function in forEach (fcf4c26d)

Breaking Changes

  • you have to change all calls to objectForEach and forEach which iterates over objects. (fcf4c26d)

v0.3.4 (2013-12-19)

Features

v0.3.3 (2013-12-18)

Bug Fixes

  • rename module export in client side to window.lxHelpers (6189db48)

v0.3.2 (2013-12-09)

Features

  • add function roundPrecise() to round a value to n decimal places, with 0.005 be (e9660ee6)

v0.3.1 (2013-12-09)

Features

  • Gruntfile:
    • add grunt-bump task (ec9e40a6)
    • add grunt-conventional-changelog to generate changelog (cb73cc8d)
  • git: add git commit hook to validate the commit message (778a6dce)

v0.3.0

Features

  • add function isNumber()
  • getType(): now detects Infinite and NaN

Breaking Changes

  • getType(): now returns the type in lower case without the part ‘[object]‘

v0.2.5

Features

  • add break condition to forEach function

v0.2.4

Features

  • add function arrayHasItem(array, item) to check if an array contains the given item.

v0.2.3

Features

  • add function for getting a TypeError with a message.

v0.2.2

Features

  • function isEmpty() now only checks length for arrays and objects. Functions now return always true.

v0.2.1

Features

  • add function getType() to get the full type of the value (e.g. getType(null) === '[object Null]')

v0.2.0

Features

  • add zip file in dist folder containing the debug and min version of lx-helpers
  • add function isEmpty() to check if the given value has no items/keys
  • add function isArray() to check if the given value is an array
  • add function isObject() to check if the given value is an object
  • add function isFunction() to check if the given value is a function
  • add function isDate() to check if the given value is a date
  • add function forEach() to iterate over array, objects or functions
  • update devDependencies

v0.1.0 project initial