Skip to content

getCookie

Pass in a string to get the value of the cookie with the specified name

API

Return

argumentInstructionstype
stingReturns the value of a cookie with the specified namestring

Options

argumentInstructionstypeDefault value
nameSpecifies the value of the name that gets the cookieobject

Example

js
import { getCookie } from 'ranuts';

const result = getCookie('name');

console.log(result);

// ''

Released under the MIT License.