A structure for representing asynchronous actions with automatic resource handling.
data.task monad which can be used to replace Continuation-Passing Style form of programming,
in order to be able to compose and sequence time-dependent effects using the generic and powerful monadic operations.
A platform detection library that works on nearly all JavaScript platforms.
This module provides the below platfrom based information:
description
layout
manufacturer
name
prerelease
product
ua
version
os
It can also parse an User-Agent and give the same information.
P.S:platform is for informational purposes only & not intended as a substitution for feature detection/inference checks.
GET IT : npm install --save platform
Sample usage:
12345678910
varplatform=require('platform');// on an iPadplatform.name;// 'Safari'platform.version;// '5.1'platform.product;// 'iPad'platform.manufacturer;// 'Apple'platform.layout;// 'WebKit'platform.os;// 'iOS 5.0'platform.description;// 'Safari 5.1 on Apple iPad (iOS 5.0)'
123456
varinfo=platform.parse('Mozilla/5.0 (Macintosh; Intel Mac OS X 10.7.2; en; rv:2.0) Gecko/20100101 Firefox/4.0 Opera 11.52');info.name;// 'Opera'info.version;// '11.52'info.layout;// 'Presto'info.os;// 'Mac OS X 10.7.2'info.description;// 'Opera 11.52 (identifying as Firefox 4.0) on Mac OS X 10.7.2'
Yes you read it right iron-node helps you to debug your node code using chrome devtools, it makes use of electron creates a browser-window
opens the dev-tool re-compile native modules against electron!
It not only helps you to debug your code, but also helps to debug your node build scripts!
Keep in mind to place the keyword debugger; to a place where you want to stop.
ineed allows you collect useful data from web pages using simple and nice API.
It doesn't build and traverse DOM-tree, it operates on sequence of HTML tokens instead. Whole processing is done in one-pass, therefore, it's blazing fast!
Get it:npm install --save ineed
Usage:ineed.<action>[.<plugin>...].<from*>
Where action could be: collect or reprocess
plugin could be one of: .comments.cssCode.hyperlinks.images.jsCode.scripts.stylesheets.texts.title
from could be: from or fromHtml
P.S: One could write a custom plugin using the .using() method.
varstackTrace=require('stack-trace');varerr=newError('something went wrong');vartrace=stackTrace.parse(err);
And trace would have CallSite objects and each object will have the below methods:
getThis: returns the value of this
getTypeName: returns the type of this as a string. This is the name of the function stored in the constructor field of this, if available, otherwise the object's [[Class]] internal property.
getFunction: returns the current function
getFunctionName: returns the name of the current function, typically its name property. If a name property is not available an attempt will be made to try to infer a name from the function's context.
getMethodName: returns the name of the property of this or one of its prototypes that holds the current function
getFileName: if this function was defined in a script returns the name of the script
getLineNumber: if this function was defined in a script returns the current line number
getColumnNumber: if this function was defined in a script returns the current column number
getEvalOrigin: if this function was created using a call to eval returns a CallSite object representing the location where eval was called
isToplevel: is this a toplevel invocation, that is, is this the global object?
isEval: does this call take place in code defined by a call to eval?