npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

amiwo

v5.1.0

Published

Various utility functions. Named after a famous Beninese traditional dish :)

Downloads

116

Readme

amiwo

amiwo is a simple box of utility functions I'm using across various node applications

Install

npm install amiwo

Release notes

  • v5.1.x: util > setProperty() support arrays or properties

  • v5.0.x: refactored using bluebird Promise library instead of when; created stream library

  • v4.18.x: removed $DEBUG proxy logger

  • v4.17.x: util > added rmap(), toBoolean() method, hasOwnProperties() returns a number (vs. boolean)

  • v4.16.x: rest > added executeIf() middleware and associated Jasmine tests; util > added deleteProperties(), addToSet(), unwind() methods ; db > added dropCollection(), findOne() methods to DBObject (andd their equivalent implementation for GenericDBObject); jasmine > added toBeAnArray() matcher

  • v4.15.x: util > added round() and trunc()

  • v4.14.x: Removed requirement to global

  • v4.13.x: Added generic flatten() method to DBObject ; support for Mongo v3.4

  • v4.12.x: Added jasmine customer matchers based on util's smartEqual()

  • v4.11.x: Added doc (jsdoc)

  • v4.10.x: util: added method map(), filter()

  • v4.9.x: util: added method overwrite()

  • v4.8.x: util: added method keys() and values(), toLowerCase() and toUpperCase() (functional programming helpers)

  • v4.7.x: util: added method flattenArray()

  • v4.6.x: util: added method setCharAt(); error: added InvalidIDError

  • v4.5.x: util: method expressParam() now supports dotted names

  • v4.4.x: session: added method Route::keepMethod()

  • v4.3.x: test: added generic tests for DBObjects

  • v4.2.x: db: Added Optimist Concurrency Check to DBObject save(), push() and addToSet() methods (and associated method in GenericMongoDBObject

  • v4.1.x: util: Added setProperty() method

  • v4.0.x: Added db & error suite

  • v3.1.x: Added util::isValidEmail()

  • v3.0.x: Added 'test' suite

  • v2.8.x: RequestHandler & Route: added debug middleware supporting hot processing of debug & verbose parameters; minor edits in Session::init() middleware

  • v2.7.x: util::request() now unwraps StatusCodeError from node-request module and returns its encapsulated Error directly

  • v2.6.x: Added typeOf() and isObject() methods

  • v2.5.x: Added native PerformanceTimer support to Route objects

  • v2.4.x: Added Route::parallel() method

  • v2.3.x: Added argv() method

  • v2.2.x: Added Route object

  • v2.1.x: Added PerformanceMonitor object

  • v2.0.x: Added Session and RequestHandler objects

  • v1.18.x: Fixed method clone() and smart(Deep)Equal() for Dates

  • v1.17.x: Added method getProperty()

  • v1.16.x: Enhanced min & max functions

  • v1.15.x: Added addDays(), addMonths() and addYears() methods

  • v1.14.x: Added average(), min(), max() methods

  • v1.13.x: Improved merge() to work on more complex object structures

  • v1.12.x: Added function getWeek(date) to get Date week number

  • v1.11.x: Added function yesterday() and today() to get Date

  • v1.10.x: Added functions get(obj, expr) getting properties from obj's keys matching 'expr'

  • v1.9.x: Added functions flatten() and isObject()

  • v1.7.x / v1.8.x: Added function request(), wrapping request-promise to add a 'amiwo' parameter with a unique ID (generated by node-uuid)

  • v1.6.x: Added function hasOwnProperties(), isEmpty() now properly handles Date objects

  • v1.5.x: Added function indexOf()

  • v1.4.x: Added function expressParam() to replace the deprecated Express::Request::param() method

  • v1.3.x: Added function add() to add a property/value to an Object safely and corrected a few typos, and smartEqual / smartDeepEqual to implement a simple = test on Arrays and Objects

  • v1.2.0: Functions isEmpty() / isNotEmpty() now support Array and Object instead of just Strings

  • v1.1.0: Added equal/deepEqual/notEqual/notDeepEqual functions

Related Modules

Main modules used by amiwo are

  • merge — Merge multiple objects into one, optionally creating a new cloned object. Similar to the jQuery.extend but more flexible.
  • request-promise — The world-famous HTTP client "Request" now Promises/A+ compliant. Powered by Bluebird.
  • uuid - Simple, fast generation of RFC4122 UUIDS.

Tests

Basic test files are in /tests. I add them each time I add a new feature (or try to :) )

Credits

License

The MIT License

Copyright (c) 2011-2015 Boris Gbahoue <http://www.athieme_consulting.com/>