<?xml version="1.0" encoding="utf-8"?>
<KScriptSetting>
  <Name>keyValue</Name>
  <Description>Kooboo KeyValue store per site. Both key and value are string only.</Description>
  <Example>
    k.keyValue.set("key", "value");
    var value = k.keyValue.get("key");
    // or
    var value = k.keyValue.key;
  </Example>
  <Props>
    <Property>
      <Name>keys</Name>
      <Description>keys</Description>
      <Type>array</Type>
    </Property>
    <Property>
      <Name>values</Name>
      <Description>values</Description>
      <Type>array</Type>
    </Property>
    <Property>
      <Name>length</Name>
      <Description>length</Description>
      <Type>number</Type>
    </Property>
  </Props>
  <Methods>
    <Method>
      <Name>set</Name>
      <Description>Add or update value in the keyValue store.</Description>
      <Example>

        k.set("key", "string value");

      </Example>
      <Params>
        <Param>
          <Name>key</Name>
          <Description>key</Description>
          <Type>string</Type>
        </Param>
        <Param>
          <Name>value</Name>
          <Description>value</Description>
          <Type>string</Type>
        </Param>
      </Params>
    </Method>
    <Method>
      <Name>get</Name>
      <Description>Get string value from the keyValue store </Description>
      <Example>
        var value = k.keyValue.get("key");
        // or
        var value = k.keyValue.key;
      </Example>
      <Params>
        <Param>
          <Name>key</Name>
          <Description>key</Description>
          <Type>string</Type>
        </Param>
      </Params>
      <ReturnType>string</ReturnType>
    </Method>
    <Method>
      <Name>remove</Name>
      <Description>Delete item from the keyValue store</Description>
      <Example>
        k.keyValue.remove("key");
      </Example>
      <Params>
        <Param>
          <Name>key</Name>
          <Description>key</Description>
          <Type>string</Type>
        </Param>
      </Params>
      <ReturnType>boolean</ReturnType>
    </Method>
    <Method>
      <Name>contains</Name>
      <Description>Check whether the keyValue has that key or not</Description>
      <Example>
      if (k.keyValue.contains("key"))
      {
      // has the key.
      }
      </Example>
      <Params>
        <Param>
          <Name>key</Name>
          <Description>key</Description>
          <Type>string</Type>
        </Param>
      </Params>
      <ReturnType>boolean</ReturnType>
    </Method>
  </Methods>
</KScriptSetting>