0.1.0 • Published 8 years ago

ramped.append v0.1.0

Weekly downloads
6
License
ISC
Repository
github
Last release
8 years ago

Ramped append

Add an item to the end of another Array, Number, or String.

Install

To add as a dependency to a Node.js project:

npm i ramped.append --save

Usage

append = require('ramped.append')

add_text_to_end = append('def')

add_text_to_end('abc')
// 'abcdef'

add_text_to_end([1, 2])
// [1, 2, 'def']

add_array_as_item = append([3, 4])
add_array_as_item([1, 2])
// [1, 2, [3, 4]]

append_60 = append(60)
append_60(12)
// 1260

The last usage (joining 2 numbers) should only be done with integers, to avoid complications with floating point values.

License

ISC

0.1.0

8 years ago