0.0.4 • Published 5 years ago
ngx-handyman v0.0.4
NgxHandyman
Angular services with handy functionality.
This library is a place to put all the functionality I don't want to repeat across projects. It's very small right now, but it will grow over time.
Usage
- Install with npm
npm install --save ngx-handyman
- Import Angular Module
import { NgxHandymanModule } from 'ngx-handyman';
- Import and inject the service you need
// import
import { HandyObjectsService } from 'ngx-handyman';
// injection
constructor (private objectHelper: HandyObjectsService ) {}
// usage
const copy = this.objectHelper.deepCopy(original);
Services
HandyObjectsService
deepCopy(original)
Copy object
compare(o1, o2)
Compare 2 objects
HandyFunctionBuilder
getBuffer()
Get a function that returns its input without proecssing
getLengthCounter()
Get a function that returns the length of an array input, or 0 if the length could not be determined.