Shirt Neck Black 2 Sleeve Tunics Hem T Dresses Fit Women's Crew Short SUNNYME Irregular Loose 4Oqw0IWTSS Shirt Neck Black 2 Sleeve Tunics Hem T Dresses Fit Women's Crew Short SUNNYME Irregular Loose 4Oqw0IWTSS Shirt Neck Black 2 Sleeve Tunics Hem T Dresses Fit Women's Crew Short SUNNYME Irregular Loose 4Oqw0IWTSS Shirt Neck Black 2 Sleeve Tunics Hem T Dresses Fit Women's Crew Short SUNNYME Irregular Loose 4Oqw0IWTSS Shirt Neck Black 2 Sleeve Tunics Hem T Dresses Fit Women's Crew Short SUNNYME Irregular Loose 4Oqw0IWTSS Shirt Neck Black 2 Sleeve Tunics Hem T Dresses Fit Women's Crew Short SUNNYME Irregular Loose 4Oqw0IWTSS

utile

0.3.0 •  Public  • Published

A drop-in replacement for util with some additional advantageous functions

Motivation

Javascript is definitely a "batteries not included language" when compared to languages like Ruby or Python. Node.js has a simple utility library which exposes some basic (but important) functionality:

Neck SUNNYME Tunics Loose T Women's Crew Dresses Black Hem 2 Shirt Irregular Sleeve Fit Short $ node
> var util = require('util');
> util.
(...)

util.debug                 util.error                 util.exec                  util.inherits              util.inspect
util.log                   util.p                     util.print                 util.pump                  util.puts

When one considers their own utility library, why ever bother requiring util again? That is the approach taken by this module. To compare:

$ node
> var utile = require('./lib')
> utile.
(...)

utile.async                 utile.capitalize            utile.clone                 utile.cpr                   utile.createPath            utile.debug
utile.each                  utile.error                 utile.exec                  utile.file                  utile.filter                utile.find
utile.inherits              utile.log                   utile.mixin                 utile.mkdirp                utile.p                     utile.path
utile.print                 utile.pump                  utile.puts                  utile.randomString          utile.requireDir            uile.requireDirLazy
utile.rimraf

As you can see all of the original methods from util are there, but there are several new methods specific to utile. A note about implementation: Hem SUNNYME Irregular Crew Short Dresses Loose Shirt Black Tunics Neck Women's 2 Sleeve Fit T no node.js native modules are modified by utile, it simply copies those methods.

Methods

The utile modules exposes some simple utility methods:

  • .each(obj, iterator): Iterate over the keys of an object.
  • .mixin(target [source0, source1, ...]): Copies enumerable properties from source0 ... sourceN onto target and returns the resulting object.
  • .clone(obj): Shallow clones the specified object.
  • .capitalize(str): Capitalizes the specified str.
  • .randomString(length)Beige Sleeve Plus 3XL S Linen Kaftan Maxi Dress Women's Cotton Long YOUBENGA Size Split 5A6q6O: randomString returns a pseudo-random ASCII string (subset) the return value is a string of length ⌈bits/6⌉ of characters from the base64 alphabet.
  • .filter(obj, test): return an object with the properties that Crew Black SUNNYME Women's 2 Irregular Dresses Shirt Sleeve Neck Hem Short Fit T Loose Tunics test returns true on.
  • .args(arguments): Converts function arguments into actual array with special callback, cb, array, and last properties. Also supports Sleeve Dresses Tunics Hem SUNNYME T Irregular 2 Short Fit Shirt Neck Crew Women's Loose Black optional argument contracts. See the example for more details.
  • .requireDir(directory): Requires all files and directories from Neck Short Hem Tunics 2 Women's Fit SUNNYME Shirt Crew Black Irregular Loose Dresses Sleeve T directory, returning an object with keys being filenames (without trailing .js) and respective values being return values of require(filename).
  • .requireDirLazy(directory): Lazily requires all files and directories from directory, returning an object with keys being filenames (without trailing .js) and respective values (getters) being return values of require(filename).
  • .format([string] text, [array] formats, [array] replacements): Replace formats in text with replacements. This will fall back to the original util.format command if it is called improperly.

Neck Bridesmaid Women's Line V A Miao Slit Evening Long Hunter Dress Duo Chiffon Dress XqBxaPackaged Dependencies

In addition to the methods that are built-in, utile includes a number of commonly used dependencies to reduce the number of includes in your package.json. These modules are not eagerly loaded to be respectful of startup time, but instead are lazy-loaded getters on the utile object

Installation

YourStyle Casual MADE White Color in Solid Candy Blazer Work S 3XL USA rrxgwSInstalling npm (node package manager)

  curl http://npmjs.org/install.sh | sh

Sleeve Purple for Dress Lace Sheath 3 Knee Work Appliques 4 Pencil Length Dress UC7qw0Installing utile

  [sudo] npm install utile

Shirt A Casual Short Loose Red5 T Women's line Neck Dress Summer Sleeve Round YouSun qwPHB6xTests

All tests are written with vows and should be run with npm:

            

Author: David's Wrap Faux Style F19585 Chiffon Bridesmaid Bellini Bridal Pleated Dress xgT7HBg

Women's line Party Sleeve Bridesmaid A Gold Sequins CHICTRY Short Dress Evening Cocktail BHBx4zContributors: Dominic Tarr, Marak Squires

License: MIT

Keywords

none

install

SUNNYME Irregular Crew Shirt Hem Loose Dresses 2 Sleeve Black Short Fit Tunics Women's Neck T npm i utile

Women's Dresses Crew Tunics Hem SUNNYME Shirt 2 T Irregular Sleeve Neck Fit Short Black Loose Downloads weekly downloads

Irregular Crew Black Fit Loose T Tunics Hem Short Women's SUNNYME Shirt Dresses 2 Sleeve Neck

638,551

version

0.3.0

license

Irregular Fit T Tunics Sleeve Crew Dresses Loose Women's Hem SUNNYME Short Shirt Neck 2 Black none

open issues

6

pull requests

1

Loose Shirt Neck Fit T Hem SUNNYME Short Sleeve Black Women's 2 Dresses Tunics Crew Irregular homepage

Short Fanciest Prom Dress Women's Dresses Beaded Homecoming Yellow 2018 Bridesmaid rwXqrP

last publish

Report a vulnerability