\begin{quote}
Basic object cache with {\ttfamily get}, {\ttfamily set}, {\ttfamily del}, and {\ttfamily has} methods for node.\+js/javascript projects. \end{quote}
\hypertarget{md_sfcode_node_modules_cache_base_README_autotoc_md4933}{}\doxysection{Install}\label{md_sfcode_node_modules_cache_base_README_autotoc_md4933}
Install with \href{https://www.npmjs.com/}{\texttt{ npm}}\+:


\begin{DoxyCode}{0}
\DoxyCodeLine{\$ npm install -\/-\/save cache-\/base }

\end{DoxyCode}
\hypertarget{md_sfcode_node_modules_cache_base_README_autotoc_md4934}{}\doxysection{Usage}\label{md_sfcode_node_modules_cache_base_README_autotoc_md4934}

\begin{DoxyCode}{0}
\DoxyCodeLine{var Cache = require('cache-\/base');}
\DoxyCodeLine{}
\DoxyCodeLine{// instantiate}
\DoxyCodeLine{var app = new Cache();}
\DoxyCodeLine{}
\DoxyCodeLine{// set values}
\DoxyCodeLine{app.set('a', 'b');}
\DoxyCodeLine{app.set('c.d', 'e');}
\DoxyCodeLine{}
\DoxyCodeLine{// get values}
\DoxyCodeLine{app.get('a');}
\DoxyCodeLine{//=> 'b'}
\DoxyCodeLine{app.get('c');}
\DoxyCodeLine{//=> \{d: 'e'\}}
\DoxyCodeLine{}
\DoxyCodeLine{console.log(app.cache);}
\DoxyCodeLine{//=> \{a: 'b'\} }

\end{DoxyCode}


{\bfseries{Inherit}}


\begin{DoxyCode}{0}
\DoxyCodeLine{var util = require('util');}
\DoxyCodeLine{var Cache = require('cache-\/base');}
\DoxyCodeLine{}
\DoxyCodeLine{function MyApp() \{}
\DoxyCodeLine{  Cache.call(this);}
\DoxyCodeLine{\}}
\DoxyCodeLine{util.inherits(MyApp, Cache);}
\DoxyCodeLine{}
\DoxyCodeLine{var app = new MyApp();}
\DoxyCodeLine{app.set('a', 'b');}
\DoxyCodeLine{app.get('a');}
\DoxyCodeLine{//=> 'b' }

\end{DoxyCode}


{\bfseries{Namespace}}

Define a custom property for storing values.


\begin{DoxyCode}{0}
\DoxyCodeLine{var Cache = require('cache-\/base').namespace('data');}
\DoxyCodeLine{var app = new Cache();}
\DoxyCodeLine{app.set('a', 'b');}
\DoxyCodeLine{console.log(app.data);}
\DoxyCodeLine{//=> \{a: 'b'\} }

\end{DoxyCode}
\hypertarget{md_sfcode_node_modules_cache_base_README_autotoc_md4935}{}\doxysection{API}\label{md_sfcode_node_modules_cache_base_README_autotoc_md4935}
\hypertarget{md_sfcode_node_modules_cache_base_README_autotoc_md4936}{}\doxysubsection{$<$a href=\char`\"{}index.\+js\#\+L29\char`\"{}$>$namespace$<$/a$>$}\label{md_sfcode_node_modules_cache_base_README_autotoc_md4936}
Create a {\ttfamily Cache} constructor that when instantiated will store values on the given {\ttfamily prop}.

{\bfseries{Params}}


\begin{DoxyItemize}
\item {\ttfamily prop} $\ast$$\ast$\{String\}$\ast$$\ast$\+: The property name to use for storing values.
\item {\ttfamily returns} $\ast$$\ast$\{Function\}$\ast$$\ast$\+: Returns a custom {\ttfamily Cache} constructor
\end{DoxyItemize}

{\bfseries{Example}}


\begin{DoxyCode}{0}
\DoxyCodeLine{var Cache = require('cache-\/base').namespace('data');}
\DoxyCodeLine{var cache = new Cache();}
\DoxyCodeLine{}
\DoxyCodeLine{cache.set('foo', 'bar');}
\DoxyCodeLine{//=> \{data: \{foo: 'bar'\}\} }

\end{DoxyCode}
\hypertarget{md_sfcode_node_modules_cache_base_README_autotoc_md4937}{}\doxysubsection{$<$a href=\char`\"{}index.\+js\#\+L43\char`\"{}$>$\+Cache$<$/a$>$}\label{md_sfcode_node_modules_cache_base_README_autotoc_md4937}
Create a new {\ttfamily Cache}. Internally the {\ttfamily Cache} constructor is created using the {\ttfamily namespace} function, with {\ttfamily cache} defined as the storage object.

{\bfseries{Params}}


\begin{DoxyItemize}
\item {\ttfamily cache} $\ast$$\ast$\{Object\}$\ast$$\ast$\+: Optionally pass an object to initialize with.
\end{DoxyItemize}

{\bfseries{Example}}


\begin{DoxyCode}{0}
\DoxyCodeLine{var app = new Cache(); }

\end{DoxyCode}
\hypertarget{md_sfcode_node_modules_cache_base_README_autotoc_md4938}{}\doxysubsection{$<$a href=\char`\"{}index.\+js\#\+L84\char`\"{}$>$.\+set$<$/a$>$}\label{md_sfcode_node_modules_cache_base_README_autotoc_md4938}
Assign {\ttfamily value} to {\ttfamily key}. Also emits {\ttfamily set} with the key and value.

{\bfseries{Params}}


\begin{DoxyItemize}
\item {\ttfamily key} $\ast$$\ast$\{String\}$\ast$$\ast$
\item {\ttfamily value} $\ast$$\ast$\{any\}$\ast$$\ast$
\item {\ttfamily returns} $\ast$$\ast$\{Object\}$\ast$$\ast$\+: Returns the instance for chaining.
\end{DoxyItemize}

{\bfseries{Events}}


\begin{DoxyItemize}
\item {\ttfamily emits}\+: {\ttfamily set} with {\ttfamily key} and {\ttfamily value} as arguments.
\end{DoxyItemize}

{\bfseries{Example}}


\begin{DoxyCode}{0}
\DoxyCodeLine{app.on('set', function(key, val) \{}
\DoxyCodeLine{  // do something when `set` is emitted}
\DoxyCodeLine{\});}
\DoxyCodeLine{}
\DoxyCodeLine{app.set(key, value);}
\DoxyCodeLine{}
\DoxyCodeLine{// also takes an object or array}
\DoxyCodeLine{app.set(\{name: 'Halle'\});}
\DoxyCodeLine{app.set([\{foo: 'bar'\}, \{baz: 'quux'\}]);}
\DoxyCodeLine{console.log(app);}
\DoxyCodeLine{//=> \{name: 'Halle', foo: 'bar', baz: 'quux'\} }

\end{DoxyCode}
\hypertarget{md_sfcode_node_modules_cache_base_README_autotoc_md4939}{}\doxysubsection{$<$a href=\char`\"{}index.\+js\#\+L114\char`\"{}$>$.\+union$<$/a$>$}\label{md_sfcode_node_modules_cache_base_README_autotoc_md4939}
Union {\ttfamily array} to {\ttfamily key}. Also emits {\ttfamily set} with the key and value.

{\bfseries{Params}}


\begin{DoxyItemize}
\item {\ttfamily key} $\ast$$\ast$\{String\}$\ast$$\ast$
\item {\ttfamily value} $\ast$$\ast$\{any\}$\ast$$\ast$
\item {\ttfamily returns} $\ast$$\ast$\{Object\}$\ast$$\ast$\+: Returns the instance for chaining.
\end{DoxyItemize}

{\bfseries{Example}}


\begin{DoxyCode}{0}
\DoxyCodeLine{app.union('a.b', ['foo']);}
\DoxyCodeLine{app.union('a.b', ['bar']);}
\DoxyCodeLine{console.log(app.get('a'));}
\DoxyCodeLine{//=> \{b: ['foo', 'bar']\} }

\end{DoxyCode}
\hypertarget{md_sfcode_node_modules_cache_base_README_autotoc_md4940}{}\doxysubsection{$<$a href=\char`\"{}index.\+js\#\+L144\char`\"{}$>$.\+get$<$/a$>$}\label{md_sfcode_node_modules_cache_base_README_autotoc_md4940}
Return the value of {\ttfamily key}. Dot notation may be used to get \href{https://github.com/jonschlinkert/get-value}{\texttt{ nested property values}}.

{\bfseries{Params}}


\begin{DoxyItemize}
\item {\ttfamily key} $\ast$$\ast$\{String\}$\ast$$\ast$\+: The name of the property to get. Dot-\/notation may be used.
\item {\ttfamily returns} $\ast$$\ast$\{any\}$\ast$$\ast$\+: Returns the value of {\ttfamily key}
\end{DoxyItemize}

{\bfseries{Events}}


\begin{DoxyItemize}
\item {\ttfamily emits}\+: {\ttfamily get} with {\ttfamily key} and {\ttfamily value} as arguments.
\end{DoxyItemize}

{\bfseries{Example}}


\begin{DoxyCode}{0}
\DoxyCodeLine{app.set('a.b.c', 'd');}
\DoxyCodeLine{app.get('a.b');}
\DoxyCodeLine{//=> \{c: 'd'\}}
\DoxyCodeLine{}
\DoxyCodeLine{app.get(['a', 'b']);}
\DoxyCodeLine{//=> \{c: 'd'\} }

\end{DoxyCode}
\hypertarget{md_sfcode_node_modules_cache_base_README_autotoc_md4941}{}\doxysubsection{$<$a href=\char`\"{}index.\+js\#\+L171\char`\"{}$>$.\+has$<$/a$>$}\label{md_sfcode_node_modules_cache_base_README_autotoc_md4941}
Return true if app has a stored value for {\ttfamily key}, false only if value is {\ttfamily undefined}.

{\bfseries{Params}}


\begin{DoxyItemize}
\item {\ttfamily key} $\ast$$\ast$\{String\}$\ast$$\ast$
\item {\ttfamily returns} $\ast$$\ast$\{Boolean\}$\ast$$\ast$
\end{DoxyItemize}

{\bfseries{Events}}


\begin{DoxyItemize}
\item {\ttfamily emits}\+: {\ttfamily has} with {\ttfamily key} and true or false as arguments.
\end{DoxyItemize}

{\bfseries{Example}}


\begin{DoxyCode}{0}
\DoxyCodeLine{app.set('foo', 'bar');}
\DoxyCodeLine{app.has('foo');}
\DoxyCodeLine{//=> true }

\end{DoxyCode}
\hypertarget{md_sfcode_node_modules_cache_base_README_autotoc_md4942}{}\doxysubsection{$<$a href=\char`\"{}index.\+js\#\+L199\char`\"{}$>$.\+del$<$/a$>$}\label{md_sfcode_node_modules_cache_base_README_autotoc_md4942}
Delete one or more properties from the instance.

{\bfseries{Params}}


\begin{DoxyItemize}
\item {\ttfamily key} $\ast$$\ast$\{String$\vert$\+Array\}$\ast$$\ast$\+: Property name or array of property names.
\item {\ttfamily returns} $\ast$$\ast$\{Object\}$\ast$$\ast$\+: Returns the instance for chaining.
\end{DoxyItemize}

{\bfseries{Events}}


\begin{DoxyItemize}
\item {\ttfamily emits}\+: {\ttfamily del} with the {\ttfamily key} as the only argument.
\end{DoxyItemize}

{\bfseries{Example}}


\begin{DoxyCode}{0}
\DoxyCodeLine{app.del(); // delete all}
\DoxyCodeLine{// or}
\DoxyCodeLine{app.del('foo');}
\DoxyCodeLine{// or}
\DoxyCodeLine{app.del(['foo', 'bar']); }

\end{DoxyCode}
\hypertarget{md_sfcode_node_modules_cache_base_README_autotoc_md4943}{}\doxysubsection{$<$a href=\char`\"{}index.\+js\#\+L218\char`\"{}$>$.\+clear$<$/a$>$}\label{md_sfcode_node_modules_cache_base_README_autotoc_md4943}
Reset the entire cache to an empty object.

{\bfseries{Example}}


\begin{DoxyCode}{0}
\DoxyCodeLine{app.clear(); }

\end{DoxyCode}
\hypertarget{md_sfcode_node_modules_cache_base_README_autotoc_md4944}{}\doxysubsection{$<$a href=\char`\"{}index.\+js\#\+L235\char`\"{}$>$.\+visit$<$/a$>$}\label{md_sfcode_node_modules_cache_base_README_autotoc_md4944}
Visit {\ttfamily method} over the properties in the given object, or map visit over the object-\/elements in an array.

{\bfseries{Params}}


\begin{DoxyItemize}
\item {\ttfamily method} $\ast$$\ast$\{String\}$\ast$$\ast$\+: The name of the {\ttfamily base} method to call.
\item {\ttfamily val} $\ast$$\ast$\{Object$\vert$\+Array\}$\ast$$\ast$\+: The object or array to iterate over.
\item {\ttfamily returns} $\ast$$\ast$\{Object\}$\ast$$\ast$\+: Returns the instance for chaining.
\end{DoxyItemize}\hypertarget{md_sfcode_node_modules_cache_base_README_autotoc_md4945}{}\doxysection{About}\label{md_sfcode_node_modules_cache_base_README_autotoc_md4945}
\hypertarget{md_sfcode_node_modules_cache_base_README_autotoc_md4946}{}\doxysubsection{Related projects}\label{md_sfcode_node_modules_cache_base_README_autotoc_md4946}

\begin{DoxyItemize}
\item \href{https://www.npmjs.com/package/base-methods}{\texttt{ base-\/methods}}\+: base-\/methods is the foundation for creating modular, unit testable and highly pluggable node.\+js applications, starting… \href{https://github.com/jonschlinkert/base-methods}{\texttt{ more}} $\vert$ \href{https://github.com/jonschlinkert/base-methods}{\texttt{ homepage}}
\item \href{https://www.npmjs.com/package/get-value}{\texttt{ get-\/value}}\+: Use property paths ({\ttfamily a.\+b.\+c}) to get a nested value from an object. $\vert$ \mbox{[}homepage\mbox{]}(\href{https://github.com/jonschlinkert/get-value}{\texttt{ https\+://github.\+com/jonschlinkert/get-\/value}} \char`\"{}\+Use property paths (\`{}a.\+b.\+c\`{}) to get a nested value from an object.\char`\"{})
\item \href{https://www.npmjs.com/package/has-value}{\texttt{ has-\/value}}\+: Returns true if a value exists, false if empty. Works with deeply nested values using… \href{https://github.com/jonschlinkert/has-value}{\texttt{ more}} $\vert$ \href{https://github.com/jonschlinkert/has-value}{\texttt{ homepage}}
\item \href{https://www.npmjs.com/package/option-cache}{\texttt{ option-\/cache}}\+: Simple API for managing options in Java\+Script applications. $\vert$ \href{https://github.com/jonschlinkert/option-cache}{\texttt{ homepage}}
\item \href{https://www.npmjs.com/package/set-value}{\texttt{ set-\/value}}\+: Create nested values and any intermediaries using dot notation (`\textquotesingle{}a.\+b.\+c'{\ttfamily ) paths. $\vert$ \mbox{[}homepage\mbox{]}(\href{https://github.com/jonschlinkert/set-value}{\texttt{ https\+://github.\+com/jonschlinkert/set-\/value}} \char`\"{}\+Create nested values and any intermediaries using dot notation ($<$/tt$>$\textquotesingle{}a.\+b.\+c\textquotesingle{}\`{}) paths.\char`\"{})}
\item {\ttfamily \mbox{[}unset-\/value\mbox{]}(\href{https://www.npmjs.com/package/unset-value}{\texttt{ https\+://www.\+npmjs.\+com/package/unset-\/value}})\+: Delete nested properties from an object using dot notation. $\vert$ \mbox{[}homepage\mbox{]}(\href{https://github.com/jonschlinkert/unset-value}{\texttt{ https\+://github.\+com/jonschlinkert/unset-\/value}} \char`\"{}\+Delete nested properties from an object using dot notation.\char`\"{})}
\end{DoxyItemize}

{\ttfamily }\hypertarget{md_sfcode_node_modules_cache_base_README_autotoc_md4947}{}\doxysubsection{Contributing}\label{md_sfcode_node_modules_cache_base_README_autotoc_md4947}
{\ttfamily  Pull requests and stars are always welcome. For bugs and feature requests, \href{../../issues/new}{\texttt{ please create an issue}}.}

{\ttfamily }\hypertarget{md_sfcode_node_modules_cache_base_README_autotoc_md4948}{}\doxysubsection{Contributors}\label{md_sfcode_node_modules_cache_base_README_autotoc_md4948}
{\ttfamily  \tabulinesep=1mm
\begin{longtabu}spread 0pt [c]{*{2}{|X[-1]}|}
\hline
\PBS\centering \cellcolor{\tableheadbgcolor}\textbf{ {\bfseries{Commits}}   }&\PBS\centering \cellcolor{\tableheadbgcolor}\textbf{ {\bfseries{Contributor}}    }\\\cline{1-2}
\endfirsthead
\hline
\endfoot
\hline
\PBS\centering \cellcolor{\tableheadbgcolor}\textbf{ {\bfseries{Commits}}   }&\PBS\centering \cellcolor{\tableheadbgcolor}\textbf{ {\bfseries{Contributor}}    }\\\cline{1-2}
\endhead
54   &\href{https://github.com/jonschlinkert}{\texttt{ jonschlinkert}}    \\\cline{1-2}
2   &\href{https://github.com/wtgtybhertgeghgtwtg}{\texttt{ wtgtybhertgeghgtwtg}}   \\\cline{1-2}
\end{longtabu}
}

{\ttfamily }\hypertarget{md_sfcode_node_modules_cache_base_README_autotoc_md4949}{}\doxysubsection{Building docs}\label{md_sfcode_node_modules_cache_base_README_autotoc_md4949}
{\ttfamily  \+\_\+(This project\textquotesingle{}s readme.\+md is generated by \href{https://github.com/verbose/verb-generate-readme}{\texttt{ verb}}, please don\textquotesingle{}t edit the readme directly. Any changes to the readme must be made in the .verb.md readme template.)\+\_\+}

{\ttfamily To generate the readme, run the following command\+:}

{\ttfamily 
\begin{DoxyCode}{0}
\DoxyCodeLine{\$ npm install -\/g verbose/verb\#dev verb-\/generate-\/readme \&\& verb }

\end{DoxyCode}
}

{\ttfamily }\hypertarget{md_sfcode_node_modules_cache_base_README_autotoc_md4950}{}\doxysubsection{Running tests}\label{md_sfcode_node_modules_cache_base_README_autotoc_md4950}
{\ttfamily  Running and reviewing unit tests is a great way to get familiarized with a library and its API. You can install dependencies and run tests with the following command\+:}

{\ttfamily 
\begin{DoxyCode}{0}
\DoxyCodeLine{\$ npm install \&\& npm test }

\end{DoxyCode}
}

{\ttfamily }\hypertarget{md_sfcode_node_modules_cache_base_README_autotoc_md4951}{}\doxysubsection{Author}\label{md_sfcode_node_modules_cache_base_README_autotoc_md4951}
{\ttfamily  {\bfseries{Jon Schlinkert}}}

{\ttfamily 
\begin{DoxyItemize}
\item \href{https://github.com/jonschlinkert}{\texttt{ github/jonschlinkert}}
\item \href{https://twitter.com/jonschlinkert}{\texttt{ twitter/jonschlinkert}}
\end{DoxyItemize}}

{\ttfamily }\hypertarget{md_sfcode_node_modules_cache_base_README_autotoc_md4952}{}\doxysubsection{License}\label{md_sfcode_node_modules_cache_base_README_autotoc_md4952}
{\ttfamily  Copyright © 2017, \href{https://github.com/jonschlinkert}{\texttt{ Jon Schlinkert}}. Released under the \mbox{[}MIT License\mbox{]}(LICENSE).}

{\ttfamily \DoxyHorRuler{0}
}

{\ttfamily {\itshape This file was generated by \href{https://github.com/verbose/verb-generate-readme}{\texttt{ verb-\/generate-\/readme}}, v0.\+6.\+0, on July 22, 2017.} }